Skip to content

Commit

Permalink
Merge pull request #489 from Rot4tion/update_new_character_equipment_…
Browse files Browse the repository at this point in the history
…paramasters_key

update new character equipment parameters key
  • Loading branch information
Triky313 authored Mar 23, 2024
2 parents b23ac14 + db12669 commit 40dfaee
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 40dfaee

Please sign in to comment.