From 447c2226650bb06d90353f303d5bca4a22e08d79 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 17 Nov 2024 13:07:52 -0500 Subject: [PATCH] Core/PacketIO: Named a bunch of unknown/unused fields Port From (https://github.com/TrinityCore/TrinityCore/commit/806611075659ddde60f3003763e442a46d70f993) --- .../Framework/Constants/AreaTriggerConst.cs | 4 +- Source/Game/Achievements/CriteriaHandler.cs | 2 +- Source/Game/AuctionHouse/AuctionManager.cs | 8 +- Source/Game/Chat/Commands/LookupCommands.cs | 6 +- Source/Game/Conditions/ConditionManager.cs | 2 +- Source/Game/DungeonFinding/LFGManager.cs | 2 +- .../Game/Entities/AreaTrigger/AreaTrigger.cs | 4 +- Source/Game/Entities/GameObject/GameObject.cs | 6 +- Source/Game/Entities/Item/Item.cs | 2 +- Source/Game/Entities/Item/ItemBonusManager.cs | 2 +- .../Entities/Object/Update/UpdateFields.cs | 26 +- Source/Game/Entities/Object/WorldObject.cs | 8 +- Source/Game/Entities/Player/Player.Items.cs | 10 +- Source/Game/Entities/Player/Player.Quest.cs | 10 +- Source/Game/Entities/Player/Player.cs | 4 +- Source/Game/Handlers/AuthenticationHandler.cs | 4 +- Source/Game/Handlers/CharacterHandler.cs | 19 +- Source/Game/Handlers/LFGHandler.cs | 4 +- Source/Game/Handlers/TokenHandler.cs | 8 +- Source/Game/Movement/MoveSplineInit.cs | 2 +- .../Networking/Packets/AchievementPackets.cs | 28 +- .../Networking/Packets/AuctionHousePackets.cs | 20 +- .../Packets/AuthenticationPackets.cs | 23 +- .../Networking/Packets/BattleGroundPackets.cs | 32 +-- .../Networking/Packets/CalendarPackets.cs | 20 +- .../Networking/Packets/CharacterPackets.cs | 76 ++--- Source/Game/Networking/Packets/ChatPackets.cs | 16 +- .../Game/Networking/Packets/GuildPackets.cs | 12 +- .../Game/Networking/Packets/InspectPackets.cs | 50 ++-- Source/Game/Networking/Packets/ItemPackets.cs | 20 +- Source/Game/Networking/Packets/LFGPackets.cs | 38 +-- Source/Game/Networking/Packets/MiscPackets.cs | 4 +- .../Networking/Packets/MovementPackets.cs | 10 +- .../Game/Networking/Packets/PartyPackets.cs | 33 ++- .../Networking/Packets/PetitionPackets.cs | 4 +- .../Game/Networking/Packets/QueryPackets.cs | 34 +-- .../Networking/Packets/ScenarioPackets.cs | 8 +- .../Game/Networking/Packets/SpellPackets.cs | 20 +- .../Game/Networking/Packets/SystemPackets.cs | 269 +++++++++--------- .../Game/Networking/Packets/TicketPackets.cs | 141 +++++---- .../Game/Networking/Packets/TokenPackets.cs | 50 ++-- 41 files changed, 525 insertions(+), 516 deletions(-) diff --git a/Source/Framework/Constants/AreaTriggerConst.cs b/Source/Framework/Constants/AreaTriggerConst.cs index 61d6c7f9c..d3454c2e1 100644 --- a/Source/Framework/Constants/AreaTriggerConst.cs +++ b/Source/Framework/Constants/AreaTriggerConst.cs @@ -36,10 +36,10 @@ namespace Framework.Constants HasAttached = 0x04, HasFaceMovementDir = 0x08, HasFollowsTerrain = 0x10, // NYI - Unk1 = 0x20, + AlwaysExterior = 0x20, HasTargetRollPitchYaw = 0x40, // NYI HasAnimId = 0x80, // DEPRECATED - Unk3 = 0x100, + VisualAnimIsDecay = 0x100, HasAnimKitId = 0x200, // DEPRECATED HasCircularMovement = 0x400, // DEPRECATED Unk5 = 0x800, diff --git a/Source/Game/Achievements/CriteriaHandler.cs b/Source/Game/Achievements/CriteriaHandler.cs index 6bc33d9a5..37c0f7223 100644 --- a/Source/Game/Achievements/CriteriaHandler.cs +++ b/Source/Game/Achievements/CriteriaHandler.cs @@ -3381,7 +3381,7 @@ namespace Game.Achievements return (referencePlayer.m_activePlayerData.RuneforgePowers[block] & (1u << (int)bit)) != 0; } case ModifierTreeType.PlayerInChromieTimeForScaling: // 304 - if ((referencePlayer.m_playerData.CtrOptions._value.ContentTuningConditionMask & 1) == 0) + if ((referencePlayer.m_playerData.CtrOptions._value.ConditionalFlags & 1) == 0) return false; break; case ModifierTreeType.IsRaFRecruit: // 305 diff --git a/Source/Game/AuctionHouse/AuctionManager.cs b/Source/Game/AuctionHouse/AuctionManager.cs index 2961a2a63..4e1a7ac91 100644 --- a/Source/Game/AuctionHouse/AuctionManager.cs +++ b/Source/Game/AuctionHouse/AuctionManager.cs @@ -1831,6 +1831,10 @@ namespace Game bucketInfo.MaxBattlePetQuality = bucketInfo.MaxBattlePetQuality.HasValue ? Math.Max(bucketInfo.MaxBattlePetQuality.Value, quality) : quality; bucketInfo.MaxBattlePetLevel = bucketInfo.MaxBattlePetLevel.HasValue ? Math.Max(bucketInfo.MaxBattlePetLevel.Value, level) : level; bucketInfo.BattlePetBreedID = (byte)breedId; + if (bucketInfo.BattlePetLevelMask.HasValue) + bucketInfo.BattlePetLevelMask = 0; + + bucketInfo.BattlePetLevelMask = bucketInfo.BattlePetLevelMask | 1u << (level - 1); } } @@ -1933,8 +1937,8 @@ namespace Game { ItemId = key.ItemID; ItemLevel = key.ItemLevel; - BattlePetSpeciesId = (ushort)(key.BattlePetSpeciesID.HasValue ? key.BattlePetSpeciesID.Value : 0); - SuffixItemNameDescriptionId = (ushort)(key.SuffixItemNameDescriptionID.HasValue ? key.SuffixItemNameDescriptionID.Value : 0); + BattlePetSpeciesId = key.BattlePetSpeciesID.GetValueOrDefault(0); + SuffixItemNameDescriptionId = key.ItemSuffix.GetValueOrDefault(0); } public int CompareTo(AuctionsBucketKey other) diff --git a/Source/Game/Chat/Commands/LookupCommands.cs b/Source/Game/Chat/Commands/LookupCommands.cs index 90ea441e4..42e2fc626 100644 --- a/Source/Game/Chat/Commands/LookupCommands.cs +++ b/Source/Game/Chat/Commands/LookupCommands.cs @@ -1025,7 +1025,7 @@ namespace Game.Chat if (handler.GetSession() != null) { int maxLevel = 0; - var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ConditionalFlags); if (questLevels.HasValue) maxLevel = questLevels.Value.MaxLevel; @@ -1088,7 +1088,7 @@ namespace Game.Chat if (handler.GetSession() != null) { int maxLevel = 0; - var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ConditionalFlags); if (questLevels.HasValue) maxLevel = questLevels.Value.MaxLevel; @@ -1156,7 +1156,7 @@ namespace Game.Chat if (handler.GetSession() != null) { int maxLevel = 0; - var questLevels = Global.DB2Mgr.GetContentTuningData(quest.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var questLevels = Global.DB2Mgr.GetContentTuningData(quest.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ConditionalFlags); if (questLevels.HasValue) maxLevel = questLevels.Value.MaxLevel; diff --git a/Source/Game/Conditions/ConditionManager.cs b/Source/Game/Conditions/ConditionManager.cs index 395454e4f..99ff77ae0 100644 --- a/Source/Game/Conditions/ConditionManager.cs +++ b/Source/Game/Conditions/ConditionManager.cs @@ -1859,7 +1859,7 @@ namespace Game public static bool IsPlayerMeetingCondition(Player player, PlayerConditionRecord condition) { - ContentTuningLevels? levels = Global.DB2Mgr.GetContentTuningData(condition.ContentTuningID, player.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + ContentTuningLevels? levels = Global.DB2Mgr.GetContentTuningData(condition.ContentTuningID, player.m_playerData.CtrOptions.GetValue().ConditionalFlags); if (levels.HasValue) { byte minLevel = (byte)(condition.Flags.HasAnyFlag(0x800) ? levels.Value.MinLevelWithDelta : levels.Value.MinLevel); diff --git a/Source/Game/DungeonFinding/LFGManager.cs b/Source/Game/DungeonFinding/LFGManager.cs index 1bf13ce4a..11a0716e1 100644 --- a/Source/Game/DungeonFinding/LFGManager.cs +++ b/Source/Game/DungeonFinding/LFGManager.cs @@ -1663,7 +1663,7 @@ namespace Game.DungeonFinding } else { - var levels = Global.DB2Mgr.GetContentTuningData(dungeon.contentTuningId, player.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var levels = Global.DB2Mgr.GetContentTuningData(dungeon.contentTuningId, player.m_playerData.CtrOptions.GetValue().ConditionalFlags); if (levels.HasValue) { if (levels.Value.MinLevel > level) diff --git a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs index 22661b89b..daa5b393a 100644 --- a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs +++ b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs @@ -176,8 +176,8 @@ namespace Game.Entities VisualAnim visualAnim = areaTriggerData.ModifyValue(m_areaTriggerData.VisualAnim); SetUpdateFieldValue(visualAnim.ModifyValue(visualAnim.AnimationDataID), GetCreateProperties().AnimId); SetUpdateFieldValue(visualAnim.ModifyValue(visualAnim.AnimKitID), GetCreateProperties().AnimKitId); - if (GetCreateProperties() != null && GetCreateProperties().Flags.HasFlag(AreaTriggerCreatePropertiesFlag.Unk3)) - SetUpdateFieldValue(visualAnim.ModifyValue(visualAnim.Field_C), true); + if (GetCreateProperties() != null && GetCreateProperties().Flags.HasFlag(AreaTriggerCreatePropertiesFlag.VisualAnimIsDecay)) + SetUpdateFieldValue(visualAnim.ModifyValue(visualAnim.IsDecay), true); if (caster != null) PhasingHandler.InheritPhaseShift(this, caster); diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index 598847de3..692d269db 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -2267,12 +2267,12 @@ namespace Game.Entities return; //required lvl checks! - var userLevels = Global.DB2Mgr.GetContentTuningData(info.ContentTuningId, player.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var userLevels = Global.DB2Mgr.GetContentTuningData(info.ContentTuningId, player.m_playerData.CtrOptions.GetValue().ConditionalFlags); if (userLevels.HasValue) if (player.GetLevel() < userLevels.Value.MaxLevel) return; - var targetLevels = Global.DB2Mgr.GetContentTuningData(info.ContentTuningId, targetPlayer.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var targetLevels = Global.DB2Mgr.GetContentTuningData(info.ContentTuningId, targetPlayer.m_playerData.CtrOptions.GetValue().ConditionalFlags); if (targetLevels.HasValue) if (targetPlayer.GetLevel() < targetLevels.Value.MaxLevel) return; @@ -3826,7 +3826,7 @@ namespace Game.Entities Player player = target.ToPlayer(); if (player != null) { - var userLevels = Global.DB2Mgr.GetContentTuningData(GetGoInfo().ContentTuningId, player.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var userLevels = Global.DB2Mgr.GetContentTuningData(GetGoInfo().ContentTuningId, player.m_playerData.CtrOptions.GetValue().ConditionalFlags); if (userLevels.HasValue) return (byte)Math.Clamp(player.GetLevel(), userLevels.Value.MinLevel, userLevels.Value.MaxLevel); } diff --git a/Source/Game/Entities/Item/Item.cs b/Source/Game/Entities/Item/Item.cs index 5d3d8067e..3c499c695 100644 --- a/Source/Game/Entities/Item/Item.cs +++ b/Source/Game/Entities/Item/Item.cs @@ -2436,7 +2436,7 @@ namespace Game.Entities { uint maxLevel = (uint)Global.DB2Mgr.GetCurveXAxisRange(item.GetBonus().PlayerLevelToItemLevelCurveId).Item2; - var contentTuning = Global.DB2Mgr.GetContentTuningData(item.GetBonus().ContentTuningId, player.m_playerData.CtrOptions._value.ContentTuningConditionMask, true); + var contentTuning = Global.DB2Mgr.GetContentTuningData(item.GetBonus().ContentTuningId, player.m_playerData.CtrOptions._value.ConditionalFlags, true); if (contentTuning.HasValue) maxLevel = Math.Min(maxLevel, (uint)contentTuning.Value.MaxLevel); diff --git a/Source/Game/Entities/Item/ItemBonusManager.cs b/Source/Game/Entities/Item/ItemBonusManager.cs index a8042576f..ecef1c295 100644 --- a/Source/Game/Entities/Item/ItemBonusManager.cs +++ b/Source/Game/Entities/Item/ItemBonusManager.cs @@ -71,7 +71,7 @@ namespace Game.Entities if (mapDifficulty.ItemContextPickerID != 0) { - uint contentTuningId = Global.DB2Mgr.GetRedirectedContentTuningId((uint)mapDifficulty.ContentTuningID, player.m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + uint contentTuningId = Global.DB2Mgr.GetRedirectedContentTuningId((uint)mapDifficulty.ContentTuningID, player.m_playerData.CtrOptions.GetValue().ConditionalFlags); ItemContextPickerEntryRecord selectedPickerEntry = null; foreach (var itemContextPickerEntry in CliDB.ItemContextPickerEntryStorage.Values) diff --git a/Source/Game/Entities/Object/Update/UpdateFields.cs b/Source/Game/Entities/Object/Update/UpdateFields.cs index 321d6b827..679c851bd 100644 --- a/Source/Game/Entities/Object/Update/UpdateFields.cs +++ b/Source/Game/Entities/Object/Update/UpdateFields.cs @@ -2748,22 +2748,22 @@ namespace Game.Entities public class CTROptions { - public uint ContentTuningConditionMask; - public uint Field_4; - public uint ExpansionLevelMask; + public uint ConditionalFlags; + public uint FactionGroup; + public uint ChromieTimeExpansionMask; public void WriteCreate(WorldPacket data, Player owner, Player receiver) { - data.WriteUInt32(ContentTuningConditionMask); - data.WriteUInt32(Field_4); - data.WriteUInt32(ExpansionLevelMask); + data.WriteUInt32(ConditionalFlags); + data.WriteUInt32(FactionGroup); + data.WriteUInt32(ChromieTimeExpansionMask); } public void WriteUpdate(WorldPacket data, bool ignoreChangesMask, Player owner, Player receiver) { - data.WriteUInt32(ContentTuningConditionMask); - data.WriteUInt32(Field_4); - data.WriteUInt32(ExpansionLevelMask); + data.WriteUInt32(ConditionalFlags); + data.WriteUInt32(FactionGroup); + data.WriteUInt32(ChromieTimeExpansionMask); } } @@ -8050,7 +8050,7 @@ namespace Game.Entities public class VisualAnim : HasChangesMask { - public UpdateField Field_C = new(0, 1); + public UpdateField IsDecay = new(0, 1); public UpdateField AnimationDataID = new(0, 2); public UpdateField AnimKitID = new(0, 3); public UpdateField AnimProgress = new(0, 4); @@ -8062,7 +8062,7 @@ namespace Game.Entities data.WriteInt32(AnimationDataID); data.WriteUInt32(AnimKitID); data.WriteUInt32(AnimProgress); - data.WriteBit(Field_C); + data.WriteBit(IsDecay); data.FlushBits(); } @@ -8078,7 +8078,7 @@ namespace Game.Entities { if (changesMask[1]) { - data.WriteBit(Field_C); + data.WriteBit(IsDecay); } } data.FlushBits(); @@ -8102,7 +8102,7 @@ namespace Game.Entities public override void ClearChangesMask() { - ClearChangesMask(Field_C); + ClearChangesMask(IsDecay); ClearChangesMask(AnimationDataID); ClearChangesMask(AnimKitID); ClearChangesMask(AnimProgress); diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 7efd0a89a..053948119 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -552,7 +552,7 @@ namespace Game.Entities bool hasAttached = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.HasAttached); bool hasFaceMovementDir = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.HasFaceMovementDir); bool hasFollowsTerrain = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.HasFollowsTerrain); - bool hasUnk1 = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.Unk1); + bool hasAlwaysExterior = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.AlwaysExterior); bool hasUnknown1025 = false; bool hasTargetRollPitchYaw = createProperties != null && createProperties.Flags.HasFlag(AreaTriggerCreatePropertiesFlag.HasTargetRollPitchYaw); bool hasScaleCurveID = createProperties != null && createProperties.ScaleCurveId != 0; @@ -569,7 +569,7 @@ namespace Game.Entities data.WriteBit(hasAttached); data.WriteBit(hasFaceMovementDir); data.WriteBit(hasFollowsTerrain); - data.WriteBit(hasUnk1); + data.WriteBit(hasAlwaysExterior); data.WriteBit(hasUnknown1025); data.WriteBit(hasTargetRollPitchYaw); data.WriteBit(hasScaleCurveID); @@ -4052,7 +4052,7 @@ namespace Game.Entities public uint TransportID; public float Magnitude; public MovementForceType Type; - public int Unused910; + public int MovementForceID; public void Read(WorldPacket data) { @@ -4061,7 +4061,7 @@ namespace Game.Entities Direction = data.ReadVector3(); TransportID = data.ReadUInt32(); Magnitude = data.ReadFloat(); - Unused910 = data.ReadInt32(); + MovementForceID = data.ReadInt32(); Type = (MovementForceType)data.ReadBits(2); } diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index d98141400..bc36ec23c 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -2444,7 +2444,7 @@ namespace Game.Entities packet.Item = new ItemInstance(item); - packet.QuestLogItemID = item.GetTemplate().QuestLogItemId; + packet.ProxyItemID = item.GetTemplate().QuestLogItemId; packet.Quantity = quantity; packet.QuantityInInventory = GetItemCount(item.GetEntry()); @@ -2460,15 +2460,15 @@ namespace Game.Entities packet.ItemGUID = item.GetGUID(); packet.Pushed = pushed; - packet.DisplayText = ItemPushResult.DisplayType.Normal; + packet.ChatNotifyType = ItemPushResult.DisplayType.Normal; packet.Created = created; //packet.IsBonusRoll; if (dungeonEncounterId != 0) { - packet.DisplayText = ItemPushResult.DisplayType.EncounterLoot; - packet.DungeonEncounterID = (int)dungeonEncounterId; - packet.IsEncounterLoot = true; + packet.ChatNotifyType = ItemPushResult.DisplayType.EncounterLoot; + packet.EncounterID = (int)dungeonEncounterId; + packet.IsPersonalLoot = true; } if (broadcast && GetGroup() != null && !item.GetTemplate().HasFlag(ItemFlags3.DontReportLootLogToParty)) diff --git a/Source/Game/Entities/Player/Player.Quest.cs b/Source/Game/Entities/Player/Player.Quest.cs index cd67abe76..59bbce734 100644 --- a/Source/Game/Entities/Player/Player.Quest.cs +++ b/Source/Game/Entities/Player/Player.Quest.cs @@ -41,7 +41,7 @@ namespace Game.Entities int GetQuestMinLevel(uint contentTuningId) { - var questLevels = Global.DB2Mgr.GetContentTuningData(contentTuningId, m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var questLevels = Global.DB2Mgr.GetContentTuningData(contentTuningId, m_playerData.CtrOptions.GetValue().ConditionalFlags); if (questLevels.HasValue) { ChrRacesRecord race = CliDB.ChrRacesStorage.LookupByKey(GetRace()); @@ -65,7 +65,7 @@ namespace Game.Entities public int GetQuestLevel(uint contentTuningId) { - var questLevels = Global.DB2Mgr.GetContentTuningData(contentTuningId, m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var questLevels = Global.DB2Mgr.GetContentTuningData(contentTuningId, m_playerData.CtrOptions.GetValue().ConditionalFlags); if (questLevels.HasValue) { int minLevel = GetQuestMinLevel(contentTuningId); @@ -3269,11 +3269,11 @@ namespace Game.Entities packet.Slot = InventorySlots.Bag0; packet.SlotInBag = 0; packet.Item.ItemID = itemTemplate.GetId(); - packet.QuestLogItemID = itemTemplate.QuestLogItemId; + packet.ProxyItemID = itemTemplate.QuestLogItemId; packet.Quantity = count; packet.QuantityInInventory = (uint)GetQuestObjectiveData(obj); - packet.DisplayText = ItemPushResult.DisplayType.EncounterLoot; - packet.Unused_1017 = true; + packet.ChatNotifyType = ItemPushResult.DisplayType.EncounterLoot; + packet.FakeQuestItem = true; if (GetGroup() != null && !itemTemplate.HasFlag(ItemFlags3.DontReportLootLogToParty)) GetGroup().BroadcastPacket(packet, true); diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 6fb6e9e43..446620e13 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -1871,7 +1871,7 @@ namespace Game.Entities LFGDungeonsRecord dungeon = DB2Mgr.GetLfgDungeon(map.GetId(), map.GetDifficultyID()); if (dungeon != null) { - var dungeonLevels = DB2Mgr.GetContentTuningData(dungeon.ContentTuningID, m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var dungeonLevels = DB2Mgr.GetContentTuningData(dungeon.ContentTuningID, m_playerData.CtrOptions.GetValue().ConditionalFlags); if (dungeonLevels.HasValue) if (dungeonLevels.Value.TargetLevelMax == ObjectMgr.GetMaxLevelForExpansion(Expansion.WrathOfTheLichKing)) ChampioningFaction = GetChampioningFaction(); @@ -6492,7 +6492,7 @@ namespace Game.Entities UpdateCriteria(CriteriaType.RevealWorldMapOverlay, GetAreaId()); - var areaLevels = DB2Mgr.GetContentTuningData(areaEntry.ContentTuningID, m_playerData.CtrOptions.GetValue().ContentTuningConditionMask); + var areaLevels = DB2Mgr.GetContentTuningData(areaEntry.ContentTuningID, m_playerData.CtrOptions.GetValue().ConditionalFlags); if (areaLevels.HasValue) { if (IsMaxLevel()) diff --git a/Source/Game/Handlers/AuthenticationHandler.cs b/Source/Game/Handlers/AuthenticationHandler.cs index 3740d53c3..46aabb302 100644 --- a/Source/Game/Handlers/AuthenticationHandler.cs +++ b/Source/Game/Handlers/AuthenticationHandler.cs @@ -79,7 +79,7 @@ namespace Game SetTimeZoneInformation packet = new(); packet.ServerTimeTZ = clientSupportedTZ; packet.GameTimeTZ = clientSupportedTZ; - packet.ServerRegionalTZ = clientSupportedTZ; + packet.ServerRegionalTimeTZ = clientSupportedTZ; SendPacket(packet);//enabled it } @@ -91,7 +91,7 @@ namespace Game features.BpayStoreDisabledByParentalControls = false; features.CharUndeleteEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemCharacterUndeleteEnabled); features.BpayStoreEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemBpayStoreEnabled); - features.MaxCharactersPerRealm = WorldConfig.GetIntValue(WorldCfg.CharactersPerRealm); + features.MaxCharactersOnThisRealm = WorldConfig.GetIntValue(WorldCfg.CharactersPerRealm); features.MinimumExpansionLevel = (int)Expansion.Classic; features.MaximumExpansionLevel = WorldConfig.GetIntValue(WorldCfg.Expansion); diff --git a/Source/Game/Handlers/CharacterHandler.cs b/Source/Game/Handlers/CharacterHandler.cs index 211e7791f..e1cf69b97 100644 --- a/Source/Game/Handlers/CharacterHandler.cs +++ b/Source/Game/Handlers/CharacterHandler.cs @@ -46,7 +46,7 @@ namespace Game EnumCharactersResult charResult = new(); charResult.Success = true; charResult.IsDeletedCharacters = holder.IsDeletedCharacters(); - charResult.DisabledClassesMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask); + charResult.ClassDisableMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask); if (!charResult.IsDeletedCharacters) _legitCharacters.Clear(); @@ -116,8 +116,8 @@ namespace Game { EnumCharactersResult.RaceUnlock raceUnlock = new(); raceUnlock.RaceID = requirement.Key; - raceUnlock.HasExpansion = (byte)GetAccountExpansion() >= requirement.Value.Expansion; - raceUnlock.HasAchievement = requirement.Value.AchievementId != 0 && (WorldConfig.GetBoolValue(WorldCfg.CharacterCreatingDisableAlliedRaceAchievementRequirement) + raceUnlock.HasUnlockedLicense = (byte)GetAccountExpansion() >= requirement.Value.Expansion; + raceUnlock.HasUnlockedAchievement = requirement.Value.AchievementId != 0 && (WorldConfig.GetBoolValue(WorldCfg.CharacterCreatingDisableAlliedRaceAchievementRequirement) /* || HasAccountAchievement(requirement.second.AchievementId)*/); charResult.RaceUnlockData.Add(raceUnlock); } @@ -144,7 +144,7 @@ namespace Game EnumCharactersResult charEnum = new(); charEnum.Success = true; charEnum.IsDeletedCharacters = true; - charEnum.DisabledClassesMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask); + charEnum.ClassDisableMask = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledClassmask); if (!result.IsEmpty()) { @@ -1126,7 +1126,7 @@ namespace Game features.ComplaintStatus = (byte)ComplaintStatus.EnabledWithAutoIgnore; features.CfgRealmID = 2; features.CfgRealmRecID = 0; - features.TokenPollTimeSeconds = 300; + features.CommercePricePollTimeSeconds = 300; features.VoiceEnabled = false; features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened @@ -1135,7 +1135,7 @@ namespace Game europaTicketSystemStatus.ThrottleState.PerMilliseconds = 60000; europaTicketSystemStatus.ThrottleState.TryCount = 1; europaTicketSystemStatus.ThrottleState.LastResetTimeBeforeNow = 111111; - features.TutorialsEnabled = true; + features.TutorialEnabled = true; features.NPETutorialsEnabled = true; // END OF DUMMY VALUES @@ -1148,11 +1148,10 @@ namespace Game features.CharUndeleteEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemCharacterUndeleteEnabled); features.BpayStoreEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemBpayStoreEnabled); - features.WarModeFeatureEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemWarModeEnabled); - features.IsMuted = !CanSpeak(); + features.WarModeEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemWarModeEnabled); + features.IsChatMuted = !CanSpeak(); - - features.TextToSpeechFeatureEnabled = false; + features.SpeakForMeAllowed = false; SendPacket(features); } diff --git a/Source/Game/Handlers/LFGHandler.cs b/Source/Game/Handlers/LFGHandler.cs index 423c0cc31..5e90e10e7 100644 --- a/Source/Game/Handlers/LFGHandler.cs +++ b/Source/Game/Handlers/LFGHandler.cs @@ -130,7 +130,7 @@ namespace Game { // Get Random dungeons that can be done at a certain level and expansion uint level = GetPlayer().GetLevel(); - uint contentTuningReplacementConditionMask = GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask; + uint contentTuningReplacementConditionMask = GetPlayer().m_playerData.CtrOptions.GetValue().ConditionalFlags; var randomDungeons = Global.LFGMgr.GetRandomAndSeasonalDungeons(level, (uint)GetExpansion(), contentTuningReplacementConditionMask); LfgPlayerInfo lfgPlayerInfo = new(); @@ -475,7 +475,7 @@ namespace Game lfgProposalUpdate.CompletedMask = proposal.encounters; lfgProposalUpdate.ValidCompletedMask = true; lfgProposalUpdate.ProposalSilent = silent; - lfgProposalUpdate.IsRequeue = !proposal.isNew; + lfgProposalUpdate.FailedByMyParty = !proposal.isNew; foreach (var pair in proposal.players) { diff --git a/Source/Game/Handlers/TokenHandler.cs b/Source/Game/Handlers/TokenHandler.cs index a6dcc398d..1fe2aa8ef 100644 --- a/Source/Game/Handlers/TokenHandler.cs +++ b/Source/Game/Handlers/TokenHandler.cs @@ -15,7 +15,7 @@ namespace Game CommerceTokenGetLogResponse response = new(); // @todo: fix 6.x implementation - response.UnkInt = commerceTokenGetLog.UnkInt; + response.ClientToken = commerceTokenGetLog.ClientToken; response.Result = TokenResult.Success; SendPacket(response); @@ -27,9 +27,9 @@ namespace Game CommerceTokenGetMarketPriceResponse response = new(); // @todo: 6.x fix implementation - response.CurrentMarketPrice = 300000000; - response.UnkInt = commerceTokenGetMarketPrice.UnkInt; - response.Result = TokenResult.Success; + response.PriceGuarantee = 300000000; + response.ClientToken = commerceTokenGetMarketPrice.ClientToken; + response.ServerToken = TokenResult.Success; //packet.ReadUInt32("UnkInt32"); SendPacket(response); diff --git a/Source/Game/Movement/MoveSplineInit.cs b/Source/Game/Movement/MoveSplineInit.cs index 45fac84ac..d80cbbf02 100644 --- a/Source/Game/Movement/MoveSplineInit.cs +++ b/Source/Game/Movement/MoveSplineInit.cs @@ -184,7 +184,7 @@ namespace Game.Movement MonsterMove packet = new(); packet.MoverGUID = unit.GetGUID(); packet.Pos = new Vector3(loc.X, loc.Y, loc.Z); - packet.SplineData.StopDistanceTolerance = 2; + packet.SplineData.StopSplineStyle = 2; packet.SplineData.Id = move_spline.GetId(); if (transport) diff --git a/Source/Game/Networking/Packets/AchievementPackets.cs b/Source/Game/Networking/Packets/AchievementPackets.cs index 3d797d983..3bb271a1c 100644 --- a/Source/Game/Networking/Packets/AchievementPackets.cs +++ b/Source/Game/Networking/Packets/AchievementPackets.cs @@ -58,27 +58,27 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(CriteriaID); _worldPacket.WriteUInt64(Quantity); _worldPacket.WritePackedGuid(PlayerGUID); - _worldPacket.WriteUInt32(Unused_10_1_5); _worldPacket.WriteUInt32(Flags); + _worldPacket.WriteUInt32(StateFlags); CurrentTime.Write(_worldPacket); _worldPacket.WriteInt64(ElapsedTime); _worldPacket.WriteInt64(CreationTime); - _worldPacket.WriteBit(RafAcceptanceID.HasValue); + _worldPacket.WriteBit(DynamicID.HasValue); _worldPacket.FlushBits(); - if (RafAcceptanceID.HasValue) - _worldPacket.WriteUInt64(RafAcceptanceID.Value); + if (DynamicID.HasValue) + _worldPacket.WriteUInt64(DynamicID.Value); } public uint CriteriaID; public ulong Quantity; public ObjectGuid PlayerGUID; - public uint Unused_10_1_5; + public uint StateFlags; public uint Flags; public WowTime CurrentTime; public long ElapsedTime; public long CreationTime; - public ulong? RafAcceptanceID; + public ulong? DynamicID; } class AccountCriteriaUpdate : ServerPacket @@ -180,8 +180,8 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(0); // this is a hack. this is a packed time written as int64 (progress.DateUpdated) _worldPacket.WriteUInt64(progress.Quantity); _worldPacket.WritePackedGuid(progress.PlayerGUID); - _worldPacket.WriteInt32(progress.Unused_10_1_5); _worldPacket.WriteInt32(progress.Flags); + _worldPacket.WriteInt32(progress.StateFlags); } } @@ -321,27 +321,27 @@ namespace Game.Networking.Packets data.WriteUInt32(Id); data.WriteUInt64(Quantity); data.WritePackedGuid(Player); - data.WriteUInt32(Unused_10_1_5); data.WriteUInt32(Flags); + data.WriteUInt32(StateFlags); Date.Write(data); data.WriteInt64(TimeFromStart); data.WriteInt64(TimeFromCreate); - data.WriteBit(RafAcceptanceID.HasValue); + data.WriteBit(DynamicID.HasValue); data.FlushBits(); - if (RafAcceptanceID.HasValue) - data.WriteUInt64(RafAcceptanceID.Value); + if (DynamicID.HasValue) + data.WriteUInt64(DynamicID.Value); } public uint Id; public ulong Quantity; public ObjectGuid Player; - public uint Unused_10_1_5; + public uint StateFlags; public uint Flags; public WowTime Date; public long TimeFromStart; public long TimeFromCreate; - public ulong? RafAcceptanceID; + public ulong? DynamicID; } public struct GuildCriteriaProgress @@ -352,8 +352,8 @@ namespace Game.Networking.Packets public WowTime DateUpdated; public ulong Quantity; public ObjectGuid PlayerGUID; - public int Unused_10_1_5; public int Flags; + public int StateFlags; } public class AllAchievements diff --git a/Source/Game/Networking/Packets/AuctionHousePackets.cs b/Source/Game/Networking/Packets/AuctionHousePackets.cs index 322b652dd..9acc0997d 100644 --- a/Source/Game/Networking/Packets/AuctionHousePackets.cs +++ b/Source/Game/Networking/Packets/AuctionHousePackets.cs @@ -722,7 +722,7 @@ namespace Game.Networking.Packets public uint ItemID; public ushort ItemLevel; public ushort? BattlePetSpeciesID; - public ushort? SuffixItemNameDescriptionID; + public ushort? ItemSuffix; public AuctionBucketKey() { } @@ -735,7 +735,7 @@ namespace Game.Networking.Packets BattlePetSpeciesID = key.BattlePetSpeciesId; if (key.SuffixItemNameDescriptionId != 0) - SuffixItemNameDescriptionID = key.SuffixItemNameDescriptionId; + ItemSuffix = key.SuffixItemNameDescriptionId; } public AuctionBucketKey(WorldPacket data) @@ -750,7 +750,7 @@ namespace Game.Networking.Packets BattlePetSpeciesID = data.ReadUInt16(); if (hasSuffixItemNameDescriptionId) - SuffixItemNameDescriptionID = data.ReadUInt16(); + ItemSuffix = data.ReadUInt16(); } public void Write(WorldPacket data) @@ -758,14 +758,14 @@ namespace Game.Networking.Packets data.WriteBits(ItemID, 20); data.WriteBit(BattlePetSpeciesID.HasValue); data.WriteBits(ItemLevel, 11); - data.WriteBit(SuffixItemNameDescriptionID.HasValue); + data.WriteBit(ItemSuffix.HasValue); data.FlushBits(); if (BattlePetSpeciesID.HasValue) data.WriteUInt16(BattlePetSpeciesID.Value); - if (SuffixItemNameDescriptionID.HasValue) - data.WriteUInt16(SuffixItemNameDescriptionID.Value); + if (ItemSuffix.HasValue) + data.WriteUInt16(ItemSuffix.Value); } } @@ -885,7 +885,7 @@ namespace Game.Networking.Packets public byte? MaxBattlePetQuality; public byte? MaxBattlePetLevel; public byte? BattlePetBreedID; - public uint? Unk901_1; + public uint? BattlePetLevelMask; public bool ContainsOwnerItem; public bool ContainsOnlyCollectedAppearances; @@ -905,7 +905,7 @@ namespace Game.Networking.Packets data.WriteBit(MaxBattlePetQuality.HasValue); data.WriteBit(MaxBattlePetLevel.HasValue); data.WriteBit(BattlePetBreedID.HasValue); - data.WriteBit(Unk901_1.HasValue); + data.WriteBit(BattlePetLevelMask.HasValue); data.WriteBit(ContainsOwnerItem); data.WriteBit(ContainsOnlyCollectedAppearances); data.FlushBits(); @@ -919,8 +919,8 @@ namespace Game.Networking.Packets if (BattlePetBreedID.HasValue) data.WriteUInt8(BattlePetBreedID.Value); - if (Unk901_1.HasValue) - data.WriteUInt32(Unk901_1.Value); + if (BattlePetLevelMask.HasValue) + data.WriteUInt32(BattlePetLevelMask.Value); } } diff --git a/Source/Game/Networking/Packets/AuthenticationPackets.cs b/Source/Game/Networking/Packets/AuthenticationPackets.cs index fe5065b66..937d8ddb8 100644 --- a/Source/Game/Networking/Packets/AuthenticationPackets.cs +++ b/Source/Game/Networking/Packets/AuthenticationPackets.cs @@ -137,13 +137,12 @@ namespace Game.Networking.Packets _worldPacket.FlushBits(); { - _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.BillingPlan); - _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.TimeRemain); - _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.Unknown735); - // 3x same bit is not a mistake - preserves legacy client behavior of BillingPlanFlags::SESSION_IGR - _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.InGameRoom); // inGameRoom check in function checking which lua event to fire when remaining time is near end - BILLING_NAG_DIALOG vs IGR_BILLING_NAG_DIALOG - _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.InGameRoom); // inGameRoom lua return from Script_GetBillingPlan - _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.InGameRoom); // not used anywhere in the client + _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.BillingType); + _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.MinutesRemaining); + _worldPacket.WriteUInt32(SuccessInfo.GameTimeInfo.RealBillingType); + _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.IsInIGR); // inGameRoom check in function checking which lua event to fire when remaining time is near end - BILLING_NAG_DIALOG vs IGR_BILLING_NAG_DIALOG + _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.IsPaidForByIGR); // inGameRoom lua return from Script_GetBillingPlan + _worldPacket.WriteBit(SuccessInfo.GameTimeInfo.IsCAISEnabled); // not used anywhere in the client _worldPacket.FlushBits(); } @@ -222,10 +221,12 @@ namespace Game.Networking.Packets public struct GameTime { - public uint BillingPlan; - public uint TimeRemain; - public uint Unknown735; - public bool InGameRoom; + public uint BillingType; + public uint MinutesRemaining; + public uint RealBillingType; + public bool IsInIGR; + public bool IsPaidForByIGR; + public bool IsCAISEnabled; } public class NewBuild diff --git a/Source/Game/Networking/Packets/BattleGroundPackets.cs b/Source/Game/Networking/Packets/BattleGroundPackets.cs index be8e3f557..5e3face1e 100644 --- a/Source/Game/Networking/Packets/BattleGroundPackets.cs +++ b/Source/Game/Networking/Packets/BattleGroundPackets.cs @@ -24,8 +24,8 @@ namespace Game.Networking.Packets _worldPacket.WriteInt32(PvpSeasonID); _worldPacket.WriteInt32(Unknown1027_1); _worldPacket.WriteBit(WeeklyRewardChestsEnabled); - _worldPacket.WriteBit(Unknown1027_2); - _worldPacket.WriteBit(Unknown1027_3); + _worldPacket.WriteBit(CurrentArenaSeasonUsesTeams); + _worldPacket.WriteBit(PreviousArenaSeasonUsesTeams); _worldPacket.FlushBits(); } @@ -37,8 +37,8 @@ namespace Game.Networking.Packets public int ConquestWeeklyProgressCurrencyID; public int Unknown1027_1; public bool WeeklyRewardChestsEnabled; - public bool Unknown1027_2; - public bool Unknown1027_3; + public bool CurrentArenaSeasonUsesTeams; + public bool PreviousArenaSeasonUsesTeams; } public class AreaSpiritHealerQuery : ClientPacket @@ -167,7 +167,7 @@ namespace Game.Networking.Packets Hdr.Write(_worldPacket); _worldPacket.WriteUInt32(AverageWaitTime); _worldPacket.WriteUInt32(WaitTime); - _worldPacket.WriteInt32(Unused920); + _worldPacket.WriteInt32(SpecSelected); _worldPacket.WriteBit(AsGroup); _worldPacket.WriteBit(EligibleForMatchmaking); _worldPacket.WriteBit(SuspendedQueue); @@ -180,7 +180,7 @@ namespace Game.Networking.Packets public bool SuspendedQueue; public bool EligibleForMatchmaking; public uint WaitTime; - public int Unused920; + public int SpecSelected; } public class BattlefieldStatusFailed : ServerPacket @@ -582,8 +582,8 @@ namespace Game.Networking.Packets public int Ranking; public int SeasonPlayed; public int SeasonWon; - public int Unused1; - public int Unused2; + public int SeasonFactionPlayed; + public int SeasonFactionWon; public int WeeklyPlayed; public int WeeklyWon; public int RoundsSeasonPlayed; @@ -594,9 +594,9 @@ namespace Game.Networking.Packets public int LastWeeksBestRating; public int BestSeasonRating; public int PvpTierID; - public int Unused3; - public int Unused4; - public int Rank; + public int SeasonPvpTier; + public int BestWeeklyPvpTier; + public int BestSeasonPvpTierEnum; public bool Disqualified; public void Write(WorldPacket data) @@ -605,8 +605,8 @@ namespace Game.Networking.Packets data.WriteInt32(Ranking); data.WriteInt32(SeasonPlayed); data.WriteInt32(SeasonWon); - data.WriteInt32(Unused1); - data.WriteInt32(Unused2); + data.WriteInt32(SeasonFactionPlayed); + data.WriteInt32(SeasonFactionWon); data.WriteInt32(WeeklyPlayed); data.WriteInt32(WeeklyWon); data.WriteInt32(RoundsSeasonPlayed); @@ -617,9 +617,9 @@ namespace Game.Networking.Packets data.WriteInt32(LastWeeksBestRating); data.WriteInt32(BestSeasonRating); data.WriteInt32(PvpTierID); - data.WriteInt32(Unused3); - data.WriteInt32(Unused4); - data.WriteInt32(Rank); + data.WriteInt32(SeasonPvpTier); + data.WriteInt32(BestWeeklyPvpTier); + data.WriteInt32(BestSeasonPvpTierEnum); data.WriteBit(Disqualified); data.FlushBits(); } diff --git a/Source/Game/Networking/Packets/CalendarPackets.cs b/Source/Game/Networking/Packets/CalendarPackets.cs index 71242f7d6..c2f1e5de1 100644 --- a/Source/Game/Networking/Packets/CalendarPackets.cs +++ b/Source/Game/Networking/Packets/CalendarPackets.cs @@ -724,6 +724,13 @@ namespace Game.Networking.Packets //Structs struct CalendarAddEventInviteInfo { + public ObjectGuid Guid; + public byte Status; + public byte Moderator; + public ObjectGuid? BnetAccountID; + public ulong? RealmAddress; + public ulong? CommunityID; + public void Read(WorldPacket data) { Guid = data.ReadPackedGuid(); @@ -735,19 +742,12 @@ namespace Game.Networking.Packets bool hasUnused801_3 = data.HasBit(); if (hasUnused801_1) - Unused801_1 = data.ReadPackedGuid(); + BnetAccountID = data.ReadPackedGuid(); if (hasUnused801_2) - Unused801_2 = data.ReadUInt64(); + RealmAddress = data.ReadUInt64(); if (hasUnused801_3) - Unused801_3 = data.ReadUInt64(); + CommunityID = data.ReadUInt64(); } - - public ObjectGuid Guid; - public byte Status; - public byte Moderator; - public ObjectGuid? Unused801_1; - public ulong? Unused801_2; - public ulong? Unused801_3; } class CalendarAddEventInfo diff --git a/Source/Game/Networking/Packets/CharacterPackets.cs b/Source/Game/Networking/Packets/CharacterPackets.cs index 7fe5166b2..fea4f1697 100644 --- a/Source/Game/Networking/Packets/CharacterPackets.cs +++ b/Source/Game/Networking/Packets/CharacterPackets.cs @@ -29,11 +29,11 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(Success); _worldPacket.WriteBit(Realmless); _worldPacket.WriteBit(IsDeletedCharacters); - _worldPacket.WriteBit(IsNewPlayerRestrictionSkipped); - _worldPacket.WriteBit(IsNewPlayerRestricted); - _worldPacket.WriteBit(IsNewPlayer); - _worldPacket.WriteBit(IsTrialAccountRestricted); - _worldPacket.WriteBit(DisabledClassesMask.HasValue); + _worldPacket.WriteBit(IgnoreNewPlayerRestrictions); + _worldPacket.WriteBit(IsRestrictedNewPlayer); + _worldPacket.WriteBit(IsNewcomerChatCompleted); + _worldPacket.WriteBit(IsRestrictedTrial); + _worldPacket.WriteBit(ClassDisableMask.HasValue); _worldPacket.WriteBit(DontCreateCharacterDisplays); _worldPacket.WriteInt32(Characters.Count); _worldPacket.WriteInt32(RegionwideCharacters.Count); @@ -43,8 +43,8 @@ namespace Game.Networking.Packets _worldPacket.WriteInt32(RaceLimitDisables.Count); _worldPacket.WriteInt32(WarbandGroups.Count); - if (DisabledClassesMask.HasValue) - _worldPacket.WriteUInt32(DisabledClassesMask.Value); + if (ClassDisableMask.HasValue) + _worldPacket.WriteUInt32(ClassDisableMask.Value); foreach (UnlockedConditionalAppearance unlockedConditionalAppearance in UnlockedConditionalAppearances) unlockedConditionalAppearance.Write(_worldPacket); @@ -68,14 +68,14 @@ namespace Game.Networking.Packets public bool Success; public bool Realmless; public bool IsDeletedCharacters; // used for character undelete list - public bool IsNewPlayerRestrictionSkipped; // allows client to skip new player restrictions - public bool IsNewPlayerRestricted; // forbids using level boost and class trials - public bool IsNewPlayer; // forbids hero classes and allied races - public bool IsTrialAccountRestricted; + public bool IgnoreNewPlayerRestrictions; // allows client to skip new player restrictions + public bool IsRestrictedNewPlayer; // forbids using level boost and class trials + public bool IsNewcomerChatCompleted; // forbids hero classes and allied races + public bool IsRestrictedTrial; public bool DontCreateCharacterDisplays; public int MaxCharacterLevel = 1; - public uint? DisabledClassesMask = new(); + public uint? ClassDisableMask = new(); public List Characters = new(); // all characters on the list public List RegionwideCharacters = new(); @@ -150,7 +150,7 @@ namespace Game.Networking.Packets StringArray equipment = new(fields.Read(17), ' '); ListPosition = fields.Read(19); - LastPlayedTime = fields.Read(20); + LastActiveTime = fields.Read(20); var spec = Global.DB2Mgr.GetChrSpecializationByIndex(ClassId, fields.Read(21)); if (spec != null) @@ -197,7 +197,7 @@ namespace Game.Networking.Packets data.WriteUInt32((uint)Flags); data.WriteUInt32((uint)Flags2); data.WriteUInt32(Flags3); - data.WriteUInt8(unkWod61x); + data.WriteUInt8(CantLoginReason); data.WriteUInt32(PetCreatureDisplayId); data.WriteUInt32(PetExperienceLevel); @@ -206,8 +206,8 @@ namespace Game.Networking.Packets foreach (var visualItem in VisualItems) visualItem.Write(data); - data.WriteInt32(Unknown703); - data.WriteInt64(LastPlayedTime); + data.WriteInt32(SaveVersion); + data.WriteInt64(LastActiveTime); data.WriteInt32(LastLoginVersion); PersonalTabard.Write(data); @@ -248,10 +248,10 @@ namespace Game.Networking.Packets public CharacterCustomizeFlags Flags2; // Character customization flags @see enum CharacterCustomizeFlags public uint Flags3; // Character flags 3 @todo research public bool FirstLogin; - public byte unkWod61x; - public long LastPlayedTime; + public byte CantLoginReason; + public long LastActiveTime; public short SpecID; - public int Unknown703; + public int SaveVersion; public int LastLoginVersion; public uint OverrideSelectScreenFileDataID; public int TimerunningSeasonID; @@ -295,7 +295,7 @@ namespace Game.Networking.Packets public class CharacterRestrictionAndMailData { public bool BoostInProgress; ///< @todo - public uint Flags4; + public uint RestrictionFlags; public List MailSenders = new(); public List MailSenderTypes = new(); public bool RpeResetAvailable; @@ -310,7 +310,7 @@ namespace Game.Networking.Packets data.WriteBit(RpeResetQuestClearAvailable); data.FlushBits(); - data.WriteUInt32(Flags4); + data.WriteUInt32(RestrictionFlags); data.WriteInt32(MailSenders.Count); data.WriteInt32(MailSenderTypes.Count); @@ -373,46 +373,46 @@ namespace Game.Networking.Packets public struct RaceUnlock { + public int RaceID; + public bool HasUnlockedLicense; + public bool HasUnlockedAchievement; + public bool HasHeritageArmorUnlockAchievement; + public bool HideRaceOnClient; + public bool Unused1027; + public void Write(WorldPacket data) { data.WriteInt32(RaceID); - data.WriteBit(HasExpansion); - data.WriteBit(HasAchievement); - data.WriteBit(HasHeritageArmor); - data.WriteBit(IsLocked); + data.WriteBit(HasUnlockedLicense); + data.WriteBit(HasUnlockedAchievement); + data.WriteBit(HasHeritageArmorUnlockAchievement); + data.WriteBit(HideRaceOnClient); data.WriteBit(Unused1027); data.FlushBits(); } - - public int RaceID; - public bool HasExpansion; - public bool HasAchievement; - public bool HasHeritageArmor; - public bool IsLocked; - public bool Unused1027; } public struct UnlockedConditionalAppearance { + public int AchievementID; + public int ConditionalType; + public void Write(WorldPacket data) { data.WriteInt32(AchievementID); - data.WriteInt32(Unused); + data.WriteInt32(ConditionalType); } - - public int AchievementID; - public int Unused; } public struct RaceLimitDisableInfo { public int RaceID; - public int BlockReason; + public int Reason; public void Write(WorldPacket data) { data.WriteInt32(RaceID); - data.WriteInt32(BlockReason); + data.WriteInt32(Reason); } } } diff --git a/Source/Game/Networking/Packets/ChatPackets.cs b/Source/Game/Networking/Packets/ChatPackets.cs index cf2791a31..badd94090 100644 --- a/Source/Game/Networking/Packets/ChatPackets.cs +++ b/Source/Game/Networking/Packets/ChatPackets.cs @@ -191,7 +191,7 @@ namespace Game.Networking.Packets Clear(); SenderGUID.Clear(); - SenderAccountGUID.Clear(); + SenderWowAccount.Clear(); SenderGuildGUID.Clear(); TargetGUID.Clear(); SenderName = ""; @@ -226,7 +226,7 @@ namespace Game.Networking.Packets Player playerSender = sender.ToPlayer(); if (playerSender != null) { - SenderAccountGUID = playerSender.GetSession().GetAccountGUID(); + SenderWowAccount = playerSender.GetSession().GetAccountGUID(); _ChatFlags = playerSender.GetChatFlags(); SenderGuildGUID = ObjectGuid.Create(HighGuid.Guild, playerSender.GetGuildId()); @@ -248,7 +248,7 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32((uint)_Language); _worldPacket.WritePackedGuid(SenderGUID); _worldPacket.WritePackedGuid(SenderGuildGUID); - _worldPacket.WritePackedGuid(SenderAccountGUID); + _worldPacket.WritePackedGuid(SenderWowAccount); _worldPacket.WritePackedGuid(TargetGUID); _worldPacket.WriteUInt32(TargetVirtualAddress); _worldPacket.WriteUInt32(SenderVirtualAddress); @@ -263,7 +263,7 @@ namespace Game.Networking.Packets _worldPacket.WriteBits(ChatText.GetByteCount(), 12); _worldPacket.WriteBit(HideChatLog); _worldPacket.WriteBit(FakeSenderName); - _worldPacket.WriteBit(Unused_801.HasValue); + _worldPacket.WriteBit(BroadcastTextID.HasValue); _worldPacket.WriteBit(ChannelGUID.HasValue); _worldPacket.FlushBits(); @@ -273,8 +273,8 @@ namespace Game.Networking.Packets _worldPacket.WriteString(Channel); _worldPacket.WriteString(ChatText); - if (Unused_801.HasValue) - _worldPacket.WriteUInt32(Unused_801.Value); + if (BroadcastTextID.HasValue) + _worldPacket.WriteUInt32(BroadcastTextID.Value); if (ChannelGUID.HasValue) _worldPacket.WritePackedGuid(ChannelGUID.Value); @@ -284,7 +284,7 @@ namespace Game.Networking.Packets public Language _Language = Language.Universal; public ObjectGuid SenderGUID; public ObjectGuid SenderGuildGUID; - public ObjectGuid SenderAccountGUID; + public ObjectGuid SenderWowAccount; public ObjectGuid TargetGUID; public uint SenderVirtualAddress; public uint TargetVirtualAddress; @@ -297,7 +297,7 @@ namespace Game.Networking.Packets public ChatFlags _ChatFlags; public float DisplayTime; public uint SpellID; - public uint? Unused_801; + public uint? BroadcastTextID; public bool HideChatLog; public bool FakeSenderName; public ObjectGuid? ChannelGUID; diff --git a/Source/Game/Networking/Packets/GuildPackets.cs b/Source/Game/Networking/Packets/GuildPackets.cs index 260c38e03..7fecadc54 100644 --- a/Source/Game/Networking/Packets/GuildPackets.cs +++ b/Source/Game/Networking/Packets/GuildPackets.cs @@ -209,16 +209,16 @@ namespace Game.Networking.Packets public override void Read() { uint nameLen = _worldPacket.ReadBits(9); - bool hasUnused910 = _worldPacket.HasBit(); + bool hasArenaTeam = _worldPacket.HasBit(); Name = _worldPacket.ReadString(nameLen); - if (hasUnused910) - Unused910 = _worldPacket.ReadInt32(); + if (hasArenaTeam) + ArenaTeam = _worldPacket.ReadInt32(); } public string Name; - public int? Unused910; + public int? ArenaTeam; } public class GuildInvite : ServerPacket @@ -1700,7 +1700,7 @@ namespace Game.Networking.Packets public class GuildRewardItem { public uint ItemID; - public uint Unk4; + public uint AchievementLogic; public List AchievementsRequired = new(); public RaceMask RaceMask; public int MinGuildLevel; @@ -1710,7 +1710,7 @@ namespace Game.Networking.Packets public void Write(WorldPacket data) { data.WriteUInt32(ItemID); - data.WriteUInt32(Unk4); + data.WriteUInt32(AchievementLogic); data.WriteInt32(AchievementsRequired.Count); data.WriteUInt64(RaceMask.RawValue); data.WriteInt32(MinGuildLevel); diff --git a/Source/Game/Networking/Packets/InspectPackets.cs b/Source/Game/Networking/Packets/InspectPackets.cs index ae84bfca2..d8dcae6f1 100644 --- a/Source/Game/Networking/Packets/InspectPackets.cs +++ b/Source/Game/Networking/Packets/InspectPackets.cs @@ -276,10 +276,30 @@ namespace Game.Networking.Packets public struct PVPBracketData { + public int Rating; + public int RatingID; + public int Rank; + public int WeeklyPlayed; + public int WeeklyWon; + public int SeasonPlayed; + public int SeasonWon; + public int WeeklyBestRating; + public int LastWeeksBestRating; + public int Tier; + public int WeeklyBestTier; + public int SeasonBestRating; + public int SeasonBestTierEnum; + public int RoundsSeasonPlayed; + public int RoundsSeasonWon; + public int RoundsWeeklyPlayed; + public int RoundsWeeklyWon; + public byte Bracket; + public bool Disqualified; + public void Write(WorldPacket data) { data.WriteUInt8(Bracket); - data.WriteInt32(Unused3); + data.WriteInt32(RatingID); data.WriteInt32(Rating); data.WriteInt32(Rank); data.WriteInt32(WeeklyPlayed); @@ -287,11 +307,11 @@ namespace Game.Networking.Packets data.WriteInt32(SeasonPlayed); data.WriteInt32(SeasonWon); data.WriteInt32(WeeklyBestRating); + data.WriteInt32(LastWeeksBestRating); + data.WriteInt32(Tier); + data.WriteInt32(WeeklyBestTier); data.WriteInt32(SeasonBestRating); - data.WriteInt32(PvpTierID); - data.WriteInt32(WeeklyBestWinPvpTierID); - data.WriteInt32(Unused1); - data.WriteInt32(Unused2); + data.WriteInt32(SeasonBestTierEnum); data.WriteInt32(RoundsSeasonPlayed); data.WriteInt32(RoundsSeasonWon); data.WriteInt32(RoundsWeeklyPlayed); @@ -299,26 +319,6 @@ namespace Game.Networking.Packets data.WriteBit(Disqualified); data.FlushBits(); } - - public int Rating; - public int Rank; - public int WeeklyPlayed; - public int WeeklyWon; - public int SeasonPlayed; - public int SeasonWon; - public int WeeklyBestRating; - public int SeasonBestRating; - public int PvpTierID; - public int WeeklyBestWinPvpTierID; - public int Unused1; - public int Unused2; - public int Unused3; - public int RoundsSeasonPlayed; - public int RoundsSeasonWon; - public int RoundsWeeklyPlayed; - public int RoundsWeeklyWon; - public byte Bracket; - public bool Disqualified; } public class TraitInspectInfo diff --git a/Source/Game/Networking/Packets/ItemPackets.cs b/Source/Game/Networking/Packets/ItemPackets.cs index 22c564902..dafa3419e 100644 --- a/Source/Game/Networking/Packets/ItemPackets.cs +++ b/Source/Game/Networking/Packets/ItemPackets.cs @@ -408,11 +408,11 @@ namespace Game.Networking.Packets _worldPacket.WritePackedGuid(PlayerGUID); _worldPacket.WriteUInt8(Slot); _worldPacket.WriteInt32(SlotInBag); - _worldPacket.WriteInt32(QuestLogItemID); + _worldPacket.WriteInt32(ProxyItemID); _worldPacket.WriteUInt32(Quantity); _worldPacket.WriteUInt32(QuantityInInventory); _worldPacket.WriteInt32(QuantityInQuestLog); - _worldPacket.WriteInt32(DungeonEncounterID); + _worldPacket.WriteInt32(EncounterID); _worldPacket.WriteInt32(BattlePetSpeciesID); _worldPacket.WriteInt32(BattlePetBreedID); _worldPacket.WriteUInt8(BattlePetBreedQuality); @@ -424,10 +424,10 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(Pushed); _worldPacket.WriteBit(Created); - _worldPacket.WriteBit(Unused_1017); - _worldPacket.WriteBits((uint)DisplayText, 3); + _worldPacket.WriteBit(FakeQuestItem); + _worldPacket.WriteBits((uint)ChatNotifyType, 3); _worldPacket.WriteBit(IsBonusRoll); - _worldPacket.WriteBit(IsEncounterLoot); + _worldPacket.WriteBit(IsPersonalLoot); _worldPacket.WriteBit(CraftingData != null); _worldPacket.WriteBit(FirstCraftOperationID.HasValue); _worldPacket.FlushBits(); @@ -445,12 +445,12 @@ namespace Game.Networking.Packets public byte Slot; public int SlotInBag; public ItemInstance Item = new(); - public int QuestLogItemID;// Item ID used for updating quest progress + public int ProxyItemID;// Item ID used for updating quest progress // only set if different than real ID (similar to CreatureTemplate.KillCredit) public uint Quantity; public uint QuantityInInventory; public int QuantityInQuestLog; - public int DungeonEncounterID; + public int EncounterID; public int BattlePetSpeciesID; public int BattlePetBreedID; public byte BattlePetBreedQuality; @@ -460,11 +460,11 @@ namespace Game.Networking.Packets public CraftingData CraftingData; public uint? FirstCraftOperationID; public bool Pushed; - public DisplayType DisplayText; + public DisplayType ChatNotifyType; public bool Created; - public bool Unused_1017; + public bool FakeQuestItem; public bool IsBonusRoll; - public bool IsEncounterLoot; + public bool IsPersonalLoot; public enum DisplayType { diff --git a/Source/Game/Networking/Packets/LFGPackets.cs b/Source/Game/Networking/Packets/LFGPackets.cs index d2ee639da..ddfa54c8f 100644 --- a/Source/Game/Networking/Packets/LFGPackets.cs +++ b/Source/Game/Networking/Packets/LFGPackets.cs @@ -17,7 +17,7 @@ namespace Game.Networking.Packets { QueueAsGroup = _worldPacket.HasBit(); bool hasPartyIndex = _worldPacket.HasBit(); - Unknown = _worldPacket.HasBit(); + Mercenary = _worldPacket.HasBit(); Roles = (LfgRoles)_worldPacket.ReadUInt32(); var slotsCount = _worldPacket.ReadInt32(); @@ -29,7 +29,7 @@ namespace Game.Networking.Packets } public bool QueueAsGroup; - public bool Unknown; // Always false in 7.2.5 + public bool Mercenary; public byte? PartyIndex; public LfgRoles Roles; public List Slots = new(); @@ -184,7 +184,7 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(Joined); _worldPacket.WriteBit(LfgJoined); _worldPacket.WriteBit(Queued); - _worldPacket.WriteBit(Unused); + _worldPacket.WriteBit(Brawl); _worldPacket.FlushBits(); } @@ -200,7 +200,7 @@ namespace Game.Networking.Packets public bool Joined; public bool LfgJoined; public bool Queued; - public bool Unused; + public bool Brawl; } class RoleChosen : ServerPacket @@ -368,10 +368,10 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(CompletedMask); _worldPacket.WriteUInt32(EncounterMask); _worldPacket.WriteInt32(Players.Count); - _worldPacket.WriteUInt8(Unused); + _worldPacket.WriteUInt8(PromisedShortageRolePriority); _worldPacket.WriteBit(ValidCompletedMask); _worldPacket.WriteBit(ProposalSilent); - _worldPacket.WriteBit(IsRequeue); + _worldPacket.WriteBit(FailedByMyParty); _worldPacket.FlushBits(); foreach (var player in Players) @@ -385,10 +385,10 @@ namespace Game.Networking.Packets public byte State; public uint CompletedMask; public uint EncounterMask; - public byte Unused; + public byte PromisedShortageRolePriority; public bool ValidCompletedMask; public bool ProposalSilent; - public bool IsRequeue; + public bool FailedByMyParty; public List Players = new(); } @@ -532,19 +532,19 @@ namespace Game.Networking.Packets } data.WriteBit(RewardSpellID.HasValue); - data.WriteBit(Unused1.HasValue); - data.WriteBit(Unused2.HasValue); + data.WriteBit(ArtifactXPCategory.HasValue); + data.WriteBit(ArtifactXP.HasValue); data.WriteBit(Honor.HasValue); data.FlushBits(); if (RewardSpellID.HasValue) data.WriteInt32(RewardSpellID.Value); - if (Unused1.HasValue) - data.WriteInt32(Unused1.Value); + if (ArtifactXPCategory.HasValue) + data.WriteInt32(ArtifactXPCategory.Value); - if (Unused2.HasValue) - data.WriteUInt64(Unused2.Value); + if (ArtifactXP.HasValue) + data.WriteUInt64(ArtifactXP.Value); if (Honor.HasValue) data.WriteInt32(Honor.Value); @@ -557,8 +557,8 @@ namespace Game.Networking.Packets public List Currency = new(); public List BonusCurrency = new(); public int? RewardSpellID; // Only used by SMSG_LFG_PLAYER_INFO - public int? Unused1; - public ulong? Unused2; + public int? ArtifactXPCategory; + public ulong? ArtifactXP; public int? Honor; // Only used by SMSG_REQUEST_PVP_REWARDS_RESPONSE } @@ -754,7 +754,7 @@ namespace Game.Networking.Packets Id = data.ReadUInt32(); Type = (RideType)data.ReadUInt32(); Time = data.ReadInt64(); - Unknown925 = data.HasBit(); + IsCrossFaction = data.HasBit(); data.ResetBitPos(); } @@ -764,7 +764,7 @@ namespace Game.Networking.Packets data.WriteUInt32(Id); data.WriteUInt32((uint)Type); data.WriteInt64(Time); - data.WriteBit(Unknown925); + data.WriteBit(IsCrossFaction); data.FlushBits(); } @@ -772,7 +772,7 @@ namespace Game.Networking.Packets public uint Id; public RideType Type; public long Time; - public bool Unknown925; + public bool IsCrossFaction; } public enum RideType diff --git a/Source/Game/Networking/Packets/MiscPackets.cs b/Source/Game/Networking/Packets/MiscPackets.cs index 05804777f..5ac68e969 100644 --- a/Source/Game/Networking/Packets/MiscPackets.cs +++ b/Source/Game/Networking/Packets/MiscPackets.cs @@ -1192,7 +1192,7 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(IsFullUpdate); _worldPacket.FlushBits(); - _worldPacket.WriteInt32(Unk); + _worldPacket.WriteInt32(ItemCollectionType); // both lists have to have the same size _worldPacket.WriteInt32(Heirlooms.Count); @@ -1207,7 +1207,7 @@ namespace Game.Networking.Packets public bool IsFullUpdate; public Dictionary Heirlooms = new(); - public int Unk; + public int ItemCollectionType; } class MountSpecial : ClientPacket diff --git a/Source/Game/Networking/Packets/MovementPackets.cs b/Source/Game/Networking/Packets/MovementPackets.cs index 73b6542ea..ea3f68d2b 100644 --- a/Source/Game/Networking/Packets/MovementPackets.cs +++ b/Source/Game/Networking/Packets/MovementPackets.cs @@ -359,7 +359,7 @@ namespace Game.Networking.Packets data.WriteUInt32(movementForce.TransportID); data.WriteFloat(movementForce.Magnitude); - data.WriteInt32(movementForce.Unused910); + data.WriteInt32(movementForce.MovementForceID); data.WriteBits((byte)movementForce.Type, 2); data.FlushBits(); } @@ -1467,7 +1467,7 @@ namespace Game.Networking.Packets data.WriteBits((byte)Face, 2); data.WriteBits(Points.Count, 16); data.WriteBit(VehicleExitVoluntary); - data.WriteBit(Interpolate); + data.WriteBit(TaxiSmoothing); data.WriteBits(PackedDeltas.Count, 16); data.WriteBit(SplineFilter != null); data.WriteBit(SpellEffectExtraData.HasValue); @@ -1520,7 +1520,7 @@ namespace Game.Networking.Packets public List Points = new(); // Spline path public byte Mode; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags public bool VehicleExitVoluntary; - public bool Interpolate; + public bool TaxiSmoothing; public ObjectGuid TransportGUID; public sbyte VehicleSeat = -1; public List PackedDeltas = new(); @@ -1545,14 +1545,14 @@ namespace Game.Networking.Packets { data.WriteUInt32(Id); data.WriteBit(CrzTeleport); - data.WriteBits(StopDistanceTolerance, 3); + data.WriteBits(StopSplineStyle, 3); Move.Write(data); } public uint Id; public bool CrzTeleport; - public byte StopDistanceTolerance; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2) + public byte StopSplineStyle; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2) public MovementSpline Move; } diff --git a/Source/Game/Networking/Packets/PartyPackets.cs b/Source/Game/Networking/Packets/PartyPackets.cs index 98a2c9a9f..745c6b6cc 100644 --- a/Source/Game/Networking/Packets/PartyPackets.cs +++ b/Source/Game/Networking/Packets/PartyPackets.cs @@ -84,19 +84,19 @@ namespace Game.Networking.Packets public override void Write() { _worldPacket.WriteBit(CanAccept); - _worldPacket.WriteBit(MightCRZYou); _worldPacket.WriteBit(IsXRealm); - _worldPacket.WriteBit(MustBeBNetFriend); + _worldPacket.WriteBit(IsXNativeRealm); + _worldPacket.WriteBit(ShouldSquelch); _worldPacket.WriteBit(AllowMultipleRoles); _worldPacket.WriteBit(QuestSessionActive); _worldPacket.WriteBits(InviterName.GetByteCount(), 6); - _worldPacket.WriteBit(Unused1102); + _worldPacket.WriteBit(IsCrossFaction); InviterRealm.Write(_worldPacket); _worldPacket.WritePackedGuid(InviterGUID); _worldPacket.WritePackedGuid(InviterBNetAccountId); - _worldPacket.WriteUInt16(Unk1); + _worldPacket.WriteUInt16(InviterCfgRealmID); _worldPacket.WriteUInt8(ProposedRoles); _worldPacket.WriteInt32(LfgSlots.Count); _worldPacket.WriteInt32(LfgCompletedMask); @@ -107,12 +107,11 @@ namespace Game.Networking.Packets _worldPacket.WriteInt32(LfgSlot); } - public bool MightCRZYou; - public bool MustBeBNetFriend; + public bool ShouldSquelch; public bool AllowMultipleRoles; public bool QuestSessionActive; - public bool Unused1102; - public ushort Unk1; + public bool IsCrossFaction; + public ushort InviterCfgRealmID; public bool CanAccept; @@ -124,6 +123,7 @@ namespace Game.Networking.Packets // Realm public bool IsXRealm; + public bool IsXNativeRealm; // Lfg public byte ProposedRoles; @@ -362,8 +362,11 @@ namespace Game.Networking.Packets MemberStats.PetStats.Auras.Add(aura); } - } + + MemberStats.ChromieTime.ConditionalFlags = player.m_playerData.CtrOptions.GetValue().ConditionalFlags; + MemberStats.ChromieTime.FactionGroup = (int)player.m_playerData.CtrOptions.GetValue().FactionGroup; + MemberStats.ChromieTime.ChromieTimeExpansionMask = player.m_playerData.CtrOptions.GetValue().ChromieTimeExpansionMask; } public bool ForEnemy; @@ -1163,15 +1166,15 @@ namespace Game.Networking.Packets public struct CTROptions { - public uint ContentTuningConditionMask; - public int Unused901; - public uint ExpansionLevelMask; + public uint ConditionalFlags; + public int FactionGroup; + public uint ChromieTimeExpansionMask; public void Write(WorldPacket data) { - data.WriteUInt32(ContentTuningConditionMask); - data.WriteInt32(Unused901); - data.WriteUInt32(ExpansionLevelMask); + data.WriteUInt32(ConditionalFlags); + data.WriteInt32(FactionGroup); + data.WriteUInt32(ChromieTimeExpansionMask); } } diff --git a/Source/Game/Networking/Packets/PetitionPackets.cs b/Source/Game/Networking/Packets/PetitionPackets.cs index 0a6629415..0ce132e39 100644 --- a/Source/Game/Networking/Packets/PetitionPackets.cs +++ b/Source/Game/Networking/Packets/PetitionPackets.cs @@ -77,13 +77,13 @@ namespace Game.Networking.Packets uint titleLen = _worldPacket.ReadBits(7); Unit = _worldPacket.ReadPackedGuid(); - Unused910 = _worldPacket.ReadUInt32(); + Muid = _worldPacket.ReadUInt32(); Title = _worldPacket.ReadString(titleLen); } public ObjectGuid Unit; public string Title; - public uint Unused910; + public uint Muid; } public class PetitionShowSignatures : ClientPacket diff --git a/Source/Game/Networking/Packets/QueryPackets.cs b/Source/Game/Networking/Packets/QueryPackets.cs index efe91775e..7afaf47e7 100644 --- a/Source/Game/Networking/Packets/QueryPackets.cs +++ b/Source/Game/Networking/Packets/QueryPackets.cs @@ -614,6 +614,7 @@ namespace Game.Networking.Packets Sex = player.GetNativeGender(); ClassID = player.GetClass(); Level = (byte)player.GetLevel(); + PvpFaction = (byte)(player.GetTeamId() == BattleGroundTeamId.Alliance ? 1 : 0); TimerunningSeasonID = player.m_activePlayerData.TimerunningSeasonID; DeclinedNames names = player.GetDeclinedNames(); @@ -632,6 +633,7 @@ namespace Game.Networking.Packets Sex = characterInfo.Sex; ClassID = characterInfo.ClassId; Level = characterInfo.Level; + PvpFaction = (byte)(Player.TeamIdForRace(characterInfo.RaceId) == BattleGroundTeamId.Alliance ? 1 : 0); } IsDeleted = characterInfo.IsDeleted; @@ -662,7 +664,7 @@ namespace Game.Networking.Packets data.WriteUInt8((byte)Sex); data.WriteUInt8((byte)ClassID); data.WriteUInt8(Level); - data.WriteUInt8(Unused915); + data.WriteUInt8(PvpFaction); data.WriteInt32(TimerunningSeasonID); data.WriteString(Name); } @@ -678,25 +680,25 @@ namespace Game.Networking.Packets public Gender Sex = Gender.None; public Class ClassID = Class.None; public byte Level; - public byte Unused915; + public byte PvpFaction; public int TimerunningSeasonID; public DeclinedName DeclinedNames = new(); } - public class NameCacheUnused920 + public class GuildGuidLookupData { - public uint Unused1; - public ObjectGuid Unused2; - public string Unused3 = ""; + public uint VirtualRealmAddress; + public ObjectGuid Guid; + public string Name = ""; public void Write(WorldPacket data) { - data.WriteUInt32(Unused1); - data.WritePackedGuid(Unused2); - data.WriteBits(Unused3.GetByteCount(), 7); + data.WriteUInt32(VirtualRealmAddress); + data.WritePackedGuid(Guid); + data.WriteBits(Name.GetByteCount(), 7); data.FlushBits(); - data.WriteString(Unused3); + data.WriteString(Name); } } @@ -705,21 +707,21 @@ namespace Game.Networking.Packets public ObjectGuid Player; public byte Result; // 0 - full packet, != 0 - only guid public PlayerGuidLookupData Data; - public NameCacheUnused920 Unused920; + public GuildGuidLookupData GuildData; public void Write(WorldPacket data) { data.WriteUInt8(Result); data.WritePackedGuid(Player); data.WriteBit(Data != null); - data.WriteBit(Unused920 != null); + data.WriteBit(GuildData != null); data.FlushBits(); if (Data != null) Data.Write(data); - if (Unused920 != null) - Unused920.Write(data); + if (GuildData != null) + GuildData.Write(data); } } @@ -837,14 +839,14 @@ namespace Game.Networking.Packets public List Items = new(); public List Currencies = new(); public ulong Money; - public bool Unknown; + public bool Context; public void Write(WorldPacket data) { data.WriteInt32(Items.Count); data.WriteInt32(Currencies.Count); data.WriteUInt64(Money); - data.WriteBit(Unknown); + data.WriteBit(Context); data.FlushBits(); foreach (TreasurePickItem treasurePickerItem in Items) diff --git a/Source/Game/Networking/Packets/ScenarioPackets.cs b/Source/Game/Networking/Packets/ScenarioPackets.cs index a30072d07..ac5077fe6 100644 --- a/Source/Game/Networking/Packets/ScenarioPackets.cs +++ b/Source/Game/Networking/Packets/ScenarioPackets.cs @@ -89,8 +89,8 @@ namespace Game.Networking.Packets { public ObjectGuid ScenarioGUID; public int ScenarioID; - public int Unk1; - public byte Unk2; + public int TimeRemain; + public byte Reason; public ScenarioVacate() : base(ServerOpcodes.ScenarioVacate, ConnectionType.Instance) { } @@ -98,8 +98,8 @@ namespace Game.Networking.Packets { _worldPacket.WritePackedGuid(ScenarioGUID); _worldPacket.WriteInt32(ScenarioID); - _worldPacket.WriteInt32(Unk1); - _worldPacket.WriteBits(Unk2, 2); + _worldPacket.WriteInt32(TimeRemain); + _worldPacket.WriteBits(Reason, 2); _worldPacket.FlushBits(); } } diff --git a/Source/Game/Networking/Packets/SpellPackets.cs b/Source/Game/Networking/Packets/SpellPackets.cs index 34f1721f2..fdfa99c40 100644 --- a/Source/Game/Networking/Packets/SpellPackets.cs +++ b/Source/Game/Networking/Packets/SpellPackets.cs @@ -1537,17 +1537,17 @@ namespace Game.Networking.Packets public struct SpellSupportInfo { - public ObjectGuid CasterGUID; - public int SpellID; - public int Amount; - public float Percentage; + public ObjectGuid Supporter; + public int SupportSpellID; + public int AmountRaw; + public float AmountPortion; public void Write(WorldPacket data) { - data.WritePackedGuid(CasterGUID); - data.WriteInt32(SpellID); - data.WriteInt32(Amount); - data.WriteFloat(Percentage); + data.WritePackedGuid(Supporter); + data.WriteInt32(SupportSpellID); + data.WriteInt32(AmountRaw); + data.WriteFloat(AmountPortion); } } @@ -1780,7 +1780,7 @@ namespace Game.Networking.Packets public int ItemID; public int DataSlotIndex; public int Quantity; - public byte? Unknown_1000; + public byte? Source; public void Read(WorldPacket data) { @@ -1788,7 +1788,7 @@ namespace Game.Networking.Packets DataSlotIndex = data.ReadInt32(); Quantity = data.ReadInt32(); if (data.HasBit()) - Unknown_1000 = data.ReadUInt8(); + Source = data.ReadUInt8(); } } diff --git a/Source/Game/Networking/Packets/SystemPackets.cs b/Source/Game/Networking/Packets/SystemPackets.cs index 9ee94ce6c..548cf78e5 100644 --- a/Source/Game/Networking/Packets/SystemPackets.cs +++ b/Source/Game/Networking/Packets/SystemPackets.cs @@ -23,30 +23,30 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(RAFSystem.MaxRecruitMonths); _worldPacket.WriteUInt32(RAFSystem.MaxRecruitmentUses); _worldPacket.WriteUInt32(RAFSystem.DaysInCycle); - _worldPacket.WriteUInt32(RAFSystem.Unknown1007); + _worldPacket.WriteUInt32(RAFSystem.RewardsVersion); - _worldPacket.WriteUInt32(TokenPollTimeSeconds); - _worldPacket.WriteUInt32(KioskSessionMinutes); - _worldPacket.WriteInt64(TokenBalanceAmount); + _worldPacket.WriteUInt32(CommercePricePollTimeSeconds); + _worldPacket.WriteUInt32(KioskSessionDurationMinutes); + _worldPacket.WriteInt64(RedeemForBalanceAmount); - _worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay); - _worldPacket.WriteUInt32(ClubsPresenceUpdateTimer); - _worldPacket.WriteUInt32(HiddenUIClubsPresenceUpdateTimer); + _worldPacket.WriteUInt32(BpayStorePurchaseTimeout); + _worldPacket.WriteUInt32(ClubsPresenceDelay); + _worldPacket.WriteUInt32(ClubPresenceUnsubscribeDelay); - _worldPacket.WriteInt32(ActiveSeason); - _worldPacket.WriteInt32(GameRuleValues.Count); + _worldPacket.WriteInt32(ContentSetID); + _worldPacket.WriteInt32(GameRules.Count); _worldPacket.WriteInt32(ActiveTimerunningSeasonID); _worldPacket.WriteInt32(RemainingTimerunningSeasonSeconds); - _worldPacket.WriteInt16(MaxPlayerNameQueriesPerPacket); - _worldPacket.WriteInt16(PlayerNameQueryTelemetryInterval); - _worldPacket.WriteUInt32((uint)PlayerNameQueryInterval.TotalSeconds); + _worldPacket.WriteInt16(MaxPlayerGuidLookupsPerRequest); + _worldPacket.WriteInt16(NameLookupTelemetryInterval); + _worldPacket.WriteUInt32((uint)NotFoundCacheTimeSeconds.TotalSeconds); _worldPacket.WriteInt32(AddonChatThrottle.MaxTries); _worldPacket.WriteInt32(AddonChatThrottle.TriesRestoredPerSecond); _worldPacket.WriteInt32(AddonChatThrottle.UsedTriesPerMessage); - foreach (GameRuleValuePair gameRuleValue in GameRuleValues) + foreach (GameRuleValuePair gameRuleValue in GameRules) gameRuleValue.Write(_worldPacket); _worldPacket.WriteBit(VoiceEnabled); @@ -62,43 +62,43 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(RAFSystem.RecruitingEnabled); _worldPacket.WriteBit(CharUndeleteEnabled); _worldPacket.WriteBit(RestrictedAccount); - _worldPacket.WriteBit(CommerceSystemEnabled); - _worldPacket.WriteBit(TutorialsEnabled); + _worldPacket.WriteBit(CommerceServerEnabled); + _worldPacket.WriteBit(TutorialEnabled); - _worldPacket.WriteBit(Unk67); - _worldPacket.WriteBit(WillKickFromWorld); + _worldPacket.WriteBit(VeteranTokenRedeemWillKick); + _worldPacket.WriteBit(WorldTokenRedeemWillKick); _worldPacket.WriteBit(KioskModeEnabled); _worldPacket.WriteBit(CompetitiveModeEnabled); - _worldPacket.WriteBit(TokenBalanceEnabled); - _worldPacket.WriteBit(WarModeFeatureEnabled); - _worldPacket.WriteBit(ClubsEnabled); - _worldPacket.WriteBit(ClubsBattleNetClubTypeAllowed); + _worldPacket.WriteBit(RedeemForBalanceAvailable); + _worldPacket.WriteBit(WarModeEnabled); + _worldPacket.WriteBit(CommunitiesEnabled); + _worldPacket.WriteBit(BnetGroupsEnabled); - _worldPacket.WriteBit(ClubsCharacterClubTypeAllowed); - _worldPacket.WriteBit(ClubsPresenceUpdateEnabled); - _worldPacket.WriteBit(VoiceChatDisabledByParentalControl); - _worldPacket.WriteBit(VoiceChatMutedByParentalControl); + _worldPacket.WriteBit(CharacterCommunitiesEnabled); + _worldPacket.WriteBit(ClubPresenceAllowSubscribeAll); + _worldPacket.WriteBit(VoiceChatParentalDisabled); + _worldPacket.WriteBit(VoiceChatParentalMuted); _worldPacket.WriteBit(QuestSessionEnabled); - _worldPacket.WriteBit(IsMuted); + _worldPacket.WriteBit(IsChatMuted); _worldPacket.WriteBit(ClubFinderEnabled); _worldPacket.WriteBit(CommunityFinderEnabled); - _worldPacket.WriteBit(Unknown901CheckoutRelated); - _worldPacket.WriteBit(TextToSpeechFeatureEnabled); + _worldPacket.WriteBit(BrowserCrashReporterEnabled); + _worldPacket.WriteBit(SpeakForMeAllowed); - _worldPacket.WriteBit(ChatDisabledByDefault); - _worldPacket.WriteBit(ChatDisabledByPlayer); - _worldPacket.WriteBit(LFGListCustomRequiresAuthenticator); - _worldPacket.WriteBit(AddonsDisabled); + _worldPacket.WriteBit(DoesAccountNeedAADCPrompt); + _worldPacket.WriteBit(IsAccountOptedInToAADC); + _worldPacket.WriteBit(LfgRequireAuthenticatorEnabled); + _worldPacket.WriteBit(ScriptsDisallowedForBeta); _worldPacket.WriteBit(TimerunningEnabled); _worldPacket.WriteBit(WarGamesEnabled); - _worldPacket.WriteBit(ContentTrackingEnabled); - _worldPacket.WriteBit(IsSellAllJunkEnabled); + _worldPacket.WriteBit(IsPlayerContentTrackingEnabled); + _worldPacket.WriteBit(SellAllJunkEnabled); - _worldPacket.WriteBit(IsGroupFinderEnabled); - _worldPacket.WriteBit(IsLFDEnabled); - _worldPacket.WriteBit(IsLFREnabled); + _worldPacket.WriteBit(GroupFinderEnabled); + _worldPacket.WriteBit(LfdEnabled); + _worldPacket.WriteBit(LfrEnabled); _worldPacket.WriteBit(IsPremadeGroupEnabled); - _worldPacket.WriteBit(CanShowSetRoleButton); + _worldPacket.WriteBit(PremadeGroupsEnabled); _worldPacket.WriteBit(false); // unused 10.2.7 _worldPacket.WriteBit(GuildEventsEditsEnabled); _worldPacket.WriteBit(GuildTradeSkillsEnabled); @@ -163,54 +163,54 @@ namespace Game.Networking.Packets public uint CfgRealmID; public byte ComplaintStatus; public int CfgRealmRecID; - public uint TokenPollTimeSeconds; - public long TokenBalanceAmount; - public uint BpayStoreProductDeliveryDelay; - public uint ClubsPresenceUpdateTimer; - public uint HiddenUIClubsPresenceUpdateTimer; // Timer for updating club presence when communities ui frame is hidden - public uint KioskSessionMinutes; - public int ActiveSeason; // Currently active Classic season - public short MaxPlayerNameQueriesPerPacket = 50; - public short PlayerNameQueryTelemetryInterval = 600; - public TimeSpan PlayerNameQueryInterval = TimeSpan.FromSeconds(10); + public uint CommercePricePollTimeSeconds; + public long RedeemForBalanceAmount; + public uint BpayStorePurchaseTimeout; + public uint ClubsPresenceDelay; + public uint ClubPresenceUnsubscribeDelay; // Timer for updating club presence when communities ui frame is hidden + public uint KioskSessionDurationMinutes; + public int ContentSetID; // Currently active Classic season + public short MaxPlayerGuidLookupsPerRequest = 50; + public short NameLookupTelemetryInterval = 600; + public TimeSpan NotFoundCacheTimeSeconds = TimeSpan.FromSeconds(10); public bool ItemRestorationButtonEnabled; public bool CharUndeleteEnabled; // Implemented public bool BpayStoreDisabledByParentalControls; - public bool CommerceSystemEnabled; - public bool Unk67; - public bool WillKickFromWorld; + public bool CommerceServerEnabled; + public bool VeteranTokenRedeemWillKick; + public bool WorldTokenRedeemWillKick; public bool RestrictedAccount; - public bool TutorialsEnabled; + public bool TutorialEnabled; public bool NPETutorialsEnabled; public bool KioskModeEnabled; public bool CompetitiveModeEnabled; - public bool TokenBalanceEnabled; - public bool WarModeFeatureEnabled; - public bool ClubsEnabled; - public bool ClubsBattleNetClubTypeAllowed; - public bool ClubsCharacterClubTypeAllowed; - public bool ClubsPresenceUpdateEnabled; - public bool VoiceChatDisabledByParentalControl; - public bool VoiceChatMutedByParentalControl; + public bool RedeemForBalanceAvailable; + public bool WarModeEnabled; + public bool CommunitiesEnabled; + public bool BnetGroupsEnabled; + public bool CharacterCommunitiesEnabled; + public bool ClubPresenceAllowSubscribeAll; + public bool VoiceChatParentalDisabled; + public bool VoiceChatParentalMuted; public bool QuestSessionEnabled; - public bool IsMuted; + public bool IsChatMuted; public bool ClubFinderEnabled; public bool CommunityFinderEnabled; - public bool Unknown901CheckoutRelated; - public bool TextToSpeechFeatureEnabled; - public bool ChatDisabledByDefault; - public bool ChatDisabledByPlayer; - public bool LFGListCustomRequiresAuthenticator; - public bool AddonsDisabled; + public bool BrowserCrashReporterEnabled; + public bool SpeakForMeAllowed; + public bool DoesAccountNeedAADCPrompt; + public bool IsAccountOptedInToAADC; + public bool LfgRequireAuthenticatorEnabled; + public bool ScriptsDisallowedForBeta; public bool TimerunningEnabled; public bool WarGamesEnabled; // classic only - public bool ContentTrackingEnabled; - public bool IsSellAllJunkEnabled; - public bool IsGroupFinderEnabled = true; // classic only - public bool IsLFDEnabled = true; // classic only - public bool IsLFREnabled = true; // classic only + public bool IsPlayerContentTrackingEnabled; + public bool SellAllJunkEnabled; + public bool GroupFinderEnabled = true; // classic only + public bool LfdEnabled = true; // classic only + public bool LfrEnabled = true; // classic only public bool IsPremadeGroupEnabled = true; // classic only - public bool CanShowSetRoleButton = true; + public bool PremadeGroupsEnabled = true; public bool GuildEventsEditsEnabled = true; public bool GuildTradeSkillsEnabled = true; public bool BNSendWhisperUseV2Services = true; ///< BNSendWhisper will send to v2.WhisperService instead of v1.NotificationService @@ -220,7 +220,7 @@ namespace Game.Networking.Packets public SocialQueueConfig QuickJoinConfig; public SquelchInfo Squelch; public RafSystemFeatureInfo RAFSystem; - public List GameRuleValues = new(); + public List GameRules = new(); public int ActiveTimerunningSeasonID; public int RemainingTimerunningSeasonSeconds; public string Unknown1027; // related to movement lua functions used by keybinds @@ -275,7 +275,7 @@ namespace Game.Networking.Packets public uint MaxRecruitMonths; public uint MaxRecruitmentUses; public uint DaysInCycle; - public uint Unknown1007; + public uint RewardsVersion; } public struct AddonChatThrottleParams @@ -296,33 +296,33 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(BpayStoreAvailable); _worldPacket.WriteBit(BpayStoreDisabledByParentalControls); _worldPacket.WriteBit(CharUndeleteEnabled); - _worldPacket.WriteBit(CommerceSystemEnabled); - _worldPacket.WriteBit(Unk14); - _worldPacket.WriteBit(WillKickFromWorld); - _worldPacket.WriteBit(IsExpansionPreorderInStore); + _worldPacket.WriteBit(CommerceServerEnabled); + _worldPacket.WriteBit(VeteranTokenRedeemWillKick); + _worldPacket.WriteBit(WorldTokenRedeemWillKick); + _worldPacket.WriteBit(ExpansionPreorderInStore); _worldPacket.WriteBit(KioskModeEnabled); _worldPacket.WriteBit(CompetitiveModeEnabled); - _worldPacket.WriteBit(IsBoostEnabled); + _worldPacket.WriteBit(BoostEnabled); _worldPacket.WriteBit(TrialBoostEnabled); - _worldPacket.WriteBit(TokenBalanceEnabled); + _worldPacket.WriteBit(RedeemForBalanceAvailable); _worldPacket.WriteBit(PaidCharacterTransfersBetweenBnetAccountsEnabled); _worldPacket.WriteBit(LiveRegionCharacterListEnabled); _worldPacket.WriteBit(LiveRegionCharacterCopyEnabled); _worldPacket.WriteBit(LiveRegionAccountCopyEnabled); _worldPacket.WriteBit(LiveRegionKeyBindingsCopyEnabled); - _worldPacket.WriteBit(Unknown901CheckoutRelated); - _worldPacket.WriteBit(false); // unused, 10.0.2 + _worldPacket.WriteBit(BrowserCrashReporterEnabled); + _worldPacket.WriteBit(IsEmployeeAccount); _worldPacket.WriteBit(EuropaTicketSystemStatus.HasValue); - _worldPacket.WriteBit(IsNameReservationEnabled); - _worldPacket.WriteBit(LaunchETA.HasValue); + _worldPacket.WriteBit(NameReservationOnly); + _worldPacket.WriteBit(LaunchDurationETA.HasValue); _worldPacket.WriteBit(TimerunningEnabled); - _worldPacket.WriteBit(AddonsDisabled); - _worldPacket.WriteBit(Unused1000); - _worldPacket.WriteBit(AccountSaveDataExportEnabled); - _worldPacket.WriteBit(AccountLockedByExport); + _worldPacket.WriteBit(ScriptsDisallowedForBeta); + _worldPacket.WriteBit(PlayerIdentityOptionsEnabled); + _worldPacket.WriteBit(AccountExportEnabled); + _worldPacket.WriteBit(AccountLockedPostExport); _worldPacket.WriteBits(RealmHiddenAlert.GetByteCount() + 1, 11); _worldPacket.WriteBit(BNSendWhisperUseV2Services); @@ -335,29 +335,29 @@ namespace Game.Networking.Packets if (EuropaTicketSystemStatus.HasValue) EuropaTicketSystemStatus.Value.Write(_worldPacket); - _worldPacket.WriteUInt32(TokenPollTimeSeconds); - _worldPacket.WriteUInt32(KioskSessionMinutes); - _worldPacket.WriteInt64(TokenBalanceAmount); - _worldPacket.WriteInt32(MaxCharactersPerRealm); + _worldPacket.WriteUInt32(CommercePricePollTimeSeconds); + _worldPacket.WriteUInt32(KioskSessionDurationMinutes); + _worldPacket.WriteInt64(RedeemForBalanceAmount); + _worldPacket.WriteInt32(MaxCharactersOnThisRealm); _worldPacket.WriteInt32(LiveRegionCharacterCopySourceRegions.Count); - _worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay); - _worldPacket.WriteInt32(ActiveCharacterUpgradeBoostType); - _worldPacket.WriteInt32(ActiveClassTrialBoostType); + _worldPacket.WriteUInt32(BpayStorePurchaseTimeout); + _worldPacket.WriteInt32(ActiveBoostType); + _worldPacket.WriteInt32(TrialBoostType); _worldPacket.WriteInt32(MinimumExpansionLevel); _worldPacket.WriteInt32(MaximumExpansionLevel); - _worldPacket.WriteInt32(ActiveSeason); - _worldPacket.WriteInt32(GameRuleValues.Count); + _worldPacket.WriteInt32(ContentSetID); + _worldPacket.WriteInt32(GameRules.Count); _worldPacket.WriteInt32(ActiveTimerunningSeasonID); _worldPacket.WriteInt32(RemainingTimerunningSeasonSeconds); - _worldPacket.WriteInt16(MaxPlayerNameQueriesPerPacket); - _worldPacket.WriteInt16(PlayerNameQueryTelemetryInterval); - _worldPacket.WriteUInt32((uint)PlayerNameQueryInterval.TotalSeconds); + _worldPacket.WriteInt16(MaxPlayerGuidLookupsPerRequest); + _worldPacket.WriteInt16(NameLookupTelemetryInterval); + _worldPacket.WriteUInt32((uint)NotFoundCacheTimeSeconds.TotalSeconds); _worldPacket.WriteInt32(DebugTimeEvents.Count); - _worldPacket.WriteInt32(Unused1007); + _worldPacket.WriteInt32(MostRecentTimeEventID); _worldPacket.WriteUInt32(EventRealmQueues); - if (LaunchETA.HasValue) - _worldPacket.WriteInt32(LaunchETA.Value); + if (LaunchDurationETA.HasValue) + _worldPacket.WriteInt32(LaunchDurationETA.Value); if (!RealmHiddenAlert.IsEmpty()) _worldPacket.WriteString(RealmHiddenAlert); @@ -365,7 +365,7 @@ namespace Game.Networking.Packets foreach (var sourceRegion in LiveRegionCharacterCopySourceRegions) _worldPacket.WriteInt32(sourceRegion); - foreach (GameRuleValuePair gameRuleValue in GameRuleValues) + foreach (GameRuleValuePair gameRuleValue in GameRules) gameRuleValue.Write(_worldPacket); foreach (DebugTimeEventInfo debugTimeEventInfo in DebugTimeEvents) @@ -376,51 +376,52 @@ namespace Game.Networking.Packets public bool BpayStoreDisabledByParentalControls; // NYI public bool CharUndeleteEnabled; public bool BpayStoreEnabled; // NYI - public bool CommerceSystemEnabled; // NYI - public bool Unk14; // NYI - public bool WillKickFromWorld; // NYI - public bool IsExpansionPreorderInStore; // NYI + public bool CommerceServerEnabled; // NYI + public bool VeteranTokenRedeemWillKick; // NYI + public bool WorldTokenRedeemWillKick; // NYI + public bool ExpansionPreorderInStore; // NYI public bool KioskModeEnabled; // NYI public bool CompetitiveModeEnabled; // NYI - public bool IsBoostEnabled; // classic only + public bool BoostEnabled; // classic only public bool TrialBoostEnabled; // NYI - public bool TokenBalanceEnabled; // NYI + public bool RedeemForBalanceAvailable; // NYI public bool PaidCharacterTransfersBetweenBnetAccountsEnabled; public bool LiveRegionCharacterListEnabled; // NYI public bool LiveRegionCharacterCopyEnabled; // NYI public bool LiveRegionAccountCopyEnabled; // NYI public bool LiveRegionKeyBindingsCopyEnabled; - public bool Unknown901CheckoutRelated; // NYI - public bool IsNameReservationEnabled; // classic only + public bool BrowserCrashReporterEnabled; // NYI + public bool IsEmployeeAccount; // NYI + public bool NameReservationOnly; // classic only public bool TimerunningEnabled; // NYI - public bool AddonsDisabled; - public bool Unused1000; - public bool AccountSaveDataExportEnabled; - public bool AccountLockedByExport; + public bool ScriptsDisallowedForBeta; + public bool PlayerIdentityOptionsEnabled; + public bool AccountExportEnabled; + public bool AccountLockedPostExport; public bool BNSendWhisperUseV2Services = true; ///< BNSendWhisper will send to v2.WhisperService instead of v1.NotificationService public bool BNSendGameDataUseV2Services = true; ///< BNSendGameData will send to v2.NotificationService instead of v1.NotificationService public bool CharacterSelectListModeRealmless; public EuropaTicketConfig? EuropaTicketSystemStatus; public List LiveRegionCharacterCopySourceRegions = new(); - public uint TokenPollTimeSeconds; // NYI - public long TokenBalanceAmount; // NYI - public int MaxCharactersPerRealm; - public uint BpayStoreProductDeliveryDelay; // NYI - public int ActiveCharacterUpgradeBoostType; // NYI - public int ActiveClassTrialBoostType; // NYI + public uint CommercePricePollTimeSeconds; // NYI + public long RedeemForBalanceAmount; // NYI + public int MaxCharactersOnThisRealm; + public uint BpayStorePurchaseTimeout; // NYI + public int ActiveBoostType; // NYI + public int TrialBoostType; // NYI public int MinimumExpansionLevel; public int MaximumExpansionLevel; - public uint KioskSessionMinutes; - public int ActiveSeason; // Currently active Classic season - public List GameRuleValues = new(); + public uint KioskSessionDurationMinutes; + public int ContentSetID; // Currently active Classic season + public List GameRules = new(); public int ActiveTimerunningSeasonID; public int RemainingTimerunningSeasonSeconds; - public short MaxPlayerNameQueriesPerPacket = 50; - public short PlayerNameQueryTelemetryInterval = 600; - public TimeSpan PlayerNameQueryInterval = TimeSpan.FromSeconds(10); - public int? LaunchETA; + public short MaxPlayerGuidLookupsPerRequest = 50; + public short NameLookupTelemetryInterval = 600; + public TimeSpan NotFoundCacheTimeSeconds = TimeSpan.FromSeconds(10); + public int? LaunchDurationETA; public List DebugTimeEvents = new(); - public int Unused1007; + public int MostRecentTimeEventID; public uint EventRealmQueues; public string RealmHiddenAlert; } @@ -433,17 +434,17 @@ namespace Game.Networking.Packets { _worldPacket.WriteBits(ServerTimeTZ.GetByteCount(), 7); _worldPacket.WriteBits(GameTimeTZ.GetByteCount(), 7); - _worldPacket.WriteBits(ServerRegionalTZ.GetByteCount(), 7); + _worldPacket.WriteBits(ServerRegionalTimeTZ.GetByteCount(), 7); _worldPacket.FlushBits(); _worldPacket.WriteString(ServerTimeTZ); _worldPacket.WriteString(GameTimeTZ); - _worldPacket.WriteString(ServerRegionalTZ); + _worldPacket.WriteString(ServerRegionalTimeTZ); } public string ServerTimeTZ; public string GameTimeTZ; - public string ServerRegionalTZ; + public string ServerRegionalTimeTZ; } public struct SavedThrottleObjectState diff --git a/Source/Game/Networking/Packets/TicketPackets.cs b/Source/Game/Networking/Packets/TicketPackets.cs index 6b262e00d..7b6274156 100644 --- a/Source/Game/Networking/Packets/TicketPackets.cs +++ b/Source/Game/Networking/Packets/TicketPackets.cs @@ -2,7 +2,6 @@ // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. using Framework.Constants; -using Framework.Dynamic; using Game.Entities; using System; using System.Collections.Generic; @@ -125,19 +124,19 @@ namespace Game.Networking.Packets bool hasCalendarInfo = _worldPacket.HasBit(); bool hasPetInfo = _worldPacket.HasBit(); bool hasGuildInfo = _worldPacket.HasBit(); - bool hasLFGListSearchResult = _worldPacket.HasBit(); - bool hasLFGListApplicant = _worldPacket.HasBit(); - bool hasClubMessage = _worldPacket.HasBit(); + bool hasLfgListEntryInfo = _worldPacket.HasBit(); + bool hasLfgListAppInfo = _worldPacket.HasBit(); + bool hasVoiceChatInfo = _worldPacket.HasBit(); bool hasClubFinderResult = _worldPacket.HasBit(); - bool hasUnk910 = _worldPacket.HasBit(); + bool hasArenaTeamInfo = _worldPacket.HasBit(); _worldPacket.ResetBitPos(); - if (hasClubMessage) + if (hasVoiceChatInfo) { - SupportTicketCommunityMessage communityMessage = new(); - communityMessage.IsPlayerUsingVoice = _worldPacket.HasBit(); - CommunityMessage = communityMessage; + SupportTicketVoiceChatInfo voiceChatInfo = new(); + voiceChatInfo.TargetIsCurrentlyInVoiceChatWithPlayer = _worldPacket.HasBit(); + VoiceChatInfo = voiceChatInfo; _worldPacket.ResetBitPos(); } @@ -169,28 +168,28 @@ namespace Game.Networking.Packets GuildInfo.Value.Read(_worldPacket); } - if (hasLFGListSearchResult) + if (hasLfgListEntryInfo) { - LFGListSearchResult = new(); - LFGListSearchResult.Value.Read(_worldPacket); + LfgListEntryInfo = new(); + LfgListEntryInfo.Value.Read(_worldPacket); } - if (hasLFGListApplicant) + if (hasLfgListAppInfo) { - LFGListApplicant = new(); - LFGListApplicant.Value.Read(_worldPacket); + LfgListAppInfo = new(); + LfgListAppInfo.Value.Read(_worldPacket); } if (hasClubFinderResult) { - ClubFinderResult = new(); - ClubFinderResult.Value.Read(_worldPacket); + ClubFinderInfo = new(); + ClubFinderInfo.Value.Read(_worldPacket); } - if (hasUnk910) + if (hasArenaTeamInfo) { - Unused910 = new(); - Unused910.Value.Read(_worldPacket); + ArenaTeamInfo = new(); + ArenaTeamInfo.Value.Read(_worldPacket); } } @@ -206,11 +205,11 @@ namespace Game.Networking.Packets public SupportTicketCalendarEventInfo? CalenderInfo; public SupportTicketPetInfo? PetInfo; public SupportTicketGuildInfo? GuildInfo; - public SupportTicketLFGListSearchResult? LFGListSearchResult; - public SupportTicketLFGListApplicant? LFGListApplicant; - public SupportTicketCommunityMessage? CommunityMessage; - public SupportTicketClubFinderResult? ClubFinderResult; - public SupportTicketUnused910? Unused910; + public SupportTicketLFGListEntryInfo? LfgListEntryInfo; + public SupportTicketLFGListApplicant? LfgListAppInfo; + public SupportTicketVoiceChatInfo? VoiceChatInfo; + public SupportTicketClubFinderInfo? ClubFinderInfo; + public SupportTicketArenaTeamInfo? ArenaTeamInfo; public struct SupportTicketChatLine { @@ -383,88 +382,88 @@ namespace Game.Networking.Packets public string GuildName; } - public struct SupportTicketLFGListSearchResult + public struct SupportTicketLFGListEntryInfo { + public RideTicket Ticket; + public uint ActivityID; + public byte FactionID; + public ObjectGuid LastTouchedName; + public ObjectGuid LastTouchedComment; + public ObjectGuid LastTouchedVoiceChat; + public ObjectGuid LastTouchedAny; + public ObjectGuid PartyGuid; + public string Name; + public string Comment; + public string VoiceChat; + public void Read(WorldPacket data) { - RideTicket = new RideTicket(); - RideTicket.Read(data); + Ticket = new RideTicket(); + Ticket.Read(data); - GroupFinderActivityID = data.ReadUInt32(); - Unknown1007 = data.ReadUInt8(); - LastTitleAuthorGuid = data.ReadPackedGuid(); - LastDescriptionAuthorGuid = data.ReadPackedGuid(); - LastVoiceChatAuthorGuid = data.ReadPackedGuid(); - ListingCreatorGuid = data.ReadPackedGuid(); - Unknown735 = data.ReadPackedGuid(); + ActivityID = data.ReadUInt32(); + FactionID = data.ReadUInt8(); + LastTouchedName = data.ReadPackedGuid(); + LastTouchedComment = data.ReadPackedGuid(); + LastTouchedVoiceChat = data.ReadPackedGuid(); + LastTouchedAny = data.ReadPackedGuid(); + PartyGuid = data.ReadPackedGuid(); - byte titleLength = data.ReadBits(10); - byte descriptionLength = data.ReadBits(11); + byte nameLength = data.ReadBits(10); + byte commentLength = data.ReadBits(11); byte voiceChatLength = data.ReadBits(8); - Title = data.ReadString(titleLength); - Description = data.ReadString(descriptionLength); + Name = data.ReadString(nameLength); + Comment = data.ReadString(commentLength); VoiceChat = data.ReadString(voiceChatLength); } - - public RideTicket RideTicket; - public uint GroupFinderActivityID; - public byte Unknown1007; - public ObjectGuid LastTitleAuthorGuid; - public ObjectGuid LastDescriptionAuthorGuid; - public ObjectGuid LastVoiceChatAuthorGuid; - public ObjectGuid ListingCreatorGuid; - public ObjectGuid Unknown735; - public string Title; - public string Description; - public string VoiceChat; } public struct SupportTicketLFGListApplicant { + public RideTicket Ticket; + public string Comment; + public void Read(WorldPacket data) { - RideTicket = new RideTicket(); - RideTicket.Read(data); + Ticket = new RideTicket(); + Ticket.Read(data); Comment = data.ReadString(data.ReadBits(9)); } - - public RideTicket RideTicket; - public string Comment; } - public struct SupportTicketCommunityMessage + public struct SupportTicketVoiceChatInfo { - public bool IsPlayerUsingVoice; + public bool TargetIsCurrentlyInVoiceChatWithPlayer; } - public struct SupportTicketClubFinderResult + public struct SupportTicketClubFinderInfo { - public ulong ClubFinderPostingID; + public ulong PostingID; public ulong ClubID; - public ObjectGuid ClubFinderGUID; - public string ClubName; + public ObjectGuid GuildID; + public string PostingDescription; public void Read(WorldPacket data) { - ClubFinderPostingID = data.ReadUInt64(); + PostingID = data.ReadUInt64(); ClubID = data.ReadUInt64(); - ClubFinderGUID = data.ReadPackedGuid(); - ClubName = data.ReadString(data.ReadBits(12)); + GuildID = data.ReadPackedGuid(); + PostingDescription = data.ReadString(data.ReadBits(12)); } } - public struct SupportTicketUnused910 + public struct SupportTicketArenaTeamInfo { - public string field_0; - public ObjectGuid field_104; + public string ArenaTeamName; + public ObjectGuid ArenaTeamID; public void Read(WorldPacket data) { - uint field_0Length = data.ReadBits(7); - field_104 = data.ReadPackedGuid(); - field_0 = data.ReadString(field_0Length); + uint arenaTeamNameLength = data.ReadBits(7); + ArenaTeamID = data.ReadPackedGuid(); + ArenaTeamName = data.ReadString(arenaTeamNameLength); } } } diff --git a/Source/Game/Networking/Packets/TokenPackets.cs b/Source/Game/Networking/Packets/TokenPackets.cs index deb43d235..03c73c191 100644 --- a/Source/Game/Networking/Packets/TokenPackets.cs +++ b/Source/Game/Networking/Packets/TokenPackets.cs @@ -12,10 +12,10 @@ namespace Game.Networking.Packets public override void Read() { - UnkInt = _worldPacket.ReadUInt32(); + ClientToken = _worldPacket.ReadUInt32(); } - public uint UnkInt; + public uint ClientToken; } class CommerceTokenGetLogResponse : ServerPacket @@ -24,30 +24,30 @@ namespace Game.Networking.Packets public override void Write() { - _worldPacket.WriteUInt32(UnkInt); + _worldPacket.WriteUInt32(ClientToken); _worldPacket.WriteUInt32((uint)Result); - _worldPacket.WriteInt32(AuctionableTokenAuctionableList.Count); + _worldPacket.WriteInt32(AuctionableTokens.Count); - foreach (AuctionableTokenInfo auctionableTokenAuctionable in AuctionableTokenAuctionableList) + foreach (AuctionableTokenInfo auctionableTokenAuctionable in AuctionableTokens) { - _worldPacket.WriteUInt64(auctionableTokenAuctionable.UnkInt1); - _worldPacket.WriteInt64(auctionableTokenAuctionable.UnkInt2); - _worldPacket.WriteUInt64(auctionableTokenAuctionable.BuyoutPrice); - _worldPacket.WriteUInt32(auctionableTokenAuctionable.Owner); + _worldPacket.WriteUInt64(auctionableTokenAuctionable.Id); + _worldPacket.WriteInt64(auctionableTokenAuctionable.LastUpdate); + _worldPacket.WriteUInt64(auctionableTokenAuctionable.Price); + _worldPacket.WriteUInt32(auctionableTokenAuctionable.Status); _worldPacket.WriteUInt32(auctionableTokenAuctionable.DurationLeft); } } - public uint UnkInt; // send CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST + public uint ClientToken; public TokenResult Result; - List AuctionableTokenAuctionableList = new(); + List AuctionableTokens = new(); struct AuctionableTokenInfo { - public ulong UnkInt1; - public long UnkInt2; - public uint Owner; - public ulong BuyoutPrice; + public ulong Id; + public long LastUpdate; + public uint Status; + public ulong Price; public uint DurationLeft; } } @@ -58,10 +58,10 @@ namespace Game.Networking.Packets public override void Read() { - UnkInt = _worldPacket.ReadUInt32(); + ClientToken = _worldPacket.ReadUInt32(); } - public uint UnkInt; + public uint ClientToken; } class CommerceTokenGetMarketPriceResponse : ServerPacket @@ -70,15 +70,15 @@ namespace Game.Networking.Packets public override void Write() { - _worldPacket.WriteUInt64(CurrentMarketPrice); - _worldPacket.WriteUInt32(UnkInt); - _worldPacket.WriteUInt32((uint)Result); - _worldPacket.WriteUInt32(AuctionDuration); + _worldPacket.WriteUInt64(PriceGuarantee); + _worldPacket.WriteUInt32(ClientToken); + _worldPacket.WriteUInt32((uint)ServerToken); + _worldPacket.WriteUInt32(PriceLockDurationSeconds); } - public ulong CurrentMarketPrice; - public uint UnkInt; // send CMSG_REQUEST_WOW_TOKEN_MARKET_PRICE - public TokenResult Result; - public uint AuctionDuration; // preset auction duration enum + public ulong PriceGuarantee; + public uint ClientToken; + public TokenResult ServerToken; + public uint PriceLockDurationSeconds; } }