Skip to content

Commit

Permalink
Fix for March 2015 update (partial)
Browse files Browse the repository at this point in the history
  • Loading branch information
z16 committed Mar 29, 2015
1 parent c508c2d commit 18619ed
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 4 additions & 1 deletion PlayOnline.FFXI/FileTypes/MonsterSpellInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static List<string> AllFields
private byte? Unknown2_;
private byte? Unknown3_;
private byte? Unknown4_;
private uint? Unknown5_;

#endregion

Expand All @@ -83,6 +84,7 @@ public override void Clear()
this.Unknown2_ = null;
this.Unknown3_ = null;
this.Unknown4_ = null;
this.Unknown5_ = null;
}

#endregion
Expand Down Expand Up @@ -312,7 +314,7 @@ public bool Read(BinaryReader BR)
this.Clear();
try
{
byte[] Bytes = BR.ReadBytes(0x50);
byte[] Bytes = BR.ReadBytes(0x58);
//if (Bytes[0x3] != 0x00 || Bytes[0x5] != 0x00 || Bytes[0x7] != 0x00 || Bytes[0x9] != 0x00 || Bytes[0xf] != 0xff || Bytes[0x3f] != 0xff)
//return false;
if (!FFXIEncryption.DecodeDataBlockMask(Bytes))
Expand Down Expand Up @@ -344,6 +346,7 @@ public bool Read(BinaryReader BR)
this.Unknown2_ = BR.ReadByte();
this.Unknown3_ = BR.ReadByte();
this.Unknown4_ = BR.ReadByte();
this.Unknown5_ = BR.ReadUInt32();
#if DEBUG // Check the padding bytes for unexpected data
for (byte i = 0; i < 14; ++i)
{
Expand Down
8 changes: 4 additions & 4 deletions PlayOnline.FFXI/FileTypes/SpellAndAbilityInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public override ThingList Load(BinaryReader BR, ProgressCallback ProgressCallbac
goto Failed;
}
uint BlockSize = (SizeInfo & 0xFFFFFF80) >> 3;
if ((BlockSize - 0x10) % 0x50 != 0)
if ((BlockSize - 0x10) % 0x58 != 0)
{
goto Failed;
}
uint EntryCount = (BlockSize - 0x10) / 0x50;
uint EntryCount = (BlockSize - 0x10) / 0x58;
while (EntryCount-- > 0)
{
Things.MonsterSpellInfo2 MSI2 = new Things.MonsterSpellInfo2();
Expand Down Expand Up @@ -98,11 +98,11 @@ public override ThingList Load(BinaryReader BR, ProgressCallback ProgressCallbac
goto Failed;
}
uint BlockSize = (SizeInfo & 0xFFFFFF80) >> 3;
if ((BlockSize - 0x10) % 0x50 != 0)
if ((BlockSize - 0x10) % 0x58 != 0)
{
goto Failed;
}
uint EntryCount = (BlockSize - 0x10) / 0x50;
uint EntryCount = (BlockSize - 0x10) / 0x58;
while (EntryCount-- > 0)
{
Things.SpellInfo2 SI2 = new Things.SpellInfo2();
Expand Down
7 changes: 5 additions & 2 deletions PlayOnline.FFXI/Things/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public static List<string> AllFields
private ushort? Unknown2_;
private uint? Unknown3_;
private uint? Unknown4_;
private uint? Unknown5_;

#endregion

Expand Down Expand Up @@ -166,7 +167,8 @@ public override void Clear()
this.Unknown1_ = null;
this.Unknown2_ = null;
this.Unknown3_ = null;
this.Unknown4_ = null;
this.Unknown4_ = null;
this.Unknown5_ = null;
}

#endregion
Expand Down Expand Up @@ -724,7 +726,8 @@ public bool Read(BinaryReader BR, Type T)
}
this.ReuseDelay_ = BR.ReadUInt32();
this.Unknown2_ = BR.ReadUInt16();
this.iLevel_ = BR.ReadUInt16();
this.iLevel_ = BR.ReadUInt16();
this.Unknown5_ = BR.ReadUInt32();
}
else if (T == Type.PuppetItem)
{
Expand Down
1 change: 1 addition & 0 deletions PlayOnline.FFXI/Things/SpellInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ public bool Read(BinaryReader BR)
}
this.ID_ = BR.ReadUInt16();
this.ListIconID_ = BR.ReadByte();
BR.ReadBytes(0x04);
FFXIEncoding E = new FFXIEncoding();
this.JapaneseName_ = E.GetString(BR.ReadBytes(20)).TrimEnd('\0');
this.EnglishName_ = E.GetString(BR.ReadBytes(20)).TrimEnd('\0');
Expand Down
6 changes: 4 additions & 2 deletions PlayOnline.FFXI/Things/SpellInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public static List<string> AllFields
private byte? Unknown1_;
private byte? Unknown2_;
private byte? Unknown3_;
private byte? Unknown4_;
private byte? Unknown4_;
private uint? Unknown5_;

#endregion

Expand Down Expand Up @@ -343,7 +344,8 @@ public bool Read(BinaryReader BR)
this.Unknown1_ = BR.ReadByte();
this.Unknown2_ = BR.ReadByte();
this.Unknown3_ = BR.ReadByte();
this.Unknown4_ = BR.ReadByte();
this.Unknown4_ = BR.ReadByte();
this.Unknown5_ = BR.ReadUInt32();

#if DEBUG // Check the padding bytes for unexpected data
for (byte i = 0; i < 14; ++i)
Expand Down

0 comments on commit 18619ed

Please sign in to comment.