Skip to content

Commit

Permalink
Add AdjustPP to Skill reader/output (#58)
Browse files Browse the repository at this point in the history
* Add AdjustPP to Skill reader/output

* Update ACEBiotaCreator.cs
  • Loading branch information
LtRipley36706 authored May 10, 2020
1 parent 97ab034 commit e44d4be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aclogview/ACE Helpers/ACEBiotaCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 7 additions & 3 deletions aclogview/Packets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit e44d4be

Please sign in to comment.