Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update new character equipment parameters key #489

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading