Skip to content

Commit

Permalink
update new character equipment paramesters key
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot4tion authored Mar 22, 2024
1 parent b23ac14 commit db12669
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/StatisticsAnalysisTool/Network/Events/NewCharacterEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ public NewCharacterEvent(Dictionary<byte, object> parameters)
GuildName = guildName.ToString();
}

if (parameters.ContainsKey(37))
if (parameters.ContainsKey(38))
{
var valueType = parameters[37].GetType();
var valueType = parameters[38].GetType();
switch (valueType.IsArray)
{
case true when typeof(byte[]).Name == valueType.Name:
{
var values = ((byte[]) parameters[37]).ToDictionary();
var values = ((byte[]) parameters[38]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
case true when typeof(short[]).Name == valueType.Name:
{
var values = ((short[]) parameters[37]).ToDictionary();
var values = ((short[]) parameters[38]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
case true when typeof(int[]).Name == valueType.Name:
{
var values = ((int[]) parameters[37]).ToDictionary();
var values = ((int[]) parameters[38]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
Expand Down

0 comments on commit db12669

Please sign in to comment.