From e44d4bef8a842b7ed8520e6f15a57e574a9b8467 Mon Sep 17 00:00:00 2001 From: Ty Conner Date: Sun, 10 May 2020 13:49:24 -0400 Subject: [PATCH] Add AdjustPP to Skill reader/output (#58) * Add AdjustPP to Skill reader/output * Update ACEBiotaCreator.cs --- aclogview/ACE Helpers/ACEBiotaCreator.cs | 2 +- aclogview/Packets.cs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aclogview/ACE Helpers/ACEBiotaCreator.cs b/aclogview/ACE Helpers/ACEBiotaCreator.cs index 54002b5..b1f3ad4 100644 --- a/aclogview/ACE Helpers/ACEBiotaCreator.cs +++ b/aclogview/ACE Helpers/ACEBiotaCreator.cs @@ -41,7 +41,7 @@ public static void AddOrUpdateSkill(Biota biota, STypeSkill skillType, Skill ski var entity = biota.GetOrAddSkill((ushort)skillType, rwLock, out _); entity.InitLevel = skill._init_level; entity.LastUsedTime = skill._last_used_time; - entity.LevelFromPP = (ushort)skill._level_from_pp; + entity.LevelFromPP = skill._level_from_pp; entity.PP = skill._pp; entity.ResistanceAtLastCheck = skill._resistance_of_last_check; entity.SAC = (uint)skill._sac; diff --git a/aclogview/Packets.cs b/aclogview/Packets.cs index 353f34b..851884e 100644 --- a/aclogview/Packets.cs +++ b/aclogview/Packets.cs @@ -449,7 +449,8 @@ public void contributeToTreeNode(TreeNode node) { } public class Skill { - public uint _level_from_pp; + public ushort _level_from_pp; + public ushort _adjust_pp; public SKILL_ADVANCEMENT_CLASS _sac; public uint _pp; public uint _init_level; @@ -460,7 +461,8 @@ public class Skill { public static Skill read(BinaryReader binaryReader) { Skill newObj = new Skill(); var startPosition = binaryReader.BaseStream.Position; - newObj._level_from_pp = binaryReader.ReadUInt32(); + newObj._level_from_pp = binaryReader.ReadUInt16(); + newObj._adjust_pp = binaryReader.ReadUInt16(); newObj._sac = (SKILL_ADVANCEMENT_CLASS)binaryReader.ReadUInt32(); newObj._pp = binaryReader.ReadUInt32(); newObj._init_level = binaryReader.ReadUInt32(); @@ -472,7 +474,9 @@ public static Skill read(BinaryReader binaryReader) { public void contributeToTreeNode(TreeNode node) { node.Nodes.Add("_level_from_pp = " + _level_from_pp); - ContextInfo.AddToList(new ContextInfo { Length = 4 }); + ContextInfo.AddToList(new ContextInfo { Length = 2 }); + node.Nodes.Add("_adjust_pp = " + _adjust_pp); + ContextInfo.AddToList(new ContextInfo { Length = 2 }); node.Nodes.Add("_sac = " + _sac); ContextInfo.AddToList(new ContextInfo { Length = 4 }); node.Nodes.Add("_pp = " + _pp);