Core: Update to 10.2.7
Port From (https://github.com/TrinityCore/TrinityCore/commit/468a06baf046b716305ee665e3cfd93c80e99457)
This commit is contained in:
@@ -45,15 +45,30 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
Language = (Language)_worldPacket.ReadInt32();
|
||||
uint targetLen = _worldPacket.ReadBits<uint>(9);
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
TargetVirtualRealmAddress = _worldPacket.ReadUInt32();
|
||||
|
||||
uint targetLen = _worldPacket.ReadBits<uint>(6);
|
||||
uint textLen = _worldPacket.ReadBits<uint>(11);
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
|
||||
if (targetLen > 1)
|
||||
{
|
||||
Target = _worldPacket.ReadString(targetLen - 1);
|
||||
_worldPacket.Skip(1); // null terminator
|
||||
}
|
||||
|
||||
if (textLen > 1)
|
||||
{
|
||||
Text = _worldPacket.ReadString(textLen - 1);
|
||||
_worldPacket.Skip(1); // null terminator
|
||||
}
|
||||
}
|
||||
|
||||
public Language Language = Language.Universal;
|
||||
public string Text;
|
||||
public ObjectGuid TargetGUID;
|
||||
public uint TargetVirtualRealmAddress = 0;
|
||||
public string Target;
|
||||
public string Text;
|
||||
}
|
||||
|
||||
public class ChatMessageChannel : ClientPacket
|
||||
@@ -98,15 +113,33 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
uint targetLen = _worldPacket.ReadBits<uint>(9);
|
||||
Params.Read(_worldPacket);
|
||||
ChannelGUID = _worldPacket.ReadPackedGuid();
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
PlayerGUID = _worldPacket.ReadPackedGuid();
|
||||
PlayerVirtualRealmAddress = _worldPacket.ReadUInt32();
|
||||
|
||||
uint playerNameLength = _worldPacket.ReadBits<uint>(6);
|
||||
uint channelNameLength = _worldPacket.ReadBits<uint>(6);
|
||||
|
||||
if (playerNameLength > 1)
|
||||
{
|
||||
PlayerName = _worldPacket.ReadString(playerNameLength - 1);
|
||||
_worldPacket.Skip(1); // null terminator
|
||||
}
|
||||
|
||||
if (channelNameLength > 1)
|
||||
{
|
||||
ChannelName = _worldPacket.ReadString(channelNameLength - 1);
|
||||
_worldPacket.Skip(1); // null terminator
|
||||
}
|
||||
}
|
||||
|
||||
public string Target;
|
||||
public ChatAddonMessageParams Params = new();
|
||||
public ObjectGuid? ChannelGUID; // not optional in the packet. Optional for api reasons
|
||||
public string PlayerName;
|
||||
public ObjectGuid PlayerGUID;
|
||||
public uint PlayerVirtualRealmAddress = 0;
|
||||
public string ChannelName;
|
||||
public ObjectGuid ChannelGUID;
|
||||
}
|
||||
|
||||
public class ChatMessageDND : ClientPacket
|
||||
@@ -220,6 +253,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(TargetVirtualAddress);
|
||||
_worldPacket.WriteUInt32(SenderVirtualAddress);
|
||||
_worldPacket.WriteUInt32(AchievementID);
|
||||
_worldPacket.WriteUInt16((ushort)_ChatFlags);
|
||||
_worldPacket.WriteFloat(DisplayTime);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteBits(SenderName.GetByteCount(), 11);
|
||||
@@ -227,7 +261,6 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Prefix.GetByteCount(), 5);
|
||||
_worldPacket.WriteBits(Channel.GetByteCount(), 7);
|
||||
_worldPacket.WriteBits(ChatText.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits((ushort)_ChatFlags, 15);
|
||||
_worldPacket.WriteBit(HideChatLog);
|
||||
_worldPacket.WriteBit(FakeSenderName);
|
||||
_worldPacket.WriteBit(Unused_801.HasValue);
|
||||
|
||||
Reference in New Issue
Block a user