Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Triky313 committed Mar 11, 2024
2 parents 4f9c3c8 + b23ac14 commit 73f69bf
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 87 deletions.
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/Languages/zh-CN.xml
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
<translation name="TRACKING_IS_ACTIVE">正在进行追踪</translation>
<translation name="TRACKING_IS_PARTIALLY_ACTIVE">追踪功能受限(请切换地图!)</translation>
<translation name="TRACKING_IS_NOT_ACTIVE">未进行追踪</translation>
<translation name="PROGRAM_RESTART_REQUIRED">需要重新启动程序</translation>
<translation name="RESTART_REQUIRED">需要重启</translation>
<translation name="DASHBOARD">数据总览</translation>
<translation name="MIGHT">力量点</translation>
<translation name="FAVOR">恩惠</translation>
Expand Down Expand Up @@ -782,4 +782,4 @@
<translation name="PACKET_PROVIDER">工具包来源</translation>
<translation name="TOOL_MUST_BE_RUN_AS_ADMIN">必须以管理员身份运行工具</translation>
<translation name="ADDED_CRAFTING">已添加的制造</translation>
</translations>
</translations>
98 changes: 49 additions & 49 deletions src/StatisticsAnalysisTool/Languages/zh-TW.xml

Large diffs are not rendered by default.

38 changes: 16 additions & 22 deletions src/StatisticsAnalysisTool/Network/Events/NewCharacterEvent.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Models.NetworkModel;
using System;
using System.Collections.Generic;
using System.Reflection;
using StatisticsAnalysisTool.Models.NetworkModel;

namespace StatisticsAnalysisTool.Network.Events;

Expand All @@ -12,7 +12,6 @@ public class NewCharacterEvent
public Guid? Guid { get; }
public string Name { get; }
public string GuildName { get; }
public float[] Position { get; }
public CharacterEquipment CharacterEquipment { get; } = new();

public NewCharacterEvent(Dictionary<byte, object> parameters)
Expand Down Expand Up @@ -41,34 +40,29 @@ public NewCharacterEvent(Dictionary<byte, object> parameters)
GuildName = guildName.ToString();
}

if (parameters.TryGetValue(13, out object position))
{
Position = (float[]) position;
}

if (parameters.ContainsKey(37))
{
var valueType = parameters[37].GetType();
switch (valueType.IsArray)
{
case true when typeof(byte[]).Name == valueType.Name:
{
var values = ((byte[])parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
{
var values = ((byte[]) parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
case true when typeof(short[]).Name == valueType.Name:
{
var values = ((short[])parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
{
var values = ((short[]) parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
case true when typeof(int[]).Name == valueType.Name:
{
var values = ((int[])parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
{
var values = ((int[]) parameters[37]).ToDictionary();
CharacterEquipment = GetEquipment(values);
break;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using StatisticsAnalysisTool.Dungeon;

namespace StatisticsAnalysisTool.Network.Operations.Responses;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,33 +101,33 @@ public JoinResponse(IReadOnlyDictionary<byte, object> parameters)
ReSpecPoints = FixPoint.FromInternalValue(reSpecArray[1]);
}

if (parameters.ContainsKey(52))
if (parameters.ContainsKey(53))
{
InteractGuid = parameters[52].ObjectToGuid();
InteractGuid = parameters[53].ObjectToGuid();
ConsoleManager.WriteLineForMessage(MethodBase.GetCurrentMethod()?.DeclaringType, $"Local interact object Guid: {InteractGuid}", ConsoleColorType.EventMapChangeColor);
}

if (parameters.ContainsKey(56))
if (parameters.ContainsKey(57))
{
GuildName = string.IsNullOrEmpty(parameters[56].ToString()) ? string.Empty : parameters[56].ToString();
GuildName = string.IsNullOrEmpty(parameters[57].ToString()) ? string.Empty : parameters[57].ToString();
}

if (parameters.ContainsKey(63))
if (parameters.ContainsKey(64))
{
MainMapIndex = string.IsNullOrEmpty(parameters[63].ToString()) ? string.Empty : parameters[63].ToString();
MainMapIndex = string.IsNullOrEmpty(parameters[64].ToString()) ? string.Empty : parameters[64].ToString();
}

// Temporarily removed until value is found
PlayTimeInSeconds = 0;

if (parameters.ContainsKey(76))
if (parameters.ContainsKey(77))
{
AllianceName = string.IsNullOrEmpty(parameters[76].ToString()) ? string.Empty : parameters[76].ToString();
AllianceName = string.IsNullOrEmpty(parameters[77].ToString()) ? string.Empty : parameters[77].ToString();
}

if (parameters.ContainsKey(93))
if (parameters.ContainsKey(94))
{
IsReSpecActive = parameters[93].ObjectToBool();
IsReSpecActive = parameters[94].ObjectToBool();
}
}
catch (Exception e)
Expand Down
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.2.1.*")]
[assembly: AssemblyFileVersion("7.2.1.0")]
[assembly: AssemblyVersion("7.2.2.*")]
[assembly: AssemblyFileVersion("7.2.2.0")]
2 changes: 1 addition & 1 deletion src/StatisticsAnalysisTool/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73f69bf

Please sign in to comment.