Core/PacketIO: Updated to 11.0.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/e59eef5432c7b70679d33f4911c88d0f7d75fd39)
This commit is contained in:
@@ -54,6 +54,7 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(TriggerGUID);
|
||||
_worldPacket.WritePackedGuid(Unused_1100);
|
||||
|
||||
_worldPacket.WriteBit(AreaTriggerSpline != null);
|
||||
_worldPacket.WriteBit(AreaTriggerOrbit != null);
|
||||
@@ -74,6 +75,7 @@ namespace Game.Networking.Packets
|
||||
public AreaTriggerOrbitInfo AreaTriggerOrbit;
|
||||
public AreaTriggerMovementScriptInfo? AreaTriggerMovementScript;
|
||||
public ObjectGuid TriggerGUID;
|
||||
public ObjectGuid Unused_1100;
|
||||
}
|
||||
|
||||
class AreaTriggerPlaySpellVisual : ServerPacket
|
||||
|
||||
@@ -55,15 +55,15 @@ namespace Game.Networking.Packets
|
||||
uint itemClassFilterCount = _worldPacket.ReadBits<uint>(3);
|
||||
uint sortSize = _worldPacket.ReadBits<uint>(2);
|
||||
|
||||
for (var i = 0; i < sortSize; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
Name = _worldPacket.ReadString(nameLength);
|
||||
for (var i = 0; i < itemClassFilterCount; ++i)// AuctionListFilterClass filterClass in ItemClassFilters)
|
||||
for (var i = 0; i < itemClassFilterCount; ++i)
|
||||
ItemClassFilters[i] = new AuctionListFilterClass(_worldPacket);
|
||||
|
||||
for (var i = 0; i < sortSize; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,14 +141,14 @@ namespace Game.Networking.Packets
|
||||
uint auctionIDCount = _worldPacket.ReadBits<uint>(7);
|
||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
for (var i = 0; i < auctionIDCount; ++i)
|
||||
AuctionItemIDs[i] = _worldPacket.ReadUInt32();
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,14 +170,14 @@ namespace Game.Networking.Packets
|
||||
uint bucketKeysCount = _worldPacket.ReadBits<uint>(7);
|
||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
for (var i = 0; i < bucketKeysCount; ++i)
|
||||
BucketKeys[i] = new AuctionBucketKey(_worldPacket);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,13 +201,14 @@ namespace Game.Networking.Packets
|
||||
TaintedBy = new();
|
||||
|
||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
BucketKey = new AuctionBucketKey(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,11 +235,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,11 +261,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
uint sortCount = _worldPacket.ReadBits<uint>(2);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
|
||||
if (TaintedBy.HasValue)
|
||||
TaintedBy.Value.Read(_worldPacket);
|
||||
|
||||
for (var i = 0; i < sortCount; ++i)
|
||||
Sorts[i] = new AuctionSortDef(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -357,12 +357,12 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Serial = (ConnectToSerial)_worldPacket.ReadUInt32();
|
||||
Con = _worldPacket.ReadUInt8();
|
||||
Serial = (ConnectToSerial)_worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public ConnectToSerial Serial;
|
||||
byte Con;
|
||||
public byte Con;
|
||||
}
|
||||
|
||||
class EnterEncryptedMode : ServerPacket
|
||||
|
||||
@@ -84,13 +84,13 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Tier = _worldPacket.ReadInt32();
|
||||
AzeritePowerID = _worldPacket.ReadInt32();
|
||||
ContainerSlot = _worldPacket.ReadUInt8();
|
||||
Slot = _worldPacket.ReadUInt8();
|
||||
Tier = _worldPacket.ReadUInt8();
|
||||
AzeritePowerID = _worldPacket.ReadInt32();
|
||||
}
|
||||
|
||||
public int Tier;
|
||||
public byte Tier;
|
||||
public int AzeritePowerID;
|
||||
public byte ContainerSlot;
|
||||
public byte Slot;
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Game.Entities;
|
||||
using Framework.Constants;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
public class AutoBankItem : ClientPacket
|
||||
{
|
||||
public InvUpdate Inv;
|
||||
public BankType BankType;
|
||||
public byte Bag;
|
||||
public byte Slot;
|
||||
|
||||
@@ -16,6 +18,7 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
Inv = new InvUpdate(_worldPacket);
|
||||
BankType = (BankType)_worldPacket.ReadInt8();
|
||||
Bag = _worldPacket.ReadUInt8();
|
||||
Slot = _worldPacket.ReadUInt8();
|
||||
}
|
||||
@@ -94,4 +97,18 @@ namespace Game.Networking.Packets
|
||||
|
||||
public ObjectGuid Banker;
|
||||
}
|
||||
|
||||
class BankerActivate : ClientPacket
|
||||
{
|
||||
public ObjectGuid Banker;
|
||||
public PlayerInteractionType InteractionType;
|
||||
|
||||
public BankerActivate(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Banker = _worldPacket.ReadPackedGuid();
|
||||
InteractionType = (PlayerInteractionType)_worldPacket.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WriteUInt8((byte)GetEventType);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt16((ushort)Flags);
|
||||
Date.Write(_worldPacket);
|
||||
LockDate.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt64(EventGuildID);
|
||||
@@ -216,7 +216,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
Date.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt16((ushort)Flags);
|
||||
_worldPacket.WriteUInt8((byte)EventType);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WriteUInt64(EventClubID);
|
||||
@@ -229,6 +229,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(OwnerGuid);
|
||||
|
||||
_worldPacket.WriteBits(EventName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBit(Unknown_1100);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(EventName);
|
||||
}
|
||||
@@ -245,6 +246,7 @@ namespace Game.Networking.Packets
|
||||
public CalendarEventType EventType;
|
||||
public CalendarModerationRank ModeratorStatus;
|
||||
public string EventName;
|
||||
public bool Unknown_1100;
|
||||
}
|
||||
|
||||
class CalendarInvitePkt : ClientPacket
|
||||
@@ -390,7 +392,7 @@ namespace Game.Networking.Packets
|
||||
OriginalDate.Write(_worldPacket);
|
||||
Date.Write(_worldPacket);
|
||||
LockDate.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt16((ushort)Flags);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WriteUInt8((byte)EventType);
|
||||
|
||||
@@ -794,7 +796,7 @@ namespace Game.Networking.Packets
|
||||
TextureID = data.ReadUInt32();
|
||||
Time = new();
|
||||
Time.Read(data);
|
||||
Flags = data.ReadUInt32();
|
||||
Flags = data.ReadUInt16();
|
||||
|
||||
byte titleLen = data.ReadBits<byte>(8);
|
||||
ushort descLen = data.ReadBits<ushort>(11);
|
||||
@@ -811,7 +813,7 @@ namespace Game.Networking.Packets
|
||||
public byte EventType;
|
||||
public uint TextureID;
|
||||
public WowTime Time;
|
||||
public uint Flags;
|
||||
public ushort Flags;
|
||||
}
|
||||
|
||||
struct CalendarSendCalendarInviteInfo
|
||||
@@ -859,7 +861,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt64(EventID);
|
||||
data.WriteUInt8((byte)EventType);
|
||||
Date.Write(data);
|
||||
data.WriteUInt32((uint)Flags);
|
||||
data.WriteUInt16((ushort)Flags);
|
||||
data.WriteInt32(TextureID);
|
||||
data.WriteUInt64(EventClubID);
|
||||
data.WritePackedGuid(OwnerGuid);
|
||||
|
||||
@@ -27,17 +27,21 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_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(DontCreateCharacterDisplays);
|
||||
_worldPacket.WriteInt32(Characters.Count);
|
||||
_worldPacket.WriteInt32(RegionwideCharacters.Count);
|
||||
_worldPacket.WriteInt32(MaxCharacterLevel);
|
||||
_worldPacket.WriteInt32(RaceUnlockData.Count);
|
||||
_worldPacket.WriteInt32(UnlockedConditionalAppearances.Count);
|
||||
_worldPacket.WriteInt32(RaceLimitDisables.Count);
|
||||
_worldPacket.WriteInt32(WarbandGroups.Count);
|
||||
|
||||
if (DisabledClassesMask.HasValue)
|
||||
_worldPacket.WriteUInt32(DisabledClassesMask.Value);
|
||||
@@ -48,7 +52,13 @@ namespace Game.Networking.Packets
|
||||
foreach (RaceLimitDisableInfo raceLimitDisableInfo in RaceLimitDisables)
|
||||
raceLimitDisableInfo.Write(_worldPacket);
|
||||
|
||||
foreach (CharacterInfo charInfo in Characters)
|
||||
foreach (WarbandGroup warbandGroup in WarbandGroups)
|
||||
warbandGroup.Write(_worldPacket);
|
||||
|
||||
foreach (CharacterInfoBasic charInfo in Characters)
|
||||
charInfo.Write(_worldPacket);
|
||||
|
||||
foreach (RegionwideCharacterListEntry charInfo in RegionwideCharacters)
|
||||
charInfo.Write(_worldPacket);
|
||||
|
||||
foreach (RaceUnlock raceUnlock in RaceUnlockData)
|
||||
@@ -56,25 +66,30 @@ 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 DontCreateCharacterDisplays;
|
||||
|
||||
public int MaxCharacterLevel = 1;
|
||||
public uint? DisabledClassesMask = new();
|
||||
|
||||
public List<CharacterInfo> Characters = new(); // all characters on the list
|
||||
public List<RaceUnlock> RaceUnlockData = new(); //
|
||||
public List<CharacterInfoBasic> Characters = new(); // all characters on the list
|
||||
public List<RegionwideCharacterListEntry> RegionwideCharacters = new();
|
||||
public List<RaceUnlock> RaceUnlockData = new();
|
||||
public List<UnlockedConditionalAppearance> UnlockedConditionalAppearances = new();
|
||||
public List<RaceLimitDisableInfo> RaceLimitDisables = new();
|
||||
public List<WarbandGroup> WarbandGroups = new();
|
||||
|
||||
public class CharacterInfo
|
||||
public class CharacterInfoBasic
|
||||
{
|
||||
public CharacterInfo(SQLFields fields)
|
||||
public CharacterInfoBasic(SQLFields fields)
|
||||
{
|
||||
Guid = ObjectGuid.Create(HighGuid.Player, fields.Read<ulong>(0));
|
||||
VirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress();
|
||||
Name = fields.Read<string>(1);
|
||||
RaceId = fields.Read<byte>(2);
|
||||
ClassId = (Class)fields.Read<byte>(3);
|
||||
@@ -116,8 +131,6 @@ namespace Game.Networking.Packets
|
||||
else if (atLoginFlags.HasAnyFlag(AtLoginFlags.ChangeRace))
|
||||
Flags2 = CharacterCustomizeFlags.Race;
|
||||
|
||||
Flags3 = 0;
|
||||
Flags4 = 0;
|
||||
FirstLogin = atLoginFlags.HasAnyFlag(AtLoginFlags.FirstLogin);
|
||||
|
||||
// show pet at selection character in character list only for non-ghost character
|
||||
@@ -132,7 +145,6 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
BoostInProgress = false;
|
||||
ProfessionIds[0] = 0;
|
||||
ProfessionIds[1] = 0;
|
||||
|
||||
@@ -168,41 +180,42 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(Guid);
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WriteUInt32(VirtualRealmAddress);
|
||||
data.WriteUInt8(ListPosition);
|
||||
data.WriteUInt8(RaceId);
|
||||
data.WriteUInt8((byte)ClassId);
|
||||
data.WriteUInt8(SexId);
|
||||
data.WriteUInt8((byte)ClassId);
|
||||
data.WriteInt16(SpecID);
|
||||
data.WriteInt32(Customizations.Count);
|
||||
|
||||
data.WriteUInt8(ExperienceLevel);
|
||||
data.WriteUInt32(ZoneId);
|
||||
data.WriteUInt32(MapId);
|
||||
data.WriteUInt32(ZoneId);
|
||||
data.WriteVector3(PreloadPos);
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WritePackedGuid(GuildGuid);
|
||||
data.WriteUInt32((uint)Flags);
|
||||
data.WriteUInt32((uint)Flags2);
|
||||
data.WriteUInt32(Flags3);
|
||||
data.WriteUInt8(unkWod61x);
|
||||
|
||||
data.WriteUInt32(PetCreatureDisplayId);
|
||||
data.WriteUInt32(PetExperienceLevel);
|
||||
data.WriteUInt32(PetCreatureFamilyId);
|
||||
|
||||
data.WriteUInt32(ProfessionIds[0]);
|
||||
data.WriteUInt32(ProfessionIds[1]);
|
||||
|
||||
foreach (var visualItem in VisualItems)
|
||||
visualItem.Write(data);
|
||||
|
||||
data.WriteInt64(LastPlayedTime);
|
||||
data.WriteInt16(SpecID);
|
||||
data.WriteInt32(Unknown703);
|
||||
data.WriteInt64(LastPlayedTime);
|
||||
data.WriteInt32(LastLoginVersion);
|
||||
data.WriteUInt32(Flags4);
|
||||
data.WriteInt32(MailSenders.Count);
|
||||
data.WriteInt32(MailSenderTypes.Count);
|
||||
data.WriteUInt32(OverrideSelectScreenFileDataID);
|
||||
PersonalTabard.Write(data);
|
||||
|
||||
data.WriteUInt32(ProfessionIds[0]);
|
||||
data.WriteUInt32(ProfessionIds[1]);
|
||||
|
||||
data.WriteInt32(TimerunningSeasonID);
|
||||
data.WriteUInt32(OverrideSelectScreenFileDataID);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
{
|
||||
@@ -210,29 +223,15 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(customization.ChrCustomizationChoiceID);
|
||||
}
|
||||
|
||||
foreach (var mailSenderType in MailSenderTypes)
|
||||
data.WriteUInt32(mailSenderType);
|
||||
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteBit(FirstLogin);
|
||||
data.WriteBit(BoostInProgress);
|
||||
data.WriteBits(unkWod61x, 5);
|
||||
data.WriteBit(RpeResetAvailable);
|
||||
data.WriteBit(RpeResetQuestClearAvailable);
|
||||
|
||||
foreach (string str in MailSenders)
|
||||
data.WriteBits(str.GetByteCount() + 1, 6);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
foreach (string str in MailSenders)
|
||||
if (!str.IsEmpty())
|
||||
data.WriteCString(str);
|
||||
|
||||
data.WriteString(Name);
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
public uint VirtualRealmAddress;
|
||||
public ulong GuildClubMemberID; // same as bgs.protocol.club.v1.MemberId.unique_id, guessed basing on SMSG_QUERY_PLAYER_NAME_RESPONSE (that one is known)
|
||||
public string Name;
|
||||
public byte ListPosition; // Order of the characters in list
|
||||
@@ -248,7 +247,6 @@ namespace Game.Networking.Packets
|
||||
public CharacterFlags Flags; // Character flag @see enum CharacterFlags
|
||||
public CharacterCustomizeFlags Flags2; // Character customization flags @see enum CharacterCustomizeFlags
|
||||
public uint Flags3; // Character flags 3 @todo research
|
||||
public uint Flags4;
|
||||
public bool FirstLogin;
|
||||
public byte unkWod61x;
|
||||
public long LastPlayedTime;
|
||||
@@ -260,24 +258,20 @@ namespace Game.Networking.Packets
|
||||
public uint PetCreatureDisplayId;
|
||||
public uint PetExperienceLevel;
|
||||
public uint PetCreatureFamilyId;
|
||||
public bool BoostInProgress; // @todo
|
||||
public uint[] ProfessionIds = new uint[2]; // @todo
|
||||
public VisualItemInfo[] VisualItems = new VisualItemInfo[19];
|
||||
public List<string> MailSenders = new();
|
||||
public List<uint> MailSenderTypes = new();
|
||||
public bool RpeResetAvailable = false;
|
||||
public bool RpeResetQuestClearAvailable = false;
|
||||
public CustomTabardInfo PersonalTabard = new();
|
||||
public CustomTabardInfo PersonalTabard;
|
||||
|
||||
public struct VisualItemInfo
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(DisplayId);
|
||||
data.WriteUInt32(DisplayEnchantId);
|
||||
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
|
||||
data.WriteUInt8(InvType);
|
||||
data.WriteUInt32(DisplayEnchantId);
|
||||
data.WriteUInt8(Subclass);
|
||||
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
|
||||
data.WriteUInt32(ItemID);
|
||||
}
|
||||
|
||||
public uint DisplayId;
|
||||
@@ -285,6 +279,7 @@ namespace Game.Networking.Packets
|
||||
public uint SecondaryItemModifiedAppearanceID; // also -1 is some special value
|
||||
public byte InvType;
|
||||
public byte Subclass;
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
public struct PetInfo
|
||||
@@ -295,6 +290,85 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public class CharacterRestrictionAndMailData
|
||||
{
|
||||
public bool BoostInProgress; ///< @todo
|
||||
public uint Flags4;
|
||||
public List<string> MailSenders = new();
|
||||
public List<uint> MailSenderTypes = new();
|
||||
public bool RpeResetAvailable;
|
||||
public bool RpeResetQuestClearAvailable;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
Cypher.Assert(MailSenders.Count == MailSenderTypes.Count);
|
||||
|
||||
data.WriteBit(BoostInProgress);
|
||||
data.WriteBit(RpeResetAvailable);
|
||||
data.WriteBit(RpeResetQuestClearAvailable);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteUInt32(Flags4);
|
||||
data.WriteInt32(MailSenders.Count);
|
||||
data.WriteInt32(MailSenderTypes.Count);
|
||||
|
||||
if (!MailSenderTypes.Empty())
|
||||
foreach (var type in MailSenderTypes)
|
||||
data.WriteUInt32(type);
|
||||
|
||||
foreach (string str in MailSenders)
|
||||
data.WriteBits(str.GetByteCount() + 1, 6);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
foreach (string str in MailSenders)
|
||||
if (!str.IsEmpty())
|
||||
data.WriteCString(str);
|
||||
}
|
||||
}
|
||||
|
||||
public struct CharacterInfo
|
||||
{
|
||||
public CharacterInfoBasic Basic;
|
||||
public CharacterRestrictionAndMailData RestrictionsAndMails;
|
||||
|
||||
public CharacterInfo(SQLFields fields)
|
||||
{
|
||||
Basic = new(fields);
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
Basic.Write(data);
|
||||
RestrictionsAndMails.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
public struct RegionwideCharacterListEntry
|
||||
{
|
||||
public CharacterInfoBasic Basic;
|
||||
public ulong Money;
|
||||
public float CurrentSeasonMythicPlusOverallScore;
|
||||
public uint CurrentSeasonBestPvpRating;
|
||||
public sbyte PvpRatingBracket;
|
||||
public short PvpRatingAssociatedSpecID;
|
||||
|
||||
public RegionwideCharacterListEntry(SQLFields fields)
|
||||
{
|
||||
Basic = new(fields);
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
Basic.Write(data);
|
||||
data.WriteUInt64(Money);
|
||||
data.WriteFloat(CurrentSeasonMythicPlusOverallScore);
|
||||
data.WriteUInt32(CurrentSeasonBestPvpRating);
|
||||
data.WriteInt8(PvpRatingBracket);
|
||||
data.WriteInt16(PvpRatingAssociatedSpecID);
|
||||
}
|
||||
}
|
||||
|
||||
public struct RaceUnlock
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
@@ -883,6 +957,7 @@ namespace Game.Networking.Packets
|
||||
NewSex = _worldPacket.ReadUInt8();
|
||||
CustomizedRace = _worldPacket.ReadInt32();
|
||||
CustomizedChrModelID = _worldPacket.ReadInt32();
|
||||
UnalteredVisualRaceID = _worldPacket.ReadInt32();
|
||||
|
||||
for (var i = 0; i < customizationCount; ++i)
|
||||
{
|
||||
@@ -900,6 +975,7 @@ namespace Game.Networking.Packets
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
public int CustomizedRace;
|
||||
public int CustomizedChrModelID;
|
||||
public int UnalteredVisualRaceID;
|
||||
}
|
||||
|
||||
public class BarberShopResult : ServerPacket
|
||||
@@ -1211,4 +1287,38 @@ namespace Game.Networking.Packets
|
||||
BackgroundColor = data.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public struct WarbandGroupMember
|
||||
{
|
||||
public int WarbandScenePlacementID;
|
||||
public int Type;
|
||||
public ObjectGuid Guid;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(WarbandScenePlacementID);
|
||||
data.WriteInt32(Type);
|
||||
if (Type == 0)
|
||||
data.WritePackedGuid(Guid);
|
||||
}
|
||||
}
|
||||
|
||||
public class WarbandGroup
|
||||
{
|
||||
public ulong GroupID;
|
||||
public byte Unknown_1100;
|
||||
public int Flags; ///< enum WarbandGroupFlags { Collapsed = 1 }
|
||||
public List<WarbandGroupMember> Members = new();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(GroupID);
|
||||
data.WriteUInt8(Unknown_1100);
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteInt32(Members.Count);
|
||||
|
||||
foreach (WarbandGroupMember member in Members)
|
||||
member.Write(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(powerDrainTarget.Victim);
|
||||
_worldPacket.WriteUInt32(powerDrainTarget.Points);
|
||||
_worldPacket.WriteUInt32(powerDrainTarget.PowerType);
|
||||
_worldPacket.WriteInt8((sbyte)powerDrainTarget.PowerType);
|
||||
_worldPacket.WriteFloat(powerDrainTarget.Amplitude);
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public ObjectGuid Victim;
|
||||
public uint Points;
|
||||
public uint PowerType;
|
||||
public PowerType PowerType;
|
||||
public float Amplitude;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,8 +169,8 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(Powers.Count);
|
||||
foreach (var power in Powers)
|
||||
{
|
||||
_worldPacket.WriteInt32(power.Power);
|
||||
_worldPacket.WriteUInt8(power.PowerType);
|
||||
_worldPacket.WriteInt32(power.Power);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,16 +180,16 @@ namespace Game.Networking.Packets
|
||||
|
||||
class InterruptPowerRegen : ServerPacket
|
||||
{
|
||||
public int PowerType;
|
||||
public sbyte PowerType;
|
||||
|
||||
public InterruptPowerRegen(PowerType powerType) : base(ServerOpcodes.InterruptPowerRegen, ConnectionType.Instance)
|
||||
{
|
||||
PowerType = (int)powerType;
|
||||
PowerType = (sbyte)powerType;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(PowerType);
|
||||
_worldPacket.WriteInt8(PowerType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace Game.Networking.Packets
|
||||
public ItemInstance OldItem = new();
|
||||
public ItemInstance NewItem = new();
|
||||
public int EnchantID;
|
||||
public int ConcentrationCurrencyID;
|
||||
public int ConcentrationSpent;
|
||||
public int IngenuityRefund;
|
||||
public bool HasIngenuityProc;
|
||||
public bool ApplyConcentration;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -59,6 +64,9 @@ namespace Game.Networking.Packets
|
||||
data.WritePackedGuid(ItemGUID);
|
||||
data.WriteInt32(Quantity);
|
||||
data.WriteInt32(EnchantID);
|
||||
data.WriteInt32(ConcentrationCurrencyID);
|
||||
data.WriteInt32(ConcentrationSpent);
|
||||
data.WriteInt32(IngenuityRefund);
|
||||
|
||||
foreach (SpellReducedReagent spellReducedReagent in ResourcesReturned)
|
||||
spellReducedReagent.Write(data);
|
||||
@@ -67,6 +75,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(field_29);
|
||||
data.WriteBit(field_2A);
|
||||
data.WriteBit(BonusCraft);
|
||||
data.WriteBit(HasIngenuityProc);
|
||||
data.WriteBit(ApplyConcentration);
|
||||
data.FlushBits();
|
||||
|
||||
OldItem.Write(data);
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt64(GUID);
|
||||
_worldPacket.WriteInt32(Type);
|
||||
_worldPacket.WriteUInt32(SetID);
|
||||
_worldPacket.WriteUInt64(GUID);
|
||||
}
|
||||
|
||||
public ulong GUID; // Set Identifier
|
||||
@@ -159,11 +159,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Reason);
|
||||
_worldPacket.WriteUInt64(GUID);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
}
|
||||
|
||||
public ulong GUID; //Set Identifier
|
||||
public byte Reason;
|
||||
public int Reason;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public GarrisonError Result;
|
||||
public uint GarrSiteID;
|
||||
public uint GarrSiteID;
|
||||
}
|
||||
|
||||
class GetGarrisonInfo : ClientPacket
|
||||
@@ -103,7 +103,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
BuildingInfo.Write(_worldPacket);
|
||||
_worldPacket.WriteBit(PlayActivationCinematic);
|
||||
@@ -136,7 +136,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(GarrPlotInstanceID);
|
||||
_worldPacket.WriteUInt32(GarrBuildingID);
|
||||
@@ -154,7 +154,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(BuildingID);
|
||||
}
|
||||
@@ -170,14 +170,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(BuildingID);
|
||||
}
|
||||
|
||||
public GarrisonType GarrTypeID;
|
||||
public uint BuildingID;
|
||||
public GarrisonError Result;
|
||||
public uint BuildingID;
|
||||
}
|
||||
|
||||
class GarrisonRequestBlueprintAndSpecializationData : ClientPacket
|
||||
@@ -193,7 +193,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32((uint)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteInt32(BlueprintsKnown != null ? BlueprintsKnown.Count : 0);
|
||||
_worldPacket.WriteInt32(SpecializationsKnown != null ? SpecializationsKnown.Count : 0);
|
||||
if (BlueprintsKnown != null)
|
||||
@@ -206,8 +206,8 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public GarrisonType GarrTypeID;
|
||||
public List<uint> SpecializationsKnown = null;
|
||||
public List<uint> BlueprintsKnown = null;
|
||||
public List<uint> SpecializationsKnown = null;
|
||||
}
|
||||
|
||||
class GarrisonGetMapData : ClientPacket
|
||||
@@ -237,7 +237,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
PlotInfo.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -263,8 +263,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket .WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt8((byte)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
Follower.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -279,15 +279,15 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt64(FollowerDBID);
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt8(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt64(FollowerDBID);
|
||||
_worldPacket.WriteUInt32(Destroyed);
|
||||
}
|
||||
|
||||
public ulong FollowerDBID;
|
||||
public int GarrTypeID;
|
||||
public byte GarrTypeID;
|
||||
public uint Result;
|
||||
public ulong FollowerDBID;
|
||||
public uint Destroyed;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public uint GarrPlotInstanceID;
|
||||
}
|
||||
|
||||
|
||||
//Structs
|
||||
public struct GarrisonPlotInfo
|
||||
{
|
||||
@@ -310,12 +310,12 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
data.WriteUInt32(GarrPlotInstanceID);
|
||||
data.WriteXYZO(PlotPos);
|
||||
data.WriteUInt32(PlotType);
|
||||
data.WriteUInt8(PlotType);
|
||||
}
|
||||
|
||||
public uint GarrPlotInstanceID;
|
||||
public Position PlotPos;
|
||||
public uint PlotType;
|
||||
public byte PlotType;
|
||||
}
|
||||
|
||||
public class GarrisonBuildingInfo
|
||||
@@ -600,7 +600,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32((uint)GarrTypeID);
|
||||
data.WriteUInt8((byte)GarrTypeID);
|
||||
data.WriteUInt32(GarrSiteID);
|
||||
data.WriteUInt32(GarrSiteLevelID);
|
||||
data.WriteInt32(Buildings.Count);
|
||||
@@ -700,11 +700,11 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(GarrFollowerTypeID);
|
||||
data.WriteUInt8(GarrFollowerTypeID);
|
||||
data.WriteUInt32(Count);
|
||||
}
|
||||
|
||||
public int GarrFollowerTypeID;
|
||||
public byte GarrFollowerTypeID;
|
||||
public uint Count;
|
||||
}
|
||||
|
||||
|
||||
@@ -183,9 +183,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public class AcceptGuildInvite : ClientPacket
|
||||
{
|
||||
public ObjectGuid GuildGuid;
|
||||
|
||||
public AcceptGuildInvite(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
public override void Read()
|
||||
{
|
||||
GuildGuid = _worldPacket.ReadPackedGuid();
|
||||
}
|
||||
}
|
||||
|
||||
public class GuildDeclineInvitation : ClientPacket
|
||||
@@ -297,7 +302,6 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.WriteBit(LoggedOn);
|
||||
_worldPacket.WriteBit(Mobile);
|
||||
|
||||
_worldPacket.WriteString(Name);
|
||||
}
|
||||
@@ -305,7 +309,6 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid Guid;
|
||||
public uint VirtualRealmAddress;
|
||||
public string Name;
|
||||
public bool Mobile;
|
||||
public bool LoggedOn;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,9 +139,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteInt32((int)Type);
|
||||
_worldPacket.WriteUInt32(MapID);
|
||||
_worldPacket.WriteUInt32((uint)DifficultyID);
|
||||
_worldPacket.WriteInt32(TimeLeft);
|
||||
_worldPacket.WriteBits(WarningMessage, 8);
|
||||
_worldPacket.WriteBit(Locked);
|
||||
_worldPacket.WriteBit(Extended);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -150,6 +152,8 @@ namespace Game.Networking.Packets
|
||||
public InstanceResetWarningType Type;
|
||||
public uint MapID;
|
||||
public Difficulty DifficultyID;
|
||||
public int TimeLeft;
|
||||
public string WarningMessage; // GlobalStrings tag
|
||||
public bool Locked;
|
||||
public bool Extended;
|
||||
}
|
||||
|
||||
@@ -411,10 +411,11 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(QuestLogItemID);
|
||||
_worldPacket.WriteUInt32(Quantity);
|
||||
_worldPacket.WriteUInt32(QuantityInInventory);
|
||||
_worldPacket.WriteInt32(QuantityInQuestLog);
|
||||
_worldPacket.WriteInt32(DungeonEncounterID);
|
||||
_worldPacket.WriteInt32(BattlePetSpeciesID);
|
||||
_worldPacket.WriteInt32(BattlePetBreedID);
|
||||
_worldPacket.WriteUInt32(BattlePetBreedQuality);
|
||||
_worldPacket.WriteUInt8(BattlePetBreedQuality);
|
||||
_worldPacket.WriteInt32(BattlePetLevel);
|
||||
_worldPacket.WritePackedGuid(ItemGUID);
|
||||
_worldPacket.WriteInt32(Toasts.Count);
|
||||
@@ -448,10 +449,11 @@ namespace Game.Networking.Packets
|
||||
// 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 BattlePetSpeciesID;
|
||||
public int BattlePetBreedID;
|
||||
public uint BattlePetBreedQuality;
|
||||
public byte BattlePetBreedQuality;
|
||||
public int BattlePetLevel;
|
||||
public ObjectGuid ItemGUID;
|
||||
public List<UiEventToast> Toasts = new();
|
||||
@@ -634,6 +636,13 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid Item;
|
||||
}
|
||||
|
||||
class SortAccountBankBags : ClientPacket
|
||||
{
|
||||
public SortAccountBankBags(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
class SortBags : ClientPacket
|
||||
{
|
||||
public SortBags(WorldPacket packet) : base(packet) { }
|
||||
@@ -683,7 +692,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
class ChangeBagSlotFlag : ClientPacket
|
||||
{
|
||||
public int BagIndex;
|
||||
public byte BagIndex;
|
||||
public BagSlotFlags FlagToChange;
|
||||
public bool On;
|
||||
|
||||
@@ -691,7 +700,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
BagIndex = _worldPacket.ReadInt32();
|
||||
BagIndex = _worldPacket.ReadUInt8();
|
||||
FlagToChange = (BagSlotFlags)_worldPacket.ReadUInt32();
|
||||
On = _worldPacket.HasBit();
|
||||
}
|
||||
@@ -699,7 +708,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
class ChangeBankBagSlotFlag : ClientPacket
|
||||
{
|
||||
public int BagIndex;
|
||||
public byte BagIndex;
|
||||
public BagSlotFlags FlagToChange;
|
||||
public bool On;
|
||||
|
||||
@@ -707,7 +716,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
BagIndex = _worldPacket.ReadInt32();
|
||||
BagIndex = _worldPacket.ReadUInt8();
|
||||
FlagToChange = (BagSlotFlags)_worldPacket.ReadUInt32();
|
||||
On = _worldPacket.HasBit();
|
||||
}
|
||||
@@ -870,14 +879,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
Value = data.ReadUInt32();
|
||||
Type = (ItemModifier)data.ReadUInt8();
|
||||
Value = data.ReadUInt32();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Value);
|
||||
{
|
||||
data.WriteUInt8((byte)Type);
|
||||
data.WriteUInt32(Value);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
|
||||
@@ -621,12 +621,14 @@ namespace Game.Networking.Packets
|
||||
Loc.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteXYZ(MovementOffset);
|
||||
_worldPacket.WriteInt32(Counter);
|
||||
}
|
||||
|
||||
public uint MapID;
|
||||
public uint Reason;
|
||||
public TeleportLocation Loc = new();
|
||||
public Position MovementOffset; // Adjusts all pending movement events by this offset
|
||||
public int Counter;
|
||||
}
|
||||
|
||||
public class WorldPortResponse : ClientPacket
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(GossipGUID);
|
||||
_worldPacket.WriteUInt32(GossipID);
|
||||
_worldPacket.WriteUInt32(LfgDungeonsID);
|
||||
_worldPacket.WriteInt32(FriendshipFactionID);
|
||||
_worldPacket.WriteInt32(GossipOptions.Count);
|
||||
_worldPacket.WriteInt32(GossipText.Count);
|
||||
@@ -81,6 +82,7 @@ namespace Game.Networking.Packets
|
||||
public int? TextID; // in classic variants this still holds npc_text id
|
||||
public int? BroadcastTextID;
|
||||
public uint GossipID;
|
||||
public uint LfgDungeonsID;
|
||||
}
|
||||
|
||||
public class GossipSelectOption : ClientPacket
|
||||
@@ -346,6 +348,7 @@ namespace Game.Networking.Packets
|
||||
public TreasureLootList Treasure = new();
|
||||
public int? SpellID;
|
||||
public int? OverrideIconID;
|
||||
public string FailureDescription;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -361,6 +364,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteBits((byte)Status, 2);
|
||||
data.WriteBit(SpellID.HasValue);
|
||||
data.WriteBit(OverrideIconID.HasValue);
|
||||
data.WriteBits(FailureDescription.GetByteCount() + 1, 8);
|
||||
data.FlushBits();
|
||||
|
||||
Treasure.Write(data);
|
||||
@@ -373,6 +377,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (OverrideIconID.HasValue)
|
||||
data.WriteInt32(OverrideIconID.Value);
|
||||
|
||||
if (!FailureDescription.IsEmpty())
|
||||
data.WriteCString(FailureDescription);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,10 +389,13 @@ namespace Game.Networking.Packets
|
||||
public uint ContentTuningID;
|
||||
public int QuestType;
|
||||
public bool Repeatable;
|
||||
public bool ResetByScheduler;
|
||||
public bool Important;
|
||||
public bool Meta;
|
||||
public string QuestTitle;
|
||||
public uint QuestFlags;
|
||||
public uint QuestFlagsEx;
|
||||
public uint QuestFlagsEx2;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -394,9 +404,12 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(QuestType);
|
||||
data.WriteUInt32(QuestFlags);
|
||||
data.WriteUInt32(QuestFlagsEx);
|
||||
data.WriteUInt32(QuestFlagsEx2);
|
||||
|
||||
data.WriteBit(Repeatable);
|
||||
data.WriteBit(ResetByScheduler);
|
||||
data.WriteBit(Important);
|
||||
data.WriteBit(Meta);
|
||||
data.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
data.FlushBits();
|
||||
|
||||
|
||||
@@ -769,6 +769,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(SequenceNum);
|
||||
_worldPacket.WritePackedGuid(LeaderGUID);
|
||||
_worldPacket.WriteUInt8(LeaderFactionGroup);
|
||||
_worldPacket.WriteInt32((int)PingRestriction);
|
||||
_worldPacket.WriteInt32(PlayerList.Count);
|
||||
_worldPacket.WriteBit(LfgInfos.HasValue);
|
||||
_worldPacket.WriteBit(LootSettings.HasValue);
|
||||
@@ -799,6 +800,8 @@ namespace Game.Networking.Packets
|
||||
public int MyIndex;
|
||||
public int SequenceNum;
|
||||
|
||||
public RestrictPingsTo PingRestriction;
|
||||
|
||||
public List<PartyPlayerInfo> PlayerList = new();
|
||||
|
||||
public PartyLFGInfo? LfgInfos;
|
||||
@@ -939,14 +942,14 @@ namespace Game.Networking.Packets
|
||||
class SetRestrictPingsToAssistants : ClientPacket
|
||||
{
|
||||
public byte? PartyIndex;
|
||||
public bool RestrictPingsToAssistants;
|
||||
public RestrictPingsTo RestrictTo;
|
||||
|
||||
public SetRestrictPingsToAssistants(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
RestrictPingsToAssistants = _worldPacket.HasBit();
|
||||
RestrictTo = (RestrictPingsTo)_worldPacket.ReadInt32();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
@@ -995,6 +998,7 @@ namespace Game.Networking.Packets
|
||||
public Vector3 Point;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
public ObjectGuid Transport;
|
||||
|
||||
public SendPingWorldPoint(WorldPacket packet) : base(packet) { }
|
||||
|
||||
@@ -1003,8 +1007,9 @@ namespace Game.Networking.Packets
|
||||
SenderGUID = _worldPacket.ReadPackedGuid();
|
||||
MapID = _worldPacket.ReadUInt32();
|
||||
Point = _worldPacket.ReadVector3();
|
||||
Type = (PingSubjectType)_worldPacket.ReadUInt8();
|
||||
Type = (PingSubjectType)_worldPacket.ReadUInt32();
|
||||
PinFrameID = _worldPacket.ReadUInt32();
|
||||
Transport = _worldPacket.ReadPackedGuid();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,6 +1020,7 @@ namespace Game.Networking.Packets
|
||||
public Vector3 Point;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
public ObjectGuid Transport;
|
||||
|
||||
public ReceivePingWorldPoint() : base(ServerOpcodes.ReceivePingWorldPoint) { }
|
||||
|
||||
@@ -1025,6 +1031,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteVector3(Point);
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteUInt32(PinFrameID);
|
||||
_worldPacket.WritePackedGuid(Transport);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,9 +319,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
_worldPacket.WriteInt32(ActualMapID);
|
||||
_worldPacket.WriteVector3(Position);
|
||||
_worldPacket.WriteInt32(MapID);
|
||||
_worldPacket.WritePackedGuid(Transport);
|
||||
_worldPacket.WriteVector3(Position);
|
||||
}
|
||||
|
||||
public ObjectGuid Player;
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteInt32(Info.Objectives.Count);
|
||||
_worldPacket.WriteUInt64(Info.AllowableRaces.RawValue);
|
||||
_worldPacket.WriteInt32(Info.TreasurePickerID);
|
||||
_worldPacket.WriteInt32(Info.TreasurePickerID.Count);
|
||||
_worldPacket.WriteInt32(Info.Expansion);
|
||||
_worldPacket.WriteInt32(Info.ManagedWorldStateID);
|
||||
_worldPacket.WriteInt32(Info.QuestSessionBonus);
|
||||
@@ -207,6 +207,10 @@ namespace Game.Networking.Packets
|
||||
foreach (QuestCompleteDisplaySpell rewardDisplaySpell in Info.RewardDisplaySpell)
|
||||
rewardDisplaySpell.Write(_worldPacket);
|
||||
|
||||
if (!Info.TreasurePickerID.Empty())
|
||||
foreach (var id in Info.TreasurePickerID)
|
||||
_worldPacket.WriteInt32(id);
|
||||
|
||||
_worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9);
|
||||
_worldPacket.WriteBits(Info.LogDescription.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits(Info.QuestDescription.GetByteCount(), 12);
|
||||
@@ -217,12 +221,13 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Info.PortraitTurnInName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(Info.QuestCompletionLog.GetByteCount(), 11);
|
||||
_worldPacket.WriteBit(Info.ReadyForTranslation);
|
||||
_worldPacket.WriteBit(Info.ResetByScheduler);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (QuestObjective questObjective in Info.Objectives)
|
||||
{
|
||||
_worldPacket.WriteUInt32(questObjective.Id);
|
||||
_worldPacket.WriteUInt8((byte)questObjective.Type);
|
||||
_worldPacket.WriteInt32((int)questObjective.Type);
|
||||
_worldPacket.WriteInt8(questObjective.StorageIndex);
|
||||
_worldPacket.WriteInt32(questObjective.ObjectID);
|
||||
_worldPacket.WriteInt32(questObjective.Amount);
|
||||
@@ -463,6 +468,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(DescEmotes.Count);
|
||||
_worldPacket.WriteInt32(Objectives.Count);
|
||||
_worldPacket.WriteInt32(QuestStartItemID);
|
||||
_worldPacket.WriteInt32(QuestInfoID);
|
||||
_worldPacket.WriteInt32(QuestSessionBonus);
|
||||
_worldPacket.WriteInt32(QuestGiverCreatureID);
|
||||
_worldPacket.WriteInt32(ConditionalDescriptionText.Count);
|
||||
@@ -479,9 +485,9 @@ namespace Game.Networking.Packets
|
||||
foreach (QuestObjectiveSimple obj in Objectives)
|
||||
{
|
||||
_worldPacket.WriteUInt32(obj.Id);
|
||||
_worldPacket.WriteUInt8(obj.Type);
|
||||
_worldPacket.WriteInt32(obj.ObjectID);
|
||||
_worldPacket.WriteInt32(obj.Amount);
|
||||
_worldPacket.WriteUInt8(obj.Type);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
@@ -527,6 +533,7 @@ namespace Game.Networking.Packets
|
||||
public uint PortraitGiverMount;
|
||||
public int PortraitGiverModelSceneID;
|
||||
public int QuestStartItemID;
|
||||
public int QuestInfoID;
|
||||
public int QuestSessionBonus;
|
||||
public int QuestGiverCreatureID;
|
||||
public string PortraitGiverText = "";
|
||||
@@ -562,6 +569,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(Collect.Count);
|
||||
_worldPacket.WriteInt32(Currency.Count);
|
||||
_worldPacket.WriteInt32(StatusFlags);
|
||||
_worldPacket.WriteInt32(QuestInfoID);
|
||||
|
||||
foreach (QuestObjectiveCollect obj in Collect)
|
||||
{
|
||||
@@ -603,6 +611,7 @@ namespace Game.Networking.Packets
|
||||
public List<QuestObjectiveCollect> Collect = new();
|
||||
public List<QuestCurrency> Currency = new();
|
||||
public int StatusFlags;
|
||||
public int QuestInfoID;
|
||||
public uint[] QuestFlags = new uint[3];
|
||||
public string QuestTitle = "";
|
||||
public string CompletionText = "";
|
||||
@@ -1078,7 +1087,7 @@ namespace Game.Networking.Packets
|
||||
public uint CompleteSoundKitID;
|
||||
public uint AreaGroupID;
|
||||
public long TimeAllowed;
|
||||
public int TreasurePickerID;
|
||||
public List<int> TreasurePickerID = new();
|
||||
public int Expansion;
|
||||
public int ManagedWorldStateID;
|
||||
public int QuestSessionBonus;
|
||||
@@ -1098,6 +1107,24 @@ namespace Game.Networking.Packets
|
||||
public uint[] RewardCurrencyID = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public uint[] RewardCurrencyQty = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public bool ReadyForTranslation;
|
||||
public bool ResetByScheduler;
|
||||
}
|
||||
|
||||
public struct QuestRewardItem
|
||||
{
|
||||
public uint ItemID;
|
||||
public uint ItemQty;
|
||||
public QuestRewardContextFlags? ContextFlags;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ItemID);
|
||||
data.WriteUInt32(ItemQty);
|
||||
data.WriteBit(ContextFlags.HasValue);
|
||||
data.FlushBits();
|
||||
if (ContextFlags.HasValue)
|
||||
data.WriteInt32((int)ContextFlags);
|
||||
}
|
||||
}
|
||||
|
||||
public struct QuestChoiceItem
|
||||
@@ -1105,21 +1132,47 @@ namespace Game.Networking.Packets
|
||||
public LootItemType LootItemType;
|
||||
public ItemInstance Item;
|
||||
public uint Quantity;
|
||||
public QuestRewardContextFlags? ContextFlags;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
data.ResetBitPos();
|
||||
LootItemType = (LootItemType)data.ReadBits<byte>(2);
|
||||
bool hasContextFlags = data.HasBit();
|
||||
Item = new ItemInstance();
|
||||
Item.Read(data);
|
||||
Quantity = data.ReadUInt32();
|
||||
if (hasContextFlags)
|
||||
ContextFlags = (QuestRewardContextFlags)data.ReadInt32();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits((byte)LootItemType, 2);
|
||||
data.WriteBit(ContextFlags.HasValue);
|
||||
Item.Write(data);
|
||||
data.WriteUInt32(Quantity);
|
||||
if (ContextFlags.HasValue)
|
||||
data.WriteInt32((int)ContextFlags.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public struct QuestRewardCurrency
|
||||
{
|
||||
public uint CurrencyID;
|
||||
public uint CurrencyQty;
|
||||
public int BonusQty;
|
||||
public QuestRewardContextFlags? ContextFlags;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(CurrencyID);
|
||||
data.WriteUInt32(CurrencyQty);
|
||||
data.WriteInt32(BonusQty);
|
||||
data.WriteBit(ContextFlags.HasValue);
|
||||
data.FlushBits();
|
||||
if (ContextFlags.HasValue)
|
||||
data.WriteInt32((int)ContextFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1138,29 +1191,23 @@ namespace Game.Networking.Packets
|
||||
public uint SpellCompletionID;
|
||||
public uint SkillLineID;
|
||||
public uint NumSkillUps;
|
||||
public uint TreasurePickerID;
|
||||
public List<int> TreasurePickerID = new();
|
||||
public QuestChoiceItem[] ChoiceItems = new QuestChoiceItem[SharedConst.QuestRewardChoicesCount];
|
||||
public uint[] ItemID = new uint[SharedConst.QuestRewardItemCount];
|
||||
public uint[] ItemQty = new uint[SharedConst.QuestRewardItemCount];
|
||||
public QuestRewardItem[] Items = new QuestRewardItem[SharedConst.QuestRewardItemCount];
|
||||
public uint[] FactionID = new uint[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionValue = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionOverride = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionCapIn = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public uint[] CurrencyID = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public uint[] CurrencyQty = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public QuestRewardCurrency[] Currencies = new QuestRewardCurrency[SharedConst.QuestRewardCurrencyCount];
|
||||
public bool IsBoostSpell;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
foreach (QuestRewardItem item in Items)
|
||||
item.Write(data);
|
||||
|
||||
data.WriteUInt32(ChoiceItemCount);
|
||||
data.WriteUInt32(ItemCount);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardItemCount; ++i)
|
||||
{
|
||||
data.WriteUInt32(ItemID[i]);
|
||||
data.WriteUInt32(ItemQty[i]);
|
||||
}
|
||||
|
||||
data.WriteUInt32(Money);
|
||||
data.WriteUInt32(XP);
|
||||
data.WriteUInt64(ArtifactXP);
|
||||
@@ -1181,22 +1228,21 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(id);
|
||||
|
||||
data.WriteUInt32(SpellCompletionID);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardCurrencyCount; ++i)
|
||||
{
|
||||
data.WriteUInt32(CurrencyID[i]);
|
||||
data.WriteUInt32(CurrencyQty[i]);
|
||||
}
|
||||
|
||||
data.WriteUInt32(SkillLineID);
|
||||
data.WriteUInt32(NumSkillUps);
|
||||
data.WriteUInt32(TreasurePickerID);
|
||||
data.WriteInt32(TreasurePickerID.Count);
|
||||
if (!TreasurePickerID.Empty())
|
||||
foreach (var id in TreasurePickerID)
|
||||
data.WriteInt32(id);
|
||||
|
||||
foreach (var choice in ChoiceItems)
|
||||
choice.Write(data);
|
||||
foreach (QuestRewardCurrency currency in Currencies)
|
||||
currency.Write(data);
|
||||
|
||||
data.WriteBit(IsBoostSpell);
|
||||
data.FlushBits();
|
||||
|
||||
foreach (QuestChoiceItem choiceItem in ChoiceItems)
|
||||
choiceItem.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,8 +1269,9 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(QuestFlags[1]); // FlagsEx
|
||||
data.WriteUInt32(QuestFlags[2]); // FlagsEx2
|
||||
data.WriteUInt32(SuggestedPartyMembers);
|
||||
|
||||
data.WriteInt32(QuestInfoID);
|
||||
data.WriteInt32(Emotes.Count);
|
||||
|
||||
foreach (QuestDescEmote emote in Emotes)
|
||||
{
|
||||
data.WriteInt32(emote.Type);
|
||||
@@ -1246,14 +1293,15 @@ namespace Game.Networking.Packets
|
||||
public QuestRewards Rewards = new();
|
||||
public List<QuestDescEmote> Emotes = new();
|
||||
public uint[] QuestFlags = new uint[3]; // Flags and FlagsEx
|
||||
public int QuestInfoID;
|
||||
}
|
||||
|
||||
public struct QuestObjectiveSimple
|
||||
{
|
||||
public uint Id;
|
||||
public byte Type;
|
||||
public int ObjectID;
|
||||
public int Amount;
|
||||
public byte Type;
|
||||
}
|
||||
|
||||
public struct QuestObjectiveCollect
|
||||
|
||||
@@ -8,27 +8,22 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public class InitializeFactions : ServerPacket
|
||||
{
|
||||
const ushort FactionCount = 1000;
|
||||
|
||||
public InitializeFactions() : base(ServerOpcodes.InitializeFactions, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
for (ushort i = 0; i < FactionCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteUInt16((ushort)((ushort)FactionFlags[i] & 0xFF));
|
||||
_worldPacket.WriteInt32(FactionStandings[i]);
|
||||
}
|
||||
_worldPacket.WriteInt32(Factions.Count);
|
||||
_worldPacket.WriteInt32(Bonuses.Count);
|
||||
|
||||
for (ushort i = 0; i < FactionCount; ++i)
|
||||
_worldPacket.WriteBit(FactionHasBonus[i]);
|
||||
foreach (FactionData faction in Factions)
|
||||
faction.Write(_worldPacket);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
foreach (FactionBonusData bonus in Bonuses)
|
||||
bonus.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public int[] FactionStandings = new int[FactionCount];
|
||||
public bool[] FactionHasBonus = new bool[FactionCount]; //@todo: implement faction bonus
|
||||
public ReputationFlags[] FactionFlags = new ReputationFlags[FactionCount];
|
||||
public List<FactionData> Factions = new();
|
||||
public List<FactionBonusData> Bonuses = new();
|
||||
}
|
||||
|
||||
class RequestForcedReactions : ClientPacket
|
||||
@@ -73,6 +68,33 @@ namespace Game.Networking.Packets
|
||||
public bool ShowVisual;
|
||||
}
|
||||
|
||||
public struct FactionData
|
||||
{
|
||||
public uint FactionID;
|
||||
public ushort Flags;
|
||||
public int Standing;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(FactionID);
|
||||
data.WriteUInt16(Flags);
|
||||
data.WriteInt32(Standing);
|
||||
}
|
||||
}
|
||||
|
||||
public struct FactionBonusData
|
||||
{
|
||||
public uint FactionID;
|
||||
public bool FactionHasBonus;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(FactionID);
|
||||
data.WriteBit(FactionHasBonus);
|
||||
data.FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
struct ForcedReaction
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(SceneScriptPackageID);
|
||||
_worldPacket.WritePackedGuid(TransportGUID);
|
||||
_worldPacket.WriteXYZO(Location);
|
||||
_worldPacket.WriteInt32(MovieID);
|
||||
_worldPacket.WriteBit(Encrypted);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -26,6 +27,7 @@ namespace Game.Networking.Packets
|
||||
public uint PlaybackFlags;
|
||||
public uint SceneInstanceID;
|
||||
public uint SceneScriptPackageID;
|
||||
public int MovieID;
|
||||
public ObjectGuid TransportGUID;
|
||||
public Position Location;
|
||||
public bool Encrypted;
|
||||
|
||||
@@ -69,7 +69,6 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(Level);
|
||||
_worldPacket.WriteUInt32((uint)ClassID);
|
||||
_worldPacket.WriteBits(Notes.GetByteCount(), 10);
|
||||
_worldPacket.WriteBit(Mobile);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Notes);
|
||||
}
|
||||
@@ -83,7 +82,6 @@ namespace Game.Networking.Packets
|
||||
public uint Level;
|
||||
public uint AreaID;
|
||||
public FriendsResult FriendResult;
|
||||
public bool Mobile;
|
||||
}
|
||||
|
||||
public class AddFriend : ClientPacket
|
||||
@@ -204,7 +202,6 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(Level);
|
||||
data.WriteUInt32((uint)ClassID);
|
||||
data.WriteBits(Notes.GetByteCount(), 10);
|
||||
data.WriteBit(Mobile);
|
||||
data.FlushBits();
|
||||
data.WriteString(Notes);
|
||||
}
|
||||
@@ -219,7 +216,6 @@ namespace Game.Networking.Packets
|
||||
uint AreaID;
|
||||
uint Level;
|
||||
Class ClassID;
|
||||
bool Mobile;
|
||||
}
|
||||
|
||||
public struct QualifiedGUID
|
||||
|
||||
@@ -668,6 +668,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteVector3(SourceRotation);
|
||||
_worldPacket.WriteVector3(TargetLocation);
|
||||
_worldPacket.WritePackedGuid(Target);
|
||||
_worldPacket.WritePackedGuid(TargetTransport);
|
||||
_worldPacket.WriteUInt32(SpellVisualID);
|
||||
_worldPacket.WriteFloat(TravelSpeed);
|
||||
_worldPacket.WriteFloat(LaunchDelay);
|
||||
@@ -677,6 +678,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid Target; // Exclusive with TargetLocation
|
||||
public ObjectGuid TargetTransport;
|
||||
public Position SourceLocation;
|
||||
public uint SpellVisualID;
|
||||
public bool SpeedAsTime;
|
||||
@@ -1294,14 +1296,14 @@ namespace Game.Networking.Packets
|
||||
//Structs
|
||||
public struct SpellLogPowerData
|
||||
{
|
||||
public SpellLogPowerData(int powerType, int amount, int cost)
|
||||
public SpellLogPowerData(sbyte powerType, int amount, int cost)
|
||||
{
|
||||
PowerType = powerType;
|
||||
Amount = amount;
|
||||
Cost = cost;
|
||||
}
|
||||
|
||||
public int PowerType;
|
||||
public sbyte PowerType;
|
||||
public int Amount;
|
||||
public int Cost;
|
||||
}
|
||||
@@ -1314,7 +1316,7 @@ namespace Game.Networking.Packets
|
||||
AttackPower = (int)unit.GetTotalAttackPowerValue(unit.GetClass() == Class.Hunter ? WeaponAttackType.RangedAttack : WeaponAttackType.BaseAttack);
|
||||
SpellPower = unit.SpellBaseDamageBonusDone(SpellSchoolMask.Spell);
|
||||
Armor = unit.GetArmor();
|
||||
PowerData.Add(new SpellLogPowerData((int)unit.GetPowerType(), unit.GetPower(unit.GetPowerType()), 0));
|
||||
PowerData.Add(new SpellLogPowerData((sbyte)unit.GetPowerType(), unit.GetPower(unit.GetPowerType()), 0));
|
||||
}
|
||||
|
||||
public void Initialize(Spell spell)
|
||||
@@ -1330,13 +1332,13 @@ namespace Game.Networking.Packets
|
||||
bool primaryPowerAdded = false;
|
||||
foreach (SpellPowerCost cost in spell.GetPowerCost())
|
||||
{
|
||||
PowerData.Add(new SpellLogPowerData((int)cost.Power, unitCaster.GetPower(cost.Power), (int)cost.Amount));
|
||||
PowerData.Add(new SpellLogPowerData((sbyte)cost.Power, unitCaster.GetPower(cost.Power), (int)cost.Amount));
|
||||
if (cost.Power == primaryPowerType)
|
||||
primaryPowerAdded = true;
|
||||
}
|
||||
|
||||
if (!primaryPowerAdded)
|
||||
PowerData.Insert(0, new SpellLogPowerData((int)primaryPowerType, unitCaster.GetPower(primaryPowerType), 0));
|
||||
PowerData.Insert(0, new SpellLogPowerData((sbyte)primaryPowerType, unitCaster.GetPower(primaryPowerType), 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1351,7 +1353,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
foreach (SpellLogPowerData powerData in PowerData)
|
||||
{
|
||||
data.WriteInt32(powerData.PowerType);
|
||||
data.WriteInt8(powerData.PowerType);
|
||||
data.WriteInt32(powerData.Amount);
|
||||
data.WriteInt32(powerData.Cost);
|
||||
}
|
||||
@@ -1812,6 +1814,7 @@ namespace Game.Networking.Packets
|
||||
public Array<SpellCraftingReagent> RemovedModifications = new(6);
|
||||
public Array<SpellExtraCurrencyCost> OptionalCurrencies = new(5 /*MAX_ITEM_EXT_COST_CURRENCIES*/);
|
||||
public ulong? CraftingOrderID;
|
||||
public byte CraftingFlags; // 1 = ApplyConcentration
|
||||
public ObjectGuid CraftingNPC;
|
||||
public uint[] Misc = new uint[2];
|
||||
|
||||
@@ -1830,6 +1833,7 @@ namespace Game.Networking.Packets
|
||||
var optionalCurrenciesCount = data.ReadUInt32();
|
||||
var optionalReagentsCount = data.ReadUInt32();
|
||||
var removedModificationsCount = data.ReadUInt32();
|
||||
CraftingFlags = data.ReadUInt8();
|
||||
|
||||
for (var i = 0; i < optionalCurrenciesCount; ++i)
|
||||
OptionalCurrencies[i].Read(data);
|
||||
@@ -1906,8 +1910,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Cost);
|
||||
data.WriteInt8((sbyte)Type);
|
||||
data.WriteInt32(Cost);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteInt32(ActiveSeason);
|
||||
_worldPacket.WriteInt32(GameRuleValues.Count);
|
||||
_worldPacket.WriteInt32(ActiveTimerunningSeasonID);
|
||||
_worldPacket.WriteInt32(RemainingTimerunningSeasonSeconds);
|
||||
|
||||
_worldPacket.WriteInt16(MaxPlayerNameQueriesPerPacket);
|
||||
_worldPacket.WriteInt16(PlayerNameQueryTelemetryInterval);
|
||||
@@ -87,19 +89,25 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(ChatDisabledByPlayer);
|
||||
_worldPacket.WriteBit(LFGListCustomRequiresAuthenticator);
|
||||
_worldPacket.WriteBit(AddonsDisabled);
|
||||
_worldPacket.WriteBit(TimerunningEnabled);
|
||||
_worldPacket.WriteBit(WarGamesEnabled);
|
||||
_worldPacket.WriteBit(ContentTrackingEnabled);
|
||||
_worldPacket.WriteBit(IsSellAllJunkEnabled);
|
||||
_worldPacket.WriteBit(IsGroupFinderEnabled);
|
||||
|
||||
_worldPacket.WriteBit(IsGroupFinderEnabled);
|
||||
_worldPacket.WriteBit(IsLFDEnabled);
|
||||
_worldPacket.WriteBit(IsLFREnabled);
|
||||
_worldPacket.WriteBit(IsPremadeGroupEnabled);
|
||||
_worldPacket.WriteBit(CanShowSetRoleButton);
|
||||
_worldPacket.WriteBit(false); // unused 10.2.7
|
||||
_worldPacket.WriteBit(false); // unused 10.2.7
|
||||
_worldPacket.WriteBit(GuildEventsEditsEnabled);
|
||||
_worldPacket.WriteBit(GuildTradeSkillsEnabled);
|
||||
|
||||
_worldPacket.WriteBits(Unknown1027.GetByteCount(), 7);
|
||||
_worldPacket.WriteBit(BNSendWhisperUseV2Services);
|
||||
|
||||
_worldPacket.WriteBit(BNSendGameDataUseV2Services);
|
||||
_worldPacket.WriteBit(IsAccountCurrencyTransferEnabled);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -194,6 +202,7 @@ namespace Game.Networking.Packets
|
||||
public bool ChatDisabledByPlayer;
|
||||
public bool LFGListCustomRequiresAuthenticator;
|
||||
public bool AddonsDisabled;
|
||||
public bool TimerunningEnabled;
|
||||
public bool WarGamesEnabled; // classic only
|
||||
public bool ContentTrackingEnabled;
|
||||
public bool IsSellAllJunkEnabled;
|
||||
@@ -202,11 +211,18 @@ namespace Game.Networking.Packets
|
||||
public bool IsLFREnabled = true; // classic only
|
||||
public bool IsPremadeGroupEnabled = true; // classic only
|
||||
public bool CanShowSetRoleButton = true;
|
||||
public bool GuildEventsEditsEnabled = true;
|
||||
public bool GuildTradeSkillsEnabled = true;
|
||||
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 IsAccountCurrencyTransferEnabled;
|
||||
|
||||
public SocialQueueConfig QuickJoinConfig;
|
||||
public SquelchInfo Squelch;
|
||||
public RafSystemFeatureInfo RAFSystem;
|
||||
public List<GameRuleValuePair> GameRuleValues = new();
|
||||
public int ActiveTimerunningSeasonID;
|
||||
public int RemainingTimerunningSeasonSeconds;
|
||||
public string Unknown1027; // related to movement lua functions used by keybinds
|
||||
public AddonChatThrottleParams AddonChatThrottle;
|
||||
|
||||
@@ -290,10 +306,11 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(IsBoostEnabled);
|
||||
_worldPacket.WriteBit(TrialBoostEnabled);
|
||||
_worldPacket.WriteBit(TokenBalanceEnabled);
|
||||
_worldPacket.WriteBit(PaidCharacterTransfersBetweenBnetAccountsEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionCharacterListEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionCharacterCopyEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionAccountCopyEnabled);
|
||||
|
||||
_worldPacket.WriteBit(LiveRegionAccountCopyEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionKeyBindingsCopyEnabled);
|
||||
_worldPacket.WriteBit(Unknown901CheckoutRelated);
|
||||
_worldPacket.WriteBit(false); // unused, 10.0.2
|
||||
@@ -301,13 +318,18 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(IsNameReservationEnabled);
|
||||
_worldPacket.WriteBit(LaunchETA.HasValue);
|
||||
_worldPacket.WriteBit(TimerunningEnabled);
|
||||
_worldPacket.WriteBit(AddonsDisabled);
|
||||
|
||||
_worldPacket.WriteBit(AddonsDisabled);
|
||||
_worldPacket.WriteBit(Unused1000);
|
||||
_worldPacket.WriteBit(AccountSaveDataExportEnabled);
|
||||
_worldPacket.WriteBit(AccountLockedByExport);
|
||||
_worldPacket.WriteBits(RealmHiddenAlert.GetByteCount() + 1, 11);
|
||||
|
||||
_worldPacket.WriteBit(BNSendWhisperUseV2Services);
|
||||
|
||||
_worldPacket.WriteBit(BNSendGameDataUseV2Services);
|
||||
_worldPacket.WriteBit(CharacterSelectListModeRealmless);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (EuropaTicketSystemStatus.HasValue)
|
||||
@@ -363,6 +385,7 @@ namespace Game.Networking.Packets
|
||||
public bool IsBoostEnabled; // classic only
|
||||
public bool TrialBoostEnabled; // NYI
|
||||
public bool TokenBalanceEnabled; // NYI
|
||||
public bool PaidCharacterTransfersBetweenBnetAccountsEnabled;
|
||||
public bool LiveRegionCharacterListEnabled; // NYI
|
||||
public bool LiveRegionCharacterCopyEnabled; // NYI
|
||||
public bool LiveRegionAccountCopyEnabled; // NYI
|
||||
@@ -374,6 +397,9 @@ namespace Game.Networking.Packets
|
||||
public bool Unused1000;
|
||||
public bool AccountSaveDataExportEnabled;
|
||||
public bool AccountLockedByExport;
|
||||
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<int> LiveRegionCharacterCopySourceRegions = new();
|
||||
public uint TokenPollTimeSeconds; // NYI
|
||||
|
||||
@@ -148,6 +148,51 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public class TraitSubTreeCache
|
||||
{
|
||||
public int TraitSubTreeID;
|
||||
public List<TraitEntryPacket> Entries = new();
|
||||
public bool Active;
|
||||
|
||||
public TraitSubTreeCache() { }
|
||||
public TraitSubTreeCache(TraitSubTreeCache ufSubTreeCache)
|
||||
{
|
||||
TraitSubTreeID = ufSubTreeCache.TraitSubTreeID;
|
||||
foreach (var ufEntry in ufSubTreeCache.Entries)
|
||||
Entries.Add(ufEntry);
|
||||
Active = ufSubTreeCache.Active;
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
TraitSubTreeID = data.ReadInt32();
|
||||
uint entriesSize = data.ReadUInt32();
|
||||
//if (entriesSize > 100)
|
||||
//throw new Exception(entriesSize, 100);
|
||||
|
||||
for (var i = 0; i < entriesSize; ++i)
|
||||
{
|
||||
var entry = new TraitEntryPacket();
|
||||
entry.Read(data);
|
||||
Entries.Add(entry);
|
||||
}
|
||||
|
||||
Active = data.HasBit();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(TraitSubTreeID);
|
||||
data.WriteInt32(Entries.Count);
|
||||
|
||||
foreach (var traitEntry in Entries)
|
||||
traitEntry.Write(data);
|
||||
|
||||
data.WriteBit(Active);
|
||||
data.FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
public class TraitConfigPacket
|
||||
{
|
||||
public int ID;
|
||||
@@ -158,9 +203,11 @@ namespace Game.Networking.Packets
|
||||
public uint SkillLineID;
|
||||
public int TraitSystemID;
|
||||
public List<TraitEntryPacket> Entries = new();
|
||||
public List<TraitSubTreeCache> SubTrees = new();
|
||||
public string Name = "";
|
||||
|
||||
public TraitConfigPacket() { }
|
||||
|
||||
public TraitConfigPacket(TraitConfig ufConfig)
|
||||
{
|
||||
ID = ufConfig.ID;
|
||||
@@ -174,12 +221,14 @@ namespace Game.Networking.Packets
|
||||
Entries.Add(new TraitEntryPacket(ufEntry));
|
||||
Name = ufConfig.Name;
|
||||
}
|
||||
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
ID = data.ReadInt32();
|
||||
Type = (TraitConfigType)data.ReadInt32();
|
||||
var entriesCount = data.ReadInt32();
|
||||
int entriesCount = data.ReadInt32();
|
||||
int subtreesSize = data.ReadInt32();
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case TraitConfigType.Combat:
|
||||
@@ -205,6 +254,14 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
uint nameLength = data.ReadBits<uint>(9);
|
||||
|
||||
for (var i = 0; i < subtreesSize; ++i)
|
||||
{
|
||||
TraitSubTreeCache subtrees = new();
|
||||
subtrees.Read(data);
|
||||
SubTrees.Add(subtrees);
|
||||
}
|
||||
|
||||
Name = data.ReadString(nameLength);
|
||||
}
|
||||
|
||||
@@ -213,6 +270,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(ID);
|
||||
data.WriteInt32((int)Type);
|
||||
data.WriteInt32(Entries.Count);
|
||||
data.WriteInt32(SubTrees.Count);
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case TraitConfigType.Combat:
|
||||
@@ -234,6 +293,10 @@ namespace Game.Networking.Packets
|
||||
traitEntry.Write(data);
|
||||
|
||||
data.WriteBits(Name.GetByteCount(), 9);
|
||||
|
||||
foreach (TraitSubTreeCache traitSubTreeCache in SubTrees)
|
||||
traitSubTreeCache.Write(data);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(Name);
|
||||
|
||||
Reference in New Issue
Block a user