Core/PacketIO: Rename more unknown packet fields
Port From (https://github.com/TrinityCore/TrinityCore/commit/fade8be3b133a58bfba4cf59e73f432aaa3444f4)
This commit is contained in:
@@ -2164,7 +2164,7 @@ namespace Game.Entities
|
|||||||
LearnedSpells learnedSpells = new();
|
LearnedSpells learnedSpells = new();
|
||||||
LearnedSpellInfo learnedSpellInfo = new();
|
LearnedSpellInfo learnedSpellInfo = new();
|
||||||
learnedSpellInfo.SpellID = spellId;
|
learnedSpellInfo.SpellID = spellId;
|
||||||
learnedSpellInfo.IsFavorite = favorite;
|
learnedSpellInfo.Favorite = favorite;
|
||||||
learnedSpellInfo.TraitDefinitionID = traitDefinitionId;
|
learnedSpellInfo.TraitDefinitionID = traitDefinitionId;
|
||||||
learnedSpells.SuppressMessaging = suppressMessaging;
|
learnedSpells.SuppressMessaging = suppressMessaging;
|
||||||
learnedSpells.ClientLearnedSpellData.Add(learnedSpellInfo);
|
learnedSpells.ClientLearnedSpellData.Add(learnedSpellInfo);
|
||||||
|
|||||||
@@ -58,15 +58,15 @@ namespace Game.Networking.Packets
|
|||||||
_worldPacket.WriteInt32(FriendshipFactionID);
|
_worldPacket.WriteInt32(FriendshipFactionID);
|
||||||
_worldPacket.WriteInt32(GossipOptions.Count);
|
_worldPacket.WriteInt32(GossipOptions.Count);
|
||||||
_worldPacket.WriteInt32(GossipText.Count);
|
_worldPacket.WriteInt32(GossipText.Count);
|
||||||
_worldPacket.WriteBit(TextID.HasValue);
|
_worldPacket.WriteBit(RandomTextID.HasValue);
|
||||||
_worldPacket.WriteBit(BroadcastTextID.HasValue);
|
_worldPacket.WriteBit(BroadcastTextID.HasValue);
|
||||||
_worldPacket.FlushBits();
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
foreach (ClientGossipOptions options in GossipOptions)
|
foreach (ClientGossipOptions options in GossipOptions)
|
||||||
options.Write(_worldPacket);
|
options.Write(_worldPacket);
|
||||||
|
|
||||||
if (TextID.HasValue)
|
if (RandomTextID.HasValue)
|
||||||
_worldPacket.WriteInt32(TextID.Value);
|
_worldPacket.WriteInt32(RandomTextID.Value);
|
||||||
|
|
||||||
if (BroadcastTextID.HasValue)
|
if (BroadcastTextID.HasValue)
|
||||||
_worldPacket.WriteInt32(BroadcastTextID.Value);
|
_worldPacket.WriteInt32(BroadcastTextID.Value);
|
||||||
@@ -79,7 +79,7 @@ namespace Game.Networking.Packets
|
|||||||
public int FriendshipFactionID;
|
public int FriendshipFactionID;
|
||||||
public ObjectGuid GossipGUID;
|
public ObjectGuid GossipGUID;
|
||||||
public List<ClientGossipText> GossipText = new();
|
public List<ClientGossipText> GossipText = new();
|
||||||
public int? TextID; // in classic variants this still holds npc_text id
|
public int? RandomTextID; // in classic variants this still holds npc_text id
|
||||||
public int? BroadcastTextID;
|
public int? BroadcastTextID;
|
||||||
public uint GossipID;
|
public uint GossipID;
|
||||||
public uint LfgDungeonsID;
|
public uint LfgDungeonsID;
|
||||||
|
|||||||
@@ -2081,22 +2081,22 @@ namespace Game.Networking.Packets
|
|||||||
public struct LearnedSpellInfo
|
public struct LearnedSpellInfo
|
||||||
{
|
{
|
||||||
public uint SpellID;
|
public uint SpellID;
|
||||||
public bool IsFavorite;
|
public bool Favorite;
|
||||||
public int? field_8;
|
public int? EquipableSpellInvSlot;
|
||||||
public int? Superceded;
|
public int? Superceded;
|
||||||
public int? TraitDefinitionID;
|
public int? TraitDefinitionID;
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.WriteUInt32(SpellID);
|
data.WriteUInt32(SpellID);
|
||||||
data.WriteBit(IsFavorite);
|
data.WriteBit(Favorite);
|
||||||
data.WriteBit(field_8.HasValue);
|
data.WriteBit(EquipableSpellInvSlot.HasValue);
|
||||||
data.WriteBit(Superceded.HasValue);
|
data.WriteBit(Superceded.HasValue);
|
||||||
data.WriteBit(TraitDefinitionID.HasValue);
|
data.WriteBit(TraitDefinitionID.HasValue);
|
||||||
data.FlushBits();
|
data.FlushBits();
|
||||||
|
|
||||||
if (field_8.HasValue)
|
if (EquipableSpellInvSlot.HasValue)
|
||||||
data.WriteInt32(field_8.Value);
|
data.WriteInt32(EquipableSpellInvSlot.Value);
|
||||||
|
|
||||||
if (Superceded.HasValue)
|
if (Superceded.HasValue)
|
||||||
data.WriteInt32(Superceded.Value);
|
data.WriteInt32(Superceded.Value);
|
||||||
@@ -2162,15 +2162,15 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteInt32(RecoveryTime);
|
data.WriteInt32(RecoveryTime);
|
||||||
data.WriteInt32(CategoryRecoveryTime);
|
data.WriteInt32(CategoryRecoveryTime);
|
||||||
data.WriteFloat(ModRate);
|
data.WriteFloat(ModRate);
|
||||||
data.WriteBit(unused622_1.HasValue);
|
data.WriteBit(RecoveryTimeStartOffset.HasValue);
|
||||||
data.WriteBit(unused622_2.HasValue);
|
data.WriteBit(CategoryRecoveryTimeStartOffset.HasValue);
|
||||||
data.WriteBit(OnHold);
|
data.WriteBit(OnHold);
|
||||||
data.FlushBits();
|
data.FlushBits();
|
||||||
|
|
||||||
if (unused622_1.HasValue)
|
if (RecoveryTimeStartOffset.HasValue)
|
||||||
data.WriteUInt32(unused622_1.Value);
|
data.WriteUInt32(RecoveryTimeStartOffset.Value);
|
||||||
if (unused622_2.HasValue)
|
if (CategoryRecoveryTimeStartOffset.HasValue)
|
||||||
data.WriteUInt32(unused622_2.Value);
|
data.WriteUInt32(CategoryRecoveryTimeStartOffset.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint SpellID;
|
public uint SpellID;
|
||||||
@@ -2180,8 +2180,8 @@ namespace Game.Networking.Packets
|
|||||||
public int CategoryRecoveryTime;
|
public int CategoryRecoveryTime;
|
||||||
public float ModRate = 1.0f;
|
public float ModRate = 1.0f;
|
||||||
public bool OnHold;
|
public bool OnHold;
|
||||||
uint? unused622_1; // This field is not used for anything in the client in 6.2.2.20444
|
uint? RecoveryTimeStartOffset;
|
||||||
uint? unused622_2; // This field is not used for anything in the client in 6.2.2.20444
|
uint? CategoryRecoveryTimeStartOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SpellChargeEntry
|
public class SpellChargeEntry
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ namespace Game.Networking.Packets
|
|||||||
public void Read(WorldPacket data)
|
public void Read(WorldPacket data)
|
||||||
{
|
{
|
||||||
Timestamp = data.ReadInt64();
|
Timestamp = data.ReadInt64();
|
||||||
AuthorGUID = data.ReadPackedGuid();
|
PlayerGuid = data.ReadPackedGuid();
|
||||||
|
|
||||||
bool hasClubID = data.HasBit();
|
bool hasClubID = data.HasBit();
|
||||||
bool hasChannelGUID = data.HasBit();
|
bool hasChannelGUID = data.HasBit();
|
||||||
@@ -272,36 +272,36 @@ namespace Game.Networking.Packets
|
|||||||
ClubID = data.ReadUInt64();
|
ClubID = data.ReadUInt64();
|
||||||
|
|
||||||
if (hasChannelGUID)
|
if (hasChannelGUID)
|
||||||
ChannelGUID = data.ReadPackedGuid();
|
ChannelGuid = data.ReadPackedGuid();
|
||||||
|
|
||||||
if (hasRealmAddress)
|
if (hasRealmAddress)
|
||||||
{
|
{
|
||||||
SenderRealm senderRealm = new();
|
ServerSpec senderRealm = new();
|
||||||
senderRealm.VirtualRealmAddress = data.ReadUInt32();
|
senderRealm.Realm = data.ReadUInt32();
|
||||||
senderRealm.field_4 = data.ReadUInt16();
|
senderRealm.Server = data.ReadUInt16();
|
||||||
senderRealm.field_6 = data.ReadUInt8();
|
senderRealm.Type = data.ReadUInt8();
|
||||||
RealmAddress = senderRealm;
|
WorldServer = senderRealm;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasSlashCmd)
|
if (hasSlashCmd)
|
||||||
SlashCmd = data.ReadInt32();
|
Cmd = data.ReadInt32();
|
||||||
|
|
||||||
Text = data.ReadString(textLength);
|
Text = data.ReadString(textLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct SenderRealm
|
public struct ServerSpec
|
||||||
{
|
{
|
||||||
public uint VirtualRealmAddress;
|
public uint Realm;
|
||||||
public ushort field_4;
|
public ushort Server;
|
||||||
public byte field_6;
|
public byte Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long Timestamp;
|
public long Timestamp;
|
||||||
public ObjectGuid AuthorGUID;
|
public ObjectGuid PlayerGuid;
|
||||||
public ulong? ClubID;
|
public ulong? ClubID;
|
||||||
public ObjectGuid? ChannelGUID;
|
public ObjectGuid? ChannelGuid;
|
||||||
public SenderRealm? RealmAddress;
|
public ServerSpec? WorldServer;
|
||||||
public int? SlashCmd;
|
public int? Cmd;
|
||||||
public string Text;
|
public string Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user