Fixed string getting cut off if the string had some symbols. The length of the string would not be the same as the bytes length.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
@@ -40,7 +41,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(AccountName.Length, 11);
|
||||
_worldPacket.WriteBits(AccountName.GetByteCount(), 11);
|
||||
_worldPacket.WriteString(AccountName);
|
||||
}
|
||||
|
||||
@@ -155,7 +156,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(GuildVirtualRealmAddress);
|
||||
data.WriteInt32(AreaID);
|
||||
|
||||
data.WriteBits(GuildName.Length, 7);
|
||||
data.WriteBits(GuildName.GetByteCount(), 7);
|
||||
data.WriteBit(IsGM);
|
||||
data.WriteString(GuildName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user