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:
@@ -17,6 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -65,7 +66,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket .WriteInt32(Reason);
|
||||
// Client uses this string only if Reason == ERR_REFER_A_FRIEND_NOT_IN_GROUP || Reason == ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S
|
||||
// but always reads it from packet
|
||||
_worldPacket.WriteBits(Str.Length, 6);
|
||||
_worldPacket.WriteBits(Str.GetByteCount(), 6);
|
||||
_worldPacket.WriteString(Str);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user