Fix build and loading crashes

Port From (https://github.com/TrinityCore/TrinityCore/commit/)
This commit is contained in:
hondacrx
2020-12-15 13:20:10 -05:00
parent 3ca0947881
commit f6203e98ee
11 changed files with 26 additions and 21 deletions
@@ -2276,7 +2276,7 @@ namespace Game.Entities
}
}
public struct ChrCustomizationChoice
public struct ChrCustomizationChoice : IComparable<ChrCustomizationChoice>
{
public uint ChrCustomizationOptionID;
public uint ChrCustomizationChoiceID;
@@ -2298,6 +2298,11 @@ namespace Game.Entities
data.WriteUInt32(ChrCustomizationOptionID);
data.WriteUInt32(ChrCustomizationChoiceID);
}
public int CompareTo(ChrCustomizationChoice other)
{
return ChrCustomizationOptionID.CompareTo(other.ChrCustomizationOptionID);
}
}
public class QuestLog : BaseUpdateData<Player>
+1 -1
View File
@@ -2506,7 +2506,7 @@ namespace Game.Entities
uint health = result.Read<uint>(fieldIndex++);
uint[] powers = new uint[(int)PowerType.MaxPerClass];
for (var i = 0; fieldIndex < powers.Length; ++i)
for (var i = 0; i < powers.Length; ++i)
powers[i] = result.Read<uint>(fieldIndex++);
uint instance_id = result.Read<uint>(fieldIndex++);