Fixes #25 client crash on non en-US clients
This commit is contained in:
@@ -83,15 +83,15 @@ namespace Game.Network.Packets
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket.WriteBits(Stats.Title.IsEmpty() ? 0 : Stats.Title.Length + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.TitleAlt.IsEmpty() ? 0 : Stats.TitleAlt.Length + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.CursorName.IsEmpty() ? 0 : Stats.CursorName.Length + 1, 6);
|
||||
_worldPacket.WriteBits(Stats.Title.IsEmpty() ? 0 : Stats.Title.GetByteCount() + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.TitleAlt.IsEmpty() ? 0 : Stats.TitleAlt.GetByteCount() + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.CursorName.IsEmpty() ? 0 : Stats.CursorName.GetByteCount() + 1, 6);
|
||||
_worldPacket.WriteBit(Stats.Leader);
|
||||
|
||||
for (var i = 0; i < SharedConst.MaxCreatureNames; ++i)
|
||||
{
|
||||
_worldPacket.WriteBits(Stats.Name[i].Length + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.NameAlt[i].Length + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.Name[i].GetByteCount() + 1, 11);
|
||||
_worldPacket.WriteBits(Stats.NameAlt[i].GetByteCount() + 1, 11);
|
||||
}
|
||||
|
||||
for (var i = 0; i < SharedConst.MaxCreatureNames; ++i)
|
||||
|
||||
@@ -840,7 +840,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(ResurrectOffererVirtualRealmAddress);
|
||||
_worldPacket.WriteUInt32(PetNumber);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteBits(Name.Length, 11);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 11);
|
||||
_worldPacket.WriteBit(UseTimer);
|
||||
_worldPacket.WriteBit(Sickness);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
Reference in New Issue
Block a user