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