Core: SOme code cleanup, more to follow.

This commit is contained in:
hondacrx
2021-03-20 22:48:48 -04:00
parent 62f554f2e0
commit 62ec699ec6
318 changed files with 5080 additions and 5125 deletions
@@ -32,7 +32,7 @@ namespace Game.Networking.Packets
Data.Write(_worldPacket);
}
public AllAchievements Data = new AllAchievements();
public AllAchievements Data = new();
}
class AllAccountCriteria : ServerPacket
@@ -46,7 +46,7 @@ namespace Game.Networking.Packets
progress.Write(_worldPacket);
}
public List<CriteriaProgressPkt> Progress = new List<CriteriaProgressPkt>();
public List<CriteriaProgressPkt> Progress = new();
}
public class RespondInspectAchievements : ServerPacket
@@ -60,7 +60,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid Player;
public AllAchievements Data = new AllAchievements();
public AllAchievements Data = new();
}
public class CriteriaUpdate : ServerPacket
@@ -195,7 +195,7 @@ namespace Game.Networking.Packets
}
}
public List<GuildCriteriaProgress> Progress = new List<GuildCriteriaProgress>();
public List<GuildCriteriaProgress> Progress = new();
}
public class GuildCriteriaDeleted : ServerPacket
@@ -268,7 +268,7 @@ namespace Game.Networking.Packets
earned.Write(_worldPacket);
}
public List<EarnedAchievement> Earned = new List<EarnedAchievement>();
public List<EarnedAchievement> Earned = new();
}
class GuildGetAchievementMembers : ClientPacket
@@ -302,7 +302,7 @@ namespace Game.Networking.Packets
public ObjectGuid GuildGUID;
public uint AchievementID;
public List<ObjectGuid> Member = new List<ObjectGuid>();
public List<ObjectGuid> Member = new();
}
//Structs
@@ -377,7 +377,7 @@ namespace Game.Networking.Packets
progress.Write(data);
}
public List<EarnedAchievement> Earned = new List<EarnedAchievement>();
public List<CriteriaProgressPkt> Progress = new List<CriteriaProgressPkt>();
public List<EarnedAchievement> Earned = new();
public List<CriteriaProgressPkt> Progress = new();
}
}
@@ -65,7 +65,7 @@ namespace Game.Networking.Packets
}
public bool OnLevelUp;
public List<AdventureJournalEntry> AdventureJournalDatas = new List<AdventureJournalEntry>();
public List<AdventureJournalEntry> AdventureJournalDatas = new();
}
struct AdventureJournalEntry
@@ -108,6 +108,6 @@ namespace Game.Networking.Packets
public uint TimeToTarget;
public uint ElapsedTimeForMovement;
public List<Vector3> Points = new List<Vector3>();
public List<Vector3> Points = new();
}
}
@@ -42,7 +42,7 @@ namespace Game.Networking.Packets
public ObjectGuid ArtifactGUID;
public ObjectGuid ForgeGUID;
public Array<ArtifactPowerChoice> PowerChoices = new Array<ArtifactPowerChoice>(1);
public Array<ArtifactPowerChoice> PowerChoices = new(1);
public struct ArtifactPowerChoice
{
@@ -29,12 +29,12 @@ namespace Game.Networking.Packets
public byte MinLevel = 1;
public byte MaxLevel = SharedConst.MaxLevel;
public AuctionHouseFilterMask Filters;
public Array<byte> KnownPets = new Array<byte>(SharedConst.MaxBattlePetSpeciesId / 8 + 1);
public Array<byte> KnownPets = new(SharedConst.MaxBattlePetSpeciesId / 8 + 1);
public sbyte MaxPetLevel;
public Optional<AddOnInfo> TaintedBy;
public string Name;
public Array<AuctionListFilterClass> ItemClassFilters = new Array<AuctionListFilterClass>(7);
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Array<AuctionListFilterClass> ItemClassFilters = new(7);
public Array<AuctionSortDef> Sorts = new(2);
public AuctionBrowseQuery(WorldPacket packet) : base(packet) { }
@@ -123,8 +123,8 @@ namespace Game.Networking.Packets
{
public ObjectGuid Auctioneer;
public uint Offset;
public List<uint> AuctionItemIDs = new List<uint>();
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public List<uint> AuctionItemIDs = new();
public Array<AuctionSortDef> Sorts = new(2);
public Optional<AddOnInfo> TaintedBy;
public AuctionListBiddedItems(WorldPacket packet) : base(packet) { }
@@ -153,8 +153,8 @@ namespace Game.Networking.Packets
{
public ObjectGuid Auctioneer;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionBucketKey> BucketKeys = new Array<AuctionBucketKey>(100);
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Array<AuctionBucketKey> BucketKeys = new(100);
public Array<AuctionSortDef> Sorts = new(2);
public AuctionListBucketsByBucketKeys(WorldPacket packet) : base(packet) { }
@@ -183,7 +183,7 @@ namespace Game.Networking.Packets
public uint Offset;
public sbyte Unknown830;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Array<AuctionSortDef> Sorts = new(2);
public AuctionBucketKey BucketKey;
public AuctionListItemsByBucketKey(WorldPacket packet) : base(packet) { }
@@ -213,7 +213,7 @@ namespace Game.Networking.Packets
public int SuffixItemNameDescriptionID;
public uint Offset;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Array<AuctionSortDef> Sorts = new(2);
public AuctionListItemsByItemID(WorldPacket packet) : base(packet) { }
@@ -242,7 +242,7 @@ namespace Game.Networking.Packets
public ObjectGuid Auctioneer;
public uint Offset;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Array<AuctionSortDef> Sorts = new(2);
public AuctionListOwnedItems(WorldPacket packet) : base(packet) { }
@@ -333,7 +333,7 @@ namespace Game.Networking.Packets
public ulong UnitPrice;
public uint RunTime;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionItemForSale> Items = new Array<AuctionItemForSale>(64);
public Array<AuctionItemForSale> Items = new(64);
public AuctionSellCommodity(WorldPacket packet) : base(packet) { }
@@ -360,7 +360,7 @@ namespace Game.Networking.Packets
public ulong MinBid;
public uint RunTime;
public Optional<AddOnInfo> TaintedBy;
public Array<AuctionItemForSale> Items = new Array<AuctionItemForSale>(1);
public Array<AuctionItemForSale> Items = new(1);
public AuctionSellItem(WorldPacket packet) : base(packet) { }
@@ -506,7 +506,7 @@ namespace Game.Networking.Packets
public class AuctionListBiddedItemsResult : ServerPacket
{
public List<AuctionItem> Items = new List<AuctionItem>();
public List<AuctionItem> Items = new();
public uint DesiredDelay;
public bool HasMoreResults;
@@ -526,7 +526,7 @@ namespace Game.Networking.Packets
public class AuctionListBucketsResult : ServerPacket
{
public List<BucketInfo> Buckets = new List<BucketInfo>();
public List<BucketInfo> Buckets = new();
public uint DesiredDelay;
public int Unknown830_0;
public int Unknown830_1;
@@ -553,7 +553,7 @@ namespace Game.Networking.Packets
class AuctionFavoriteList : ServerPacket
{
public uint DesiredDelay;
public List<AuctionFavoriteInfo> Items = new List<AuctionFavoriteInfo>();
public List<AuctionFavoriteInfo> Items = new();
public AuctionFavoriteList() : base(ServerOpcodes.AuctionFavoriteList) { }
@@ -570,13 +570,13 @@ namespace Game.Networking.Packets
public class AuctionListItemsResult : ServerPacket
{
public List<AuctionItem> Items = new List<AuctionItem>();
public List<AuctionItem> Items = new();
public uint Unknown830;
public uint TotalCount;
public uint DesiredDelay;
public AuctionHouseListType ListType;
public bool HasMoreResults;
public AuctionBucketKey BucketKey = new AuctionBucketKey();
public AuctionBucketKey BucketKey = new();
public AuctionListItemsResult() : base(ServerOpcodes.AuctionListItemsResult) { }
@@ -599,8 +599,8 @@ namespace Game.Networking.Packets
public class AuctionListOwnedItemsResult : ServerPacket
{
public List<AuctionItem> Items = new List<AuctionItem>();
public List<AuctionItem> SoldItems = new List<AuctionItem>();
public List<AuctionItem> Items = new();
public List<AuctionItem> SoldItems = new();
public uint DesiredDelay;
public bool HasMoreResults;
@@ -661,7 +661,7 @@ namespace Game.Networking.Packets
public uint DesiredDelay;
public uint ChangeNumberTombstone;
public uint Result;
public List<AuctionItem> Items = new List<AuctionItem>();
public List<AuctionItem> Items = new();
public AuctionReplicateResponse() : base(ServerOpcodes.AuctionReplicateResponse) { }
@@ -696,8 +696,8 @@ namespace Game.Networking.Packets
{
public uint ItemID;
public ushort ItemLevel;
public Optional<ushort> BattlePetSpeciesID = new Optional<ushort>();
public Optional<ushort> SuffixItemNameDescriptionID = new Optional<ushort>();
public Optional<ushort> BattlePetSpeciesID = new();
public Optional<ushort> SuffixItemNameDescriptionID = new();
public AuctionBucketKey() { }
@@ -764,7 +764,7 @@ namespace Game.Networking.Packets
public class AuctionListFilterClass
{
public int ItemClass;
public Array<AuctionListFilterSubClass> SubClassFilters = new Array<AuctionListFilterSubClass>(31);
public Array<AuctionListFilterSubClass> SubClassFilters = new(31);
public AuctionListFilterClass(WorldPacket data)
{
@@ -861,7 +861,7 @@ namespace Game.Networking.Packets
public int TotalQuantity;
public ulong MinPrice;
public int RequiredLevel;
public List<uint> ItemModifiedAppearanceIDs = new List<uint>();
public List<uint> ItemModifiedAppearanceIDs = new();
public Optional<byte> MaxBattlePetQuality;
public Optional<byte> MaxBattlePetLevel;
public Optional<byte> BattlePetBreedID;
@@ -909,7 +909,7 @@ namespace Game.Networking.Packets
public Optional<ItemInstance> Item;
public int Count;
public int Charges;
public List<ItemEnchantData> Enchantments = new List<ItemEnchantData>();
public List<ItemEnchantData> Enchantments = new();
public uint Flags;
public uint AuctionID;
public ObjectGuid Owner;
@@ -926,7 +926,7 @@ namespace Game.Networking.Packets
public uint EndTime;
public Optional<ObjectGuid> Bidder;
public Optional<ulong> BidAmount;
public List<ItemGemData> Gems = new List<ItemGemData>();
public List<ItemGemData> Gems = new();
public Optional<AuctionBucketKey> AuctionBucketKey;
public void Write(WorldPacket data)
@@ -97,7 +97,7 @@ namespace Game.Networking.Packets
public uint RegionID;
public uint BattlegroupID;
public uint RealmID;
public Array<byte> LocalChallenge = new Array<byte>(16);
public Array<byte> LocalChallenge = new(16);
public byte[] Digest = new byte[24];
public ulong DosResponse;
public string RealmJoinTicket;
@@ -215,8 +215,8 @@ namespace Game.Networking.Packets
public GameTime GameTimeInfo;
public List<VirtualRealmInfo> VirtualRealms = new List<VirtualRealmInfo>(); // list of realms connected to this one (inclusive) @todo implement
public List<CharacterTemplate> Templates = new List<CharacterTemplate>(); // list of pre-made character templates. @todo implement
public List<VirtualRealmInfo> VirtualRealms = new(); // list of realms connected to this one (inclusive) @todo implement
public List<CharacterTemplate> Templates = new(); // list of pre-made character templates. @todo implement
public List<RaceClassAvailability> AvailableClasses; // the minimum AccountExpansion required to select the classes
@@ -264,7 +264,7 @@ namespace Game.Networking.Packets
public override void Write()
{
ByteBuffer whereBuffer = new ByteBuffer();
ByteBuffer whereBuffer = new();
whereBuffer.WriteUInt8((byte)Payload.Where.Type);
switch (Payload.Where.Type)
@@ -282,7 +282,7 @@ namespace Game.Networking.Packets
break;
}
Sha256 hash = new Sha256();
Sha256 hash = new();
hash.Process(whereBuffer.GetData(), (int)whereBuffer.GetSize());
hash.Process((uint)Payload.Where.Type);
hash.Finish(BitConverter.GetBytes(Payload.Port));
@@ -380,7 +380,7 @@ namespace Game.Networking.Packets
public override void Write()
{
HmacSha256 hash = new HmacSha256(EncryptionKey);
HmacSha256 hash = new(EncryptionKey);
hash.Process(BitConverter.GetBytes(Enabled), 1);
hash.Finish(EnableEncryptionSeed, 16);
@@ -106,7 +106,7 @@ namespace Game.Networking.Packets
Ticket.Write(_worldPacket);
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
}
public class BattlefieldStatusNeedConfirmation : ServerPacket
@@ -123,7 +123,7 @@ namespace Game.Networking.Packets
public uint Timeout;
public uint Mapid;
public BattlefieldStatusHeader Hdr = new BattlefieldStatusHeader();
public BattlefieldStatusHeader Hdr = new();
public byte Role;
}
@@ -142,7 +142,7 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public BattlefieldStatusHeader Hdr = new BattlefieldStatusHeader();
public BattlefieldStatusHeader Hdr = new();
public uint ShutdownTimer;
public byte ArenaFaction;
public bool LeftEarly;
@@ -166,7 +166,7 @@ namespace Game.Networking.Packets
}
public uint AverageWaitTime;
public BattlefieldStatusHeader Hdr = new BattlefieldStatusHeader();
public BattlefieldStatusHeader Hdr = new();
public bool AsGroup;
public bool SuspendedQueue;
public bool EligibleForMatchmaking;
@@ -188,7 +188,7 @@ namespace Game.Networking.Packets
public ulong QueueID;
public ObjectGuid ClientID;
public int Reason;
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
}
class BattlemasterJoin : ClientPacket
@@ -206,7 +206,7 @@ namespace Game.Networking.Packets
QueueIDs[i] = _worldPacket.ReadUInt64();
}
public Array<ulong> QueueIDs = new Array<ulong>(1);
public Array<ulong> QueueIDs = new(1);
public byte Roles;
public int[] BlacklistMap = new int[2];
}
@@ -242,7 +242,7 @@ namespace Game.Networking.Packets
AcceptedInvite = _worldPacket.HasBit();
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
public bool AcceptedInvite;
}
@@ -282,7 +282,7 @@ namespace Game.Networking.Packets
public int BattlemasterListID;
public byte MinLevel;
public byte MaxLevel;
public List<int> Battlefields = new List<int>(); // Players cannot join a specific Battleground instance anymore - this is always empty
public List<int> Battlefields = new(); // Players cannot join a specific Battleground instance anymore - this is always empty
public bool PvpAnywhere;
public bool HasRandomWinToday;
}
@@ -373,7 +373,7 @@ namespace Game.Networking.Packets
pos.Write(_worldPacket);
}
public List<BattlegroundPlayerPosition> FlagCarriers = new List<BattlegroundPlayerPosition>();
public List<BattlegroundPlayerPosition> FlagCarriers = new();
}
class BattlegroundPlayerJoined : ServerPacket
@@ -554,7 +554,7 @@ namespace Game.Networking.Packets
public class PVPMatchStatistics
{
public List<PVPMatchPlayerStatistics> Statistics = new List<PVPMatchPlayerStatistics>();
public List<PVPMatchPlayerStatistics> Statistics = new();
public Optional<RatingData> Ratings;
public sbyte[] PlayerCount = new sbyte[2];
@@ -665,7 +665,7 @@ namespace Game.Networking.Packets
public Optional<int> RatingChange;
public Optional<uint> PreMatchMMR;
public Optional<int> MmrChange;
public List<PVPMatchPlayerPVPStat> Stats = new List<PVPMatchPlayerPVPStat>();
public List<PVPMatchPlayerPVPStat> Stats = new();
public int PrimaryTalentTree;
public int Sex;
public Race PlayerRace;
@@ -709,7 +709,7 @@ namespace Game.Networking.Packets
}
public RideTicket Ticket;
public List<ulong> QueueID = new List<ulong>();
public List<ulong> QueueID = new();
public byte RangeMin;
public byte RangeMax;
public byte TeamSize;
@@ -45,8 +45,8 @@ namespace Game.Networking.Packets
public ushort Trap;
bool HasJournalLock = true;
public List<BattlePetSlot> Slots = new List<BattlePetSlot>();
public List<BattlePetStruct> Pets = new List<BattlePetStruct>();
public List<BattlePetSlot> Slots = new();
public List<BattlePetStruct> Pets = new();
int MaxPets = 1000;
}
@@ -78,7 +78,7 @@ namespace Game.Networking.Packets
pet.Write(_worldPacket);
}
public List<BattlePetStruct> Pets = new List<BattlePetStruct>();
public List<BattlePetStruct> Pets = new();
public bool PetAdded;
}
@@ -97,7 +97,7 @@ namespace Game.Networking.Packets
slot.Write(_worldPacket);
}
public List<BattlePetSlot> Slots = new List<BattlePetSlot>();
public List<BattlePetSlot> Slots = new();
public bool AutoSlotted;
public bool NewSlot;
}
@@ -33,7 +33,7 @@ namespace Game.Networking.Packets
}
public MethodCall Method;
public ByteBuffer Data = new ByteBuffer();
public ByteBuffer Data = new();
}
class Response : ServerPacket
@@ -50,7 +50,7 @@ namespace Game.Networking.Packets
public BattlenetRpcErrorCode BnetStatus = BattlenetRpcErrorCode.Ok;
public MethodCall Method;
public ByteBuffer Data = new ByteBuffer();
public ByteBuffer Data = new();
}
class ConnectionStatus : ServerPacket
@@ -113,7 +113,7 @@ namespace Game.Networking.Packets
}
public uint Token;
public Array<byte> Secret = new Array<byte>(32);
public Array<byte> Secret = new(32);
}
public struct MethodCall
@@ -76,7 +76,7 @@ namespace Game.Networking.Packets
}
public int LastUpdateID;
public List<BlackMarketItem> Items = new List<BlackMarketItem>();
public List<BlackMarketItem> Items = new();
}
class BlackMarketBidOnItem : ClientPacket
@@ -93,7 +93,7 @@ namespace Game.Networking.Packets
public ObjectGuid Guid;
public uint MarketID;
public ItemInstance Item = new ItemInstance();
public ItemInstance Item = new();
public ulong BidAmount;
}
@@ -71,7 +71,7 @@ namespace Game.Networking.Packets
}
public uint MaxSize = 100;
public CalendarAddEventInfo EventInfo = new CalendarAddEventInfo();
public CalendarAddEventInfo EventInfo = new();
}
class CalendarUpdateEvent : ClientPacket
@@ -174,9 +174,9 @@ namespace Game.Networking.Packets
}
public long ServerTime;
public List<CalendarSendCalendarInviteInfo> Invites = new List<CalendarSendCalendarInviteInfo>();
public List<CalendarSendCalendarRaidLockoutInfo> RaidLockouts = new List<CalendarSendCalendarRaidLockoutInfo>();
public List<CalendarSendCalendarEventInfo> Events = new List<CalendarSendCalendarEventInfo>();
public List<CalendarSendCalendarInviteInfo> Invites = new();
public List<CalendarSendCalendarRaidLockoutInfo> RaidLockouts = new();
public List<CalendarSendCalendarEventInfo> Events = new();
}
class CalendarSendEvent : ServerPacket
@@ -218,7 +218,7 @@ namespace Game.Networking.Packets
public CalendarSendEventType EventType;
public string Description;
public string EventName;
public List<CalendarEventInviteInfo> Invites = new List<CalendarEventInviteInfo>();
public List<CalendarEventInviteInfo> Invites = new();
}
class CalendarInviteAlert : ServerPacket
@@ -653,7 +653,7 @@ namespace Game.Networking.Packets
}
}
public List<CalendarEventInitialInviteInfo> Invites = new List<CalendarEventInitialInviteInfo>();
public List<CalendarEventInitialInviteInfo> Invites = new();
}
class CalendarInviteStatusAlert : ServerPacket
@@ -777,7 +777,7 @@ namespace Game.Networking.Packets
for (var i = 0; i < InviteCount; ++i)
{
CalendarAddEventInviteInfo invite = new CalendarAddEventInviteInfo();
CalendarAddEventInviteInfo invite = new();
invite.Read(data);
Invites[i] = invite;
}
@@ -72,11 +72,11 @@ namespace Game.Networking.Packets
public bool IsAlliedRacesCreationAllowed;
public int MaxCharacterLevel = 1;
public Optional<uint> DisabledClassesMask = new Optional<uint>();
public Optional<uint> DisabledClassesMask = new();
public List<CharacterInfo> Characters = new List<CharacterInfo>(); // all characters on the list
public List<RaceUnlock> RaceUnlockData = new List<RaceUnlock>(); //
public List<UnlockedConditionalAppearance> UnlockedConditionalAppearances = new List<UnlockedConditionalAppearance>();
public List<CharacterInfo> Characters = new(); // all characters on the list
public List<RaceUnlock> RaceUnlockData = new(); //
public List<UnlockedConditionalAppearance> UnlockedConditionalAppearances = new();
public class CharacterInfo
{
@@ -141,7 +141,7 @@ namespace Game.Networking.Packets
ProfessionIds[0] = 0;
ProfessionIds[1] = 0;
StringArguments equipment = new StringArguments(fields.Read<string>(17));
StringArguments equipment = new(fields.Read<string>(17));
ListPosition = fields.Read<byte>(19);
LastPlayedTime = fields.Read<uint>(20);
@@ -230,7 +230,7 @@ namespace Game.Networking.Packets
public byte RaceId;
public Class ClassId;
public byte SexId;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Array<ChrCustomizationChoice> Customizations = new(50);
public byte ExperienceLevel;
public uint ZoneId;
public uint MapId;
@@ -253,8 +253,8 @@ namespace Game.Networking.Packets
public bool BoostInProgress; // @todo
public uint[] ProfessionIds = new uint[2]; // @todo
public VisualItemInfo[] VisualItems = new VisualItemInfo[InventorySlots.BagEnd];
public List<string> MailSenders = new List<string>();
public List<uint> MailSenderTypes = new List<uint>();
public List<string> MailSenders = new();
public List<uint> MailSenderTypes = new();
public struct VisualItemInfo
{
@@ -559,7 +559,7 @@ namespace Game.Networking.Packets
public string Name;
public byte SexID;
public byte RaceID;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Array<ChrCustomizationChoice> Customizations = new(50);
}
}
@@ -870,7 +870,7 @@ namespace Game.Networking.Packets
}
public byte NewSex;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Array<ChrCustomizationChoice> Customizations = new(50);
}
public class BarberShopResult : ServerPacket
@@ -1021,7 +1021,7 @@ namespace Game.Networking.Packets
ObjectGuid CharGUID;
string CharName = "";
byte SexID;
Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
Array<ChrCustomizationChoice> Customizations = new(50);
}
class CharCustomizeFailure : ServerPacket
@@ -1083,8 +1083,8 @@ namespace Game.Networking.Packets
public Race RaceId = Race.None;
public Class ClassId = Class.None;
public Gender Sex = Gender.None;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Optional<uint> TemplateSet = new Optional<uint>();
public Array<ChrCustomizationChoice> Customizations = new(50);
public Optional<uint> TemplateSet = new();
public bool IsTrialBoost;
public bool UseNPE;
public string Name;
@@ -1104,7 +1104,7 @@ namespace Game.Networking.Packets
public ObjectGuid CharGUID;
public Gender SexID = Gender.None;
public string CharName;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Array<ChrCustomizationChoice> Customizations = new(50);
}
public class CharRaceOrFactionChangeInfo
@@ -1114,7 +1114,7 @@ namespace Game.Networking.Packets
public ObjectGuid Guid;
public bool FactionChange;
public string Name;
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
public Array<ChrCustomizationChoice> Customizations = new(50);
}
public class CharacterUndeleteInfo
@@ -83,7 +83,7 @@ namespace Game.Networking.Packets
Params.Read(_worldPacket);
}
public ChatAddonMessageParams Params = new ChatAddonMessageParams();
public ChatAddonMessageParams Params = new();
}
class ChatAddonMessageTargeted : ClientPacket
@@ -98,7 +98,7 @@ namespace Game.Networking.Packets
}
public string Target;
public ChatAddonMessageParams Params = new ChatAddonMessageParams();
public ChatAddonMessageParams Params = new();
}
public class ChatMessageDND : ClientPacket
@@ -36,7 +36,7 @@ namespace Game.Networking.Packets
public ObjectGuid PlayerGuid;
public uint ServerTime = 0;
public Array<uint> AccountTimes = new Array<uint>((int)AccountDataTypes.Max);
public Array<uint> AccountTimes = new((int)AccountDataTypes.Max);
}
public class ClientCacheVersion : ServerPacket
@@ -101,7 +101,7 @@ namespace Game.Networking.Packets
public int Absorbed;
public int Flags;
// Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
public Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
public Optional<ContentTuningParams> ContentTuning = new();
}
class EnvironmentalDamageLog : CombatLogServerPacket
@@ -188,18 +188,18 @@ namespace Game.Networking.Packets
public ObjectGuid Caster;
public uint SpellID;
public List<SpellLogEffect> Effects = new List<SpellLogEffect>();
public List<SpellLogEffect> Effects = new();
public class SpellLogEffect
{
public int Effect;
public List<SpellLogEffectPowerDrainParams> PowerDrainTargets = new List<SpellLogEffectPowerDrainParams>();
public List<SpellLogEffectExtraAttacksParams> ExtraAttacksTargets = new List<SpellLogEffectExtraAttacksParams>();
public List<SpellLogEffectDurabilityDamageParams> DurabilityDamageTargets = new List<SpellLogEffectDurabilityDamageParams>();
public List<SpellLogEffectGenericVictimParams> GenericVictimTargets = new List<SpellLogEffectGenericVictimParams>();
public List<SpellLogEffectTradeSkillItemParams> TradeSkillTargets = new List<SpellLogEffectTradeSkillItemParams>();
public List<SpellLogEffectFeedPetParams> FeedPetTargets = new List<SpellLogEffectFeedPetParams>();
public List<SpellLogEffectPowerDrainParams> PowerDrainTargets = new();
public List<SpellLogEffectExtraAttacksParams> ExtraAttacksTargets = new();
public List<SpellLogEffectDurabilityDamageParams> DurabilityDamageTargets = new();
public List<SpellLogEffectGenericVictimParams> GenericVictimTargets = new();
public List<SpellLogEffectTradeSkillItemParams> TradeSkillTargets = new();
public List<SpellLogEffectFeedPetParams> FeedPetTargets = new();
}
}
@@ -248,7 +248,7 @@ namespace Game.Networking.Packets
public bool Crit;
public Optional<float> CritRollMade;
public Optional<float> CritRollNeeded;
Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
Optional<ContentTuningParams> ContentTuning = new();
}
class SpellPeriodicAuraLog : CombatLogServerPacket
@@ -272,7 +272,7 @@ namespace Game.Networking.Packets
public ObjectGuid TargetGUID;
public ObjectGuid CasterGUID;
public uint SpellID;
public List<SpellLogEffect> Effects = new List<SpellLogEffect>();
public List<SpellLogEffect> Effects = new();
public struct PeriodicalAuraLogEffectDebugInfo
{
@@ -316,7 +316,7 @@ namespace Game.Networking.Packets
public uint Resisted;
public bool Crit;
public Optional<PeriodicalAuraLogEffectDebugInfo> DebugInfo;
public Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
public Optional<ContentTuningParams> ContentTuning = new();
}
}
@@ -366,7 +366,7 @@ namespace Game.Networking.Packets
}
}
public List<SpellDispellData> DispellData = new List<SpellDispellData>();
public List<SpellDispellData> DispellData = new();
public ObjectGuid CasterGUID;
public ObjectGuid TargetGUID;
public uint DispelledBySpellID;
@@ -434,7 +434,7 @@ namespace Game.Networking.Packets
public uint SpellID;
public ObjectGuid Caster;
public List<SpellLogMissEntry> Entries = new List<SpellLogMissEntry>();
public List<SpellLogMissEntry> Entries = new();
}
class ProcResist : ServerPacket
@@ -522,7 +522,7 @@ namespace Game.Networking.Packets
public override void Write()
{
WorldPacket attackRoundInfo = new WorldPacket();
WorldPacket attackRoundInfo = new();
attackRoundInfo.WriteUInt32((uint)hitInfo);
attackRoundInfo.WritePackedGuid(AttackerGUID);
attackRoundInfo.WritePackedGuid(VictimGUID);
@@ -605,7 +605,7 @@ namespace Game.Networking.Packets
public int RageGained;
public UnkAttackerState UnkState;
public float Unk;
public ContentTuningParams ContentTuning = new ContentTuningParams();
public ContentTuningParams ContentTuning = new();
}
//Structs
@@ -111,7 +111,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid UnitGUID;
public List<ThreatInfo> ThreatList = new List<ThreatInfo>();
public List<ThreatInfo> ThreatList = new();
}
public class HighestThreatUpdate : ServerPacket
@@ -131,7 +131,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid UnitGUID;
public List<ThreatInfo> ThreatList = new List<ThreatInfo>();
public List<ThreatInfo> ThreatList = new();
public ObjectGuid HighestThreatGUID;
}
@@ -77,7 +77,7 @@ namespace Game.Networking.Packets
}
}
public List<EquipmentSetInfo.EquipmentSetData> SetData = new List<EquipmentSetInfo.EquipmentSetData>();
public List<EquipmentSetInfo.EquipmentSetData> SetData = new();
}
public class SaveEquipmentSet : ClientPacket
@@ -77,8 +77,8 @@ namespace Game.Networking.Packets
}
public uint FactionIndex;
public List<GarrisonInfo> Garrisons = new List<GarrisonInfo>();
public List<FollowerSoftCapInfo> FollowerSoftCaps = new List<FollowerSoftCapInfo>();
public List<GarrisonInfo> Garrisons = new();
public List<FollowerSoftCapInfo> FollowerSoftCaps = new();
}
class GarrisonRemoteInfo : ServerPacket
@@ -92,7 +92,7 @@ namespace Game.Networking.Packets
site.Write(_worldPacket);
}
public List<GarrisonRemoteSiteInfo> Sites = new List<GarrisonRemoteSiteInfo>();
public List<GarrisonRemoteSiteInfo> Sites = new();
}
class GarrisonPurchaseBuilding : ClientPacket
@@ -126,7 +126,7 @@ namespace Game.Networking.Packets
public GarrisonType GarrTypeID;
public GarrisonError Result;
public GarrisonBuildingInfo BuildingInfo = new GarrisonBuildingInfo();
public GarrisonBuildingInfo BuildingInfo = new();
public bool PlayActivationCinematic;
}
@@ -242,7 +242,7 @@ namespace Game.Networking.Packets
landmark.Write(_worldPacket);
}
public List<GarrisonBuildingMapData> Buildings = new List<GarrisonBuildingMapData>();
public List<GarrisonBuildingMapData> Buildings = new();
}
class GarrisonPlotPlaced : ServerPacket
@@ -391,7 +391,7 @@ namespace Game.Networking.Packets
public uint Durability;
public uint CurrentBuildingID;
public uint CurrentMissionID;
public List<GarrAbilityRecord> AbilityID = new List<GarrAbilityRecord>();
public List<GarrAbilityRecord> AbilityID = new();
public uint ZoneSupportSpellID;
public uint FollowerStatus;
public int Health;
@@ -519,7 +519,7 @@ namespace Game.Networking.Packets
class GarrisonCollection
{
public int Type;
public List<GarrisonCollectionEntry> Entries = new List<GarrisonCollectionEntry>();
public List<GarrisonCollectionEntry> Entries = new();
public void Write(WorldPacket data)
{
@@ -545,7 +545,7 @@ namespace Game.Networking.Packets
class GarrisonEventList
{
public int Type;
public List<GarrisonEventEntry> Events = new List<GarrisonEventEntry>();
public List<GarrisonEventEntry> Events = new();
public void Write(WorldPacket data)
{
@@ -634,19 +634,19 @@ namespace Game.Networking.Packets
public uint GarrSiteLevelID;
public uint NumFollowerActivationsRemaining;
public uint NumMissionsStartedToday; // might mean something else, but sending 0 here enables follower abilities "Increase success chance of the first mission of the day by %."
public List<GarrisonPlotInfo> Plots = new List<GarrisonPlotInfo>();
public List<GarrisonBuildingInfo> Buildings = new List<GarrisonBuildingInfo>();
public List<GarrisonFollower> Followers = new List<GarrisonFollower>();
public List<GarrisonFollower> AutoTroops = new List<GarrisonFollower>();
public List<GarrisonMission> Missions = new List<GarrisonMission>();
public List<List<GarrisonMissionReward>> MissionRewards = new List<List<GarrisonMissionReward>>();
public List<List<GarrisonMissionReward>> MissionOvermaxRewards = new List<List<GarrisonMissionReward>>();
public List<GarrisonMissionBonusAbility> MissionAreaBonuses = new List<GarrisonMissionBonusAbility>();
public List<GarrisonTalent> Talents = new List<GarrisonTalent>();
public List<GarrisonCollection> Collections = new List<GarrisonCollection>();
public List<GarrisonEventList> EventLists = new List<GarrisonEventList>();
public List<bool> CanStartMission = new List<bool>();
public List<int> ArchivedMissions = new List<int>();
public List<GarrisonPlotInfo> Plots = new();
public List<GarrisonBuildingInfo> Buildings = new();
public List<GarrisonFollower> Followers = new();
public List<GarrisonFollower> AutoTroops = new();
public List<GarrisonMission> Missions = new();
public List<List<GarrisonMissionReward>> MissionRewards = new();
public List<List<GarrisonMissionReward>> MissionOvermaxRewards = new();
public List<GarrisonMissionBonusAbility> MissionAreaBonuses = new();
public List<GarrisonTalent> Talents = new();
public List<GarrisonCollection> Collections = new();
public List<GarrisonEventList> EventLists = new();
public List<bool> CanStartMission = new();
public List<int> ArchivedMissions = new();
}
struct FollowerSoftCapInfo
@@ -690,7 +690,7 @@ namespace Game.Networking.Packets
}
public uint GarrSiteLevelID;
public List<GarrisonRemoteBuildingInfo> Buildings = new List<GarrisonRemoteBuildingInfo>();
public List<GarrisonRemoteBuildingInfo> Buildings = new();
}
struct GarrisonBuildingMapData
@@ -86,7 +86,7 @@ namespace Game.Networking.Packets
guildData.Write(_worldPacket);
}
public List<LFGuildBrowseData> Post = new List<LFGuildBrowseData>();
public List<LFGuildBrowseData> Post = new();
}
class LFGuildDeclineRecruit : ClientPacket
@@ -120,7 +120,7 @@ namespace Game.Networking.Packets
application.Write(_worldPacket);
}
public List<LFGuildApplicationData> Application = new List<LFGuildApplicationData>();
public List<LFGuildApplicationData> Application = new();
public int NumRemaining;
}
@@ -170,7 +170,7 @@ namespace Game.Networking.Packets
recruit.Write(_worldPacket);
}
public List<LFGuildRecruitData> Recruits = new List<LFGuildRecruitData>();
public List<LFGuildRecruitData> Recruits = new();
public long UpdateTime;
}
@@ -77,7 +77,7 @@ namespace Game.Networking.Packets
public ObjectGuid GuildGUID;
public ObjectGuid PlayerGuid;
public GuildInfo Info = new GuildInfo();
public GuildInfo Info = new();
public bool HasGuildInfo;
public class GuildInfo
@@ -91,7 +91,7 @@ namespace Game.Networking.Packets
public uint BorderStyle;
public uint BorderColor;
public uint BackgroundColor;
public List<RankInfo> Ranks = new List<RankInfo>();
public List<RankInfo> Ranks = new();
public string GuildName = "";
public struct RankInfo
@@ -1362,7 +1362,7 @@ namespace Game.Networking.Packets
AchievementIDs.Add(_worldPacket.ReadUInt32());
}
public List<uint> AchievementIDs = new List<uint>();
public List<uint> AchievementIDs = new();
}
class GuildNameChanged : ServerPacket
@@ -1504,7 +1504,7 @@ namespace Game.Networking.Packets
public uint ItemID;
public uint Unk4;
public List<uint> AchievementsRequired = new List<uint>();
public List<uint> AchievementsRequired = new();
public ulong RaceMask;
public int MinGuildLevel;
public int MinGuildRep;
@@ -1521,7 +1521,7 @@ namespace Game.Networking.Packets
public int OnUseEnchantmentID;
public uint Flags;
public bool Locked;
public List<ItemGemData> SocketEnchant = new List<ItemGemData>();
public List<ItemGemData> SocketEnchant = new();
}
public struct GuildBankTabInfo
@@ -1573,7 +1573,7 @@ namespace Game.Networking.Packets
public int Flags;
public int[] Data = new int[2];
public ObjectGuid MemberGuid;
public List<ObjectGuid> MemberList = new List<ObjectGuid>();
public List<ObjectGuid> MemberList = new();
public Optional<ItemInstance> Item;
}
}
@@ -41,7 +41,7 @@ namespace Game.Networking.Packets
}
public uint TableHash;
public List<DBQueryRecord> Queries = new List<DBQueryRecord>();
public List<DBQueryRecord> Queries = new();
public struct DBQueryRecord
{
@@ -73,7 +73,7 @@ namespace Game.Networking.Packets
public uint RecordID;
public HotfixRecord.Status Status = HotfixRecord.Status.Invalid;
public ByteBuffer Data = new ByteBuffer();
public ByteBuffer Data = new();
}
class AvailableHotfixes : ServerPacket
@@ -111,7 +111,7 @@ namespace Game.Networking.Packets
uint hotfixCount = _worldPacket.ReadUInt32();
for (var i = 0; i < hotfixCount; ++i)
{
HotfixRecord hotfixRecord = new HotfixRecord();
HotfixRecord hotfixRecord = new();
hotfixRecord.Read(_worldPacket);
Hotfixes.Add(hotfixRecord);
}
@@ -119,7 +119,7 @@ namespace Game.Networking.Packets
public uint ClientBuild;
public uint DataBuild;
public List<HotfixRecord> Hotfixes = new List<HotfixRecord>();
public List<HotfixRecord> Hotfixes = new();
}
class HotfixConnect : ServerPacket
@@ -136,8 +136,8 @@ namespace Game.Networking.Packets
_worldPacket.WriteBytes(HotfixContent);
}
public List<HotfixData> Hotfixes = new List<HotfixData>();
public ByteBuffer HotfixContent = new ByteBuffer();
public List<HotfixData> Hotfixes = new();
public ByteBuffer HotfixContent = new();
public class HotfixData
{
@@ -149,7 +149,7 @@ namespace Game.Networking.Packets
data.FlushBits();
}
public HotfixRecord Record = new HotfixRecord();
public HotfixRecord Record = new();
public uint Size;
}
}
@@ -79,11 +79,11 @@ namespace Game.Networking.Packets
}
public PlayerModelDisplayInfo DisplayInfo;
public List<ushort> Glyphs = new List<ushort>();
public List<ushort> Talents = new List<ushort>();
public Array<ushort> PvpTalents = new Array<ushort>(PlayerConst.MaxPvpTalentSlots, 0);
public Optional<InspectGuildData> GuildData = new Optional<InspectGuildData>();
public Array<PVPBracketData> Bracket = new Array<PVPBracketData>(6, default);
public List<ushort> Glyphs = new();
public List<ushort> Talents = new();
public Array<ushort> PvpTalents = new(PlayerConst.MaxPvpTalentSlots, 0);
public Optional<InspectGuildData> GuildData = new();
public Array<PVPBracketData> Bracket = new(6, default);
public uint? AzeriteLevel;
public int ItemLevel;
public uint LifetimeHK;
@@ -149,7 +149,7 @@ namespace Game.Networking.Packets
{
if (gemData.ItemId != 0)
{
ItemGemData gem = new ItemGemData();
ItemGemData gem = new();
gem.Slot = i;
gem.Item = new ItemInstance(gemData);
Gems.Add(gem);
@@ -165,7 +165,7 @@ namespace Game.Networking.Packets
{
for (byte slot = 0; slot < essences.AzeriteEssenceID.GetSize(); ++slot)
{
AzeriteEssenceData essence = new AzeriteEssenceData();
AzeriteEssenceData essence = new();
essence.Index = slot;
essence.AzeriteEssenceID = essences.AzeriteEssenceID[slot];
if (essence.AzeriteEssenceID != 0)
@@ -211,22 +211,22 @@ namespace Game.Networking.Packets
public ItemInstance Item;
public byte Index;
public bool Usable;
public List<InspectEnchantData> Enchants = new List<InspectEnchantData>();
public List<ItemGemData> Gems = new List<ItemGemData>();
public List<int> AzeritePowers = new List<int>();
public List<AzeriteEssenceData> AzeriteEssences = new List<AzeriteEssenceData>();
public List<InspectEnchantData> Enchants = new();
public List<ItemGemData> Gems = new();
public List<int> AzeritePowers = new();
public List<AzeriteEssenceData> AzeriteEssences = new();
}
public class PlayerModelDisplayInfo
{
public ObjectGuid GUID;
public List<InspectItemData> Items = new List<InspectItemData>();
public List<InspectItemData> Items = new();
public string Name;
public uint SpecializationID;
public byte GenderID;
public byte Race;
public byte ClassID;
public List<ChrCustomizationChoice> Customizations = new List<ChrCustomizationChoice>();
public List<ChrCustomizationChoice> Customizations = new();
public void Initialize(Player player)
{
@@ -45,7 +45,7 @@ namespace Game.Networking.Packets
lockInfos.Write(_worldPacket);
}
public List<InstanceLock> LockList = new List<InstanceLock>();
public List<InstanceLock> LockList = new();
}
class ResetInstances : ClientPacket
@@ -124,7 +124,7 @@ namespace Game.Networking.Packets
public uint PurchaseTime;
public uint Flags;
public ItemPurchaseContents Contents = new ItemPurchaseContents();
public ItemPurchaseContents Contents = new();
public ObjectGuid ItemGUID;
}
@@ -731,7 +731,7 @@ namespace Game.Networking.Packets
}
public ItemContext Context;
public List<uint> BonusListIDs = new List<uint>();
public List<uint> BonusListIDs = new();
}
public class ItemMod
@@ -790,7 +790,7 @@ namespace Game.Networking.Packets
public class ItemModList
{
public Array<ItemMod> Values = new Array<ItemMod>((int)ItemModifier.Max);
public Array<ItemMod> Values = new((int)ItemModifier.Max);
public void Read(WorldPacket data)
{
@@ -845,7 +845,7 @@ namespace Game.Networking.Packets
{
public uint ItemID;
public Optional<ItemBonuses> ItemBonus;
public ItemModList Modifications = new ItemModList();
public ItemModList Modifications = new();
public ItemInstance() { }
@@ -900,7 +900,7 @@ namespace Game.Networking.Packets
{
ItemID = gem.ItemId;
ItemBonuses bonus = new ItemBonuses();
ItemBonuses bonus = new();
bonus.Context = (ItemContext)(byte)gem.Context;
foreach (ushort bonusListId in gem.BonusListIDs)
if (bonusListId != 0)
@@ -1011,7 +1011,7 @@ namespace Game.Networking.Packets
}
public byte Slot;
public ItemInstance Item = new ItemInstance();
public ItemInstance Item = new();
}
public struct InvUpdate
+25 -25
View File
@@ -43,7 +43,7 @@ namespace Game.Networking.Packets
bool Unknown; // Always false in 7.2.5
public byte PartyIndex;
public LfgRoles Roles;
public List<uint> Slots = new List<uint>();
public List<uint> Slots = new();
}
class DFLeave : ClientPacket
@@ -55,7 +55,7 @@ namespace Game.Networking.Packets
Ticket.Read(_worldPacket);
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
}
class DFProposalResponse : ClientPacket
@@ -70,7 +70,7 @@ namespace Game.Networking.Packets
Accepted = _worldPacket.HasBit();
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
public ulong InstanceID;
public uint ProposalID;
public bool Accepted;
@@ -148,8 +148,8 @@ namespace Game.Networking.Packets
dungeonInfo.Write(_worldPacket);
}
public LFGBlackList BlackList = new LFGBlackList();
public List<LfgPlayerDungeonInfo> Dungeons = new List<LfgPlayerDungeonInfo>();
public LFGBlackList BlackList = new();
public List<LfgPlayerDungeonInfo> Dungeons = new();
}
class LfgPartyInfo : ServerPacket
@@ -163,7 +163,7 @@ namespace Game.Networking.Packets
blackList.Write(_worldPacket);
}
public List<LFGBlackList> Player = new List<LFGBlackList>();
public List<LFGBlackList> Player = new();
}
class LFGUpdateStatus : ServerPacket
@@ -196,12 +196,12 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
public byte SubType;
public byte Reason;
public List<uint> Slots = new List<uint>();
public List<uint> Slots = new();
public uint RequestedRoles;
public List<ObjectGuid> SuspendedPlayers = new List<ObjectGuid>();
public List<ObjectGuid> SuspendedPlayers = new();
public uint QueueMapID;
public bool NotifyUI;
public bool IsParty;
@@ -257,10 +257,10 @@ namespace Game.Networking.Packets
public byte PartyIndex;
public byte RoleCheckStatus;
public List<uint> JoinSlots = new List<uint>();
public List<ulong> BgQueueIDs = new List<ulong>();
public List<uint> JoinSlots = new();
public List<ulong> BgQueueIDs = new();
public int GroupFinderActivityID = 0;
public List<LFGRoleCheckUpdateMember> Members = new List<LFGRoleCheckUpdateMember>();
public List<LFGRoleCheckUpdateMember> Members = new();
public bool IsBeginning;
public bool IsRequeue;
}
@@ -289,11 +289,11 @@ namespace Game.Networking.Packets
_worldPacket.WriteCString(str);
}
public RideTicket Ticket = new RideTicket();
public RideTicket Ticket = new();
public byte Result;
public byte ResultDetail;
public List<LFGBlackListPkt> BlackList = new List<LFGBlackListPkt>();
public List<string> BlackListNames = new List<string>();
public List<LFGBlackListPkt> BlackList = new();
public List<string> BlackListNames = new();
}
class LFGQueueStatus : ServerPacket
@@ -346,7 +346,7 @@ namespace Game.Networking.Packets
public uint ActualSlot;
public uint RewardMoney;
public uint AddedXP;
public List<LFGPlayerRewards> Rewards = new List<LFGPlayerRewards>();
public List<LFGPlayerRewards> Rewards = new();
}
class LfgBootPlayer : ServerPacket
@@ -358,7 +358,7 @@ namespace Game.Networking.Packets
Info.Write(_worldPacket);
}
public LfgBootInfo Info = new LfgBootInfo();
public LfgBootInfo Info = new();
}
class LFGProposalUpdate : ServerPacket
@@ -397,7 +397,7 @@ namespace Game.Networking.Packets
public bool ValidCompletedMask;
public bool ProposalSilent;
public bool IsRequeue;
public List<LFGProposalUpdatePlayer> Players = new List<LFGProposalUpdatePlayer>();
public List<LFGProposalUpdatePlayer> Players = new();
}
class LfgDisabled : ServerPacket
@@ -469,7 +469,7 @@ namespace Game.Networking.Packets
public class LFGBlackList
{
public Optional<ObjectGuid> PlayerGuid;
public List<LFGBlackListSlot> Slot = new List<LFGBlackListSlot>();
public List<LFGBlackListSlot> Slot = new();
public void Write(WorldPacket data)
{
@@ -561,9 +561,9 @@ namespace Game.Networking.Packets
public uint Mask;
public uint RewardMoney;
public uint RewardXP;
public List<LfgPlayerQuestRewardItem> Item = new List<LfgPlayerQuestRewardItem>();
public List<LfgPlayerQuestRewardCurrency> Currency = new List<LfgPlayerQuestRewardCurrency>();
public List<LfgPlayerQuestRewardCurrency> BonusCurrency = new List<LfgPlayerQuestRewardCurrency>();
public List<LfgPlayerQuestRewardItem> Item = new();
public List<LfgPlayerQuestRewardCurrency> Currency = new();
public List<LfgPlayerQuestRewardCurrency> BonusCurrency = new();
public Optional<int> RewardSpellID; // Only used by SMSG_LFG_PLAYER_INFO
public Optional<int> Unused1;
public Optional<ulong> Unused2;
@@ -616,8 +616,8 @@ namespace Game.Networking.Packets
public uint EncounterMask;
public bool FirstReward;
public bool ShortageEligible;
public LfgPlayerQuestReward Rewards = new LfgPlayerQuestReward();
public List<LfgPlayerQuestReward> ShortageReward = new List<LfgPlayerQuestReward>();
public LfgPlayerQuestReward Rewards = new();
public List<LfgPlayerQuestReward> ShortageReward = new();
}
public class LFGRoleCheckUpdateMember
@@ -660,7 +660,7 @@ namespace Game.Networking.Packets
}
public Optional<ObjectGuid> PlayerGuid;
public List<LFGBlackListSlot> Slot = new List<LFGBlackListSlot>();
public List<LFGBlackListSlot> Slot = new();
}
public struct LFGPlayerRewards
+10 -10
View File
@@ -73,8 +73,8 @@ namespace Game.Networking.Packets
public byte AcquireReason;
public LootError FailureReason = LootError.NoLoot; // Most common value
public uint Coins;
public List<LootItemData> Items = new List<LootItemData>();
public List<LootCurrency> Currencies = new List<LootCurrency>();
public List<LootItemData> Items = new();
public List<LootCurrency> Currencies = new();
public bool Acquired;
public bool AELooting;
}
@@ -99,7 +99,7 @@ namespace Game.Networking.Packets
}
}
public List<LootRequest> Loot = new List<LootRequest>();
public List<LootRequest> Loot = new();
}
class MasterLootItem : ClientPacket
@@ -113,14 +113,14 @@ namespace Game.Networking.Packets
for (int i = 0; i < Count; ++i)
{
LootRequest lootRequest = new LootRequest();
LootRequest lootRequest = new();
lootRequest.Object = _worldPacket.ReadPackedGuid();
lootRequest.LootListID = _worldPacket.ReadUInt8();
Loot[i] = lootRequest;
}
}
public Array<LootRequest> Loot = new Array<LootRequest>(1000);
public Array<LootRequest> Loot = new(1000);
public ObjectGuid Target;
}
@@ -282,7 +282,7 @@ namespace Game.Networking.Packets
public uint RollTime;
public LootMethod Method;
public RollMask ValidRolls;
public LootItemData Item = new LootItemData();
public LootItemData Item = new();
}
class LootRollBroadcast : ServerPacket
@@ -304,7 +304,7 @@ namespace Game.Networking.Packets
public ObjectGuid Player;
public int Roll; // Roll value can be negative, it means that it is an "offspec" roll but only during roll selection broadcast (not when sending the result)
public RollType RollType;
public LootItemData Item = new LootItemData();
public LootItemData Item = new();
public bool Autopassed; // Triggers message |HlootHistory:%d|h[Loot]|h: You automatically passed on: %s because you cannot loot that item.
}
@@ -327,7 +327,7 @@ namespace Game.Networking.Packets
public ObjectGuid Winner;
public int Roll;
public RollType RollType;
public LootItemData Item = new LootItemData();
public LootItemData Item = new();
public bool MainSpec;
}
@@ -342,7 +342,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid LootObj;
public LootItemData Item = new LootItemData();
public LootItemData Item = new();
}
class LootRollsComplete : ServerPacket
@@ -370,7 +370,7 @@ namespace Game.Networking.Packets
Players.ForEach(guid => _worldPacket.WritePackedGuid(guid));
}
public List<ObjectGuid> Players = new List<ObjectGuid>();
public List<ObjectGuid> Players = new();
public ObjectGuid LootObj;
}
@@ -49,7 +49,7 @@ namespace Game.Networking.Packets
}
public int TotalNumRecords;
public List<MailListEntry> Mails = new List<MailListEntry>();
public List<MailListEntry> Mails = new();
}
public class MailCreateTextItem : ClientPacket
@@ -113,7 +113,7 @@ namespace Game.Networking.Packets
public string Target;
public string Subject;
public string Body;
public List<MailAttachment> Attachments = new List<MailAttachment>();
public List<MailAttachment> Attachments = new();
public struct MailAttachment
{
@@ -334,7 +334,7 @@ namespace Game.Networking.Packets
{
if (gemData.ItemId != 0)
{
ItemGemData gem = new ItemGemData();
ItemGemData gem = new();
gem.Slot = i;
gem.Item = new ItemInstance(gemData);
Gems.Add(gem);
@@ -372,8 +372,8 @@ namespace Game.Networking.Packets
public uint MaxDurability;
public uint Durability;
public bool Unlocked;
List<ItemEnchantData> Enchants = new List<ItemEnchantData>();
List<ItemGemData> Gems= new List<ItemGemData>();
List<ItemEnchantData> Enchants = new();
List<ItemGemData> Gems= new();
}
public class MailListEntry
@@ -455,6 +455,6 @@ namespace Game.Networking.Packets
public int MailTemplateID;
public string Subject = "";
public string Body = "";
public List<MailAttachedItem> Attachments = new List<MailAttachedItem>();
public List<MailAttachedItem> Attachments = new();
}
}
+12 -12
View File
@@ -226,7 +226,7 @@ namespace Game.Networking.Packets
}
}
public List<Record> Data = new List<Record>();
public List<Record> Data = new();
public struct Record
{
@@ -534,7 +534,7 @@ namespace Game.Networking.Packets
}
public bool IsGossipTriggered;
public List<uint> CemeteryID = new List<uint>();
public List<uint> CemeteryID = new();
}
public class ResurrectResponse : ClientPacket
@@ -809,10 +809,10 @@ namespace Game.Networking.Packets
}
public ObjectGuid Client;
public PhaseShiftData Phaseshift = new PhaseShiftData();
public List<ushort> PreloadMapIDs = new List<ushort>();
public List<ushort> UiMapPhaseIDs = new List<ushort>();
public List<ushort> VisibleMapIDs = new List<ushort>();
public PhaseShiftData Phaseshift = new();
public List<ushort> PreloadMapIDs = new();
public List<ushort> UiMapPhaseIDs = new();
public List<ushort> VisibleMapIDs = new();
}
public class ZoneUnderAttack : ServerPacket
@@ -971,7 +971,7 @@ namespace Game.Networking.Packets
uint count = _worldPacket.ReadUInt32();
for (byte i = 0; i < count && i < PlayerConst.MaxCUFProfiles; i++)
{
CUFProfile cufProfile = new CUFProfile();
CUFProfile cufProfile = new();
byte strLen = _worldPacket.ReadBits<byte>(7);
@@ -1000,7 +1000,7 @@ namespace Game.Networking.Packets
}
}
public List<CUFProfile> CUFProfiles = new List<CUFProfile>();
public List<CUFProfile> CUFProfiles = new();
}
class LoadCUFProfiles : ServerPacket
@@ -1038,7 +1038,7 @@ namespace Game.Networking.Packets
}
}
public List<CUFProfile> CUFProfiles = new List<CUFProfile>();
public List<CUFProfile> CUFProfiles = new();
}
class PlayOneShotAnimKit : ServerPacket
@@ -1154,7 +1154,7 @@ namespace Game.Networking.Packets
}
public bool IsFullUpdate;
public Dictionary<uint, HeirloomData> Heirlooms = new Dictionary<uint, HeirloomData>();
public Dictionary<uint, HeirloomData> Heirlooms = new();
int Unk;
}
@@ -1292,7 +1292,7 @@ namespace Game.Networking.Packets
}
public bool IsFullUpdate = false;
public Dictionary<uint, MountStatusFlags> Mounts = new Dictionary<uint, MountStatusFlags>();
public Dictionary<uint, MountStatusFlags> Mounts = new();
}
class MountSetFavorite : ClientPacket
@@ -1352,7 +1352,7 @@ namespace Game.Networking.Packets
}
public uint PhaseShiftFlags;
public List<PhaseShiftDataPhase> Phases = new List<PhaseShiftDataPhase>();
public List<PhaseShiftDataPhase> Phases = new();
public ObjectGuid PersonalGUID;
}
}
@@ -297,7 +297,7 @@ namespace Game.Networking.Packets
Vector3 direction = Vector3.Zero;
if (movementForce.Magnitude != 0.0f)
{
Position tmp = new Position(movementForce.Origin.X - objectPosition.GetPositionX(),
Position tmp = new(movementForce.Origin.X - objectPosition.GetPositionX(),
movementForce.Origin.Y - objectPosition.GetPositionY(),
movementForce.Origin.Z - objectPosition.GetPositionZ());
float lengthSquared = tmp.GetExactDistSq(0.0f, 0.0f, 0.0f);
@@ -591,7 +591,7 @@ namespace Game.Networking.Packets
public uint MapID;
public uint Reason;
public TeleportLocation Loc = new TeleportLocation();
public TeleportLocation Loc = new();
public Position MovementOffset; // Adjusts all pending movement events by this offset
}
@@ -730,8 +730,8 @@ namespace Game.Networking.Packets
Force.Read(_worldPacket);
}
public MovementAck Ack = new MovementAck();
public MovementForce Force = new MovementForce();
public MovementAck Ack = new();
public MovementForce Force = new();
}
class MoveRemoveMovementForce : ServerPacket
@@ -760,7 +760,7 @@ namespace Game.Networking.Packets
ID = _worldPacket.ReadPackedGuid();
}
public MovementAck Ack = new MovementAck();
public MovementAck Ack = new();
public ObjectGuid ID;
}
@@ -774,8 +774,8 @@ namespace Game.Networking.Packets
Force.Write(_worldPacket);
}
public MovementInfo Status = new MovementInfo();
public MovementForce Force = new MovementForce();
public MovementInfo Status = new();
public MovementForce Force = new();
}
class MoveUpdateRemoveMovementForce : ServerPacket
@@ -788,7 +788,7 @@ namespace Game.Networking.Packets
_worldPacket.WritePackedGuid(TriggerGUID);
}
public MovementInfo Status = new MovementInfo();
public MovementInfo Status = new();
public ObjectGuid TriggerGUID;
}
@@ -1103,7 +1103,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid MoverGUID;
public List<MoveStateChange> StateChanges = new List<MoveStateChange>();
public List<MoveStateChange> StateChanges = new();
public struct CollisionHeightInfo
{
@@ -1221,7 +1221,7 @@ namespace Game.Networking.Packets
data.FlushBits();
}
public List<MonsterSplineFilterKey> FilterKeys = new List<MonsterSplineFilterKey>();
public List<MonsterSplineFilterKey> FilterKeys = new();
public byte FilterFlags;
public float BaseSpeed;
public short StartOffset;
@@ -1279,7 +1279,7 @@ namespace Game.Networking.Packets
public class MonsterSplineUnknown901
{
public Array<Inner> Data = new Array<Inner>(16);
public Array<Inner> Data = new(16);
public void Write(WorldPacket data)
{
@@ -1379,13 +1379,13 @@ namespace Game.Networking.Packets
public int Elapsed;
public uint MoveTime;
public uint FadeObjectTime;
public List<Vector3> Points = new List<Vector3>(); // Spline path
public List<Vector3> 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 ObjectGuid TransportGUID;
public sbyte VehicleSeat = -1;
public List<Vector3> PackedDeltas = new List<Vector3>();
public List<Vector3> PackedDeltas = new();
public Optional<MonsterSplineFilter> SplineFilter;
public Optional<MonsterSplineSpellEffectExtraData> SpellEffectExtraData;
public Optional<MonsterSplineJumpExtraData> JumpExtraData;
+7 -7
View File
@@ -83,10 +83,10 @@ namespace Game.Networking.Packets
text.Write(_worldPacket);
}
public List<ClientGossipOptions> GossipOptions = new List<ClientGossipOptions>();
public List<ClientGossipOptions> GossipOptions = new();
public int FriendshipFactionID;
public ObjectGuid GossipGUID;
public List<ClientGossipText> GossipText = new List<ClientGossipText>();
public List<ClientGossipText> GossipText = new();
public int TextID;
public int GossipID;
}
@@ -133,7 +133,7 @@ namespace Game.Networking.Packets
}
public byte Reason = 0;
public List<VendorItemPkt> Items = new List<VendorItemPkt>();
public List<VendorItemPkt> Items = new();
public ObjectGuid Vendor;
}
@@ -170,7 +170,7 @@ namespace Game.Networking.Packets
public ObjectGuid TrainerGUID;
public int TrainerType;
public int TrainerID = 1;
public List<TrainerListSpell> Spells = new List<TrainerListSpell>();
public List<TrainerListSpell> Spells = new();
public string Greeting;
}
@@ -308,7 +308,7 @@ namespace Game.Networking.Packets
public class TreasureLootList
{
public List<TreasureItem> Items = new List<TreasureItem>();
public List<TreasureItem> Items = new();
public void Write(WorldPacket data)
{
@@ -327,7 +327,7 @@ namespace Game.Networking.Packets
public GossipOptionStatus Status;
public string Text;
public string Confirm;
public TreasureLootList Treasure = new TreasureLootList();
public TreasureLootList Treasure = new();
public Optional<int> SpellID;
}
@@ -378,7 +378,7 @@ namespace Game.Networking.Packets
public int MuID;
public int Type;
public ItemInstance Item = new ItemInstance();
public ItemInstance Item = new();
public int Quantity = -1;
public ulong Price;
public int Durability;
+12 -12
View File
@@ -134,7 +134,7 @@ namespace Game.Networking.Packets
// Lfg
public uint ProposedRoles;
public int LfgCompletedMask;
public List<int> LfgSlots = new List<int>();
public List<int> LfgSlots = new();
}
class PartyInviteResponse : ClientPacket
@@ -290,7 +290,7 @@ namespace Game.Networking.Packets
// Auras
foreach (AuraApplication aurApp in player.GetVisibleAuras())
{
PartyMemberAuraStates aura = new PartyMemberAuraStates();
PartyMemberAuraStates aura = new();
aura.SpellID = (int)aurApp.GetBase().GetId();
aura.ActiveFlags = aurApp.GetEffectMask();
aura.Flags = (byte)aurApp.GetFlags();
@@ -329,7 +329,7 @@ namespace Game.Networking.Packets
foreach (AuraApplication aurApp in pet.GetVisibleAuras())
{
PartyMemberAuraStates aura = new PartyMemberAuraStates();
PartyMemberAuraStates aura = new();
aura.SpellID = (int)aurApp.GetBase().GetId();
aura.ActiveFlags = aurApp.GetEffectMask();
@@ -355,7 +355,7 @@ namespace Game.Networking.Packets
public bool ForEnemy;
public ObjectGuid MemberGuid;
public PartyMemberStats MemberStats = new PartyMemberStats();
public PartyMemberStats MemberStats = new();
}
class SetPartyLeader : ClientPacket
@@ -529,7 +529,7 @@ namespace Game.Networking.Packets
}
public sbyte PartyIndex;
public Dictionary<byte, ObjectGuid> TargetIcons = new Dictionary<byte, ObjectGuid>();
public Dictionary<byte, ObjectGuid> TargetIcons = new();
}
class ConvertRaid : ClientPacket
@@ -768,7 +768,7 @@ namespace Game.Networking.Packets
public int MyIndex;
public int SequenceNum;
public List<PartyPlayerInfo> PlayerList = new List<PartyPlayerInfo>();
public List<PartyPlayerInfo> PlayerList = new();
public Optional<PartyLFGInfo> LfgInfos;
public Optional<PartyLootSettings> LootSettings;
@@ -856,7 +856,7 @@ namespace Game.Networking.Packets
public sbyte PartyIndex;
public uint ActiveMarkers;
public List<RaidMarker> RaidMarkers = new List<RaidMarker>();
public List<RaidMarker> RaidMarkers = new();
}
class PartyKillLog : ServerPacket
@@ -906,7 +906,7 @@ namespace Game.Networking.Packets
public int PhaseShiftFlags;
public ObjectGuid PersonalGUID;
public List<PartyMemberPhase> List = new List<PartyMemberPhase>();
public List<PartyMemberPhase> List = new();
}
class PartyMemberAuraStates
@@ -914,7 +914,7 @@ namespace Game.Networking.Packets
public int SpellID;
public ushort Flags;
public uint ActiveFlags;
public List<float> Points = new List<float>();
public List<float> Points = new();
public void Write(WorldPacket data)
{
@@ -950,7 +950,7 @@ namespace Game.Networking.Packets
public int CurrentHealth;
public int MaxHealth;
public List<PartyMemberAuraStates> Auras = new List<PartyMemberAuraStates>();
public List<PartyMemberAuraStates> Auras = new();
}
public struct CTROptions
@@ -1022,8 +1022,8 @@ namespace Game.Networking.Packets
public int VehicleSeat;
public PartyMemberPhaseStates Phases = new PartyMemberPhaseStates();
public List<PartyMemberAuraStates> Auras = new List<PartyMemberAuraStates>();
public PartyMemberPhaseStates Phases = new();
public List<PartyMemberAuraStates> Auras = new();
public Optional<PartyMemberPetStats> PetStats;
public ushort PowerDisplayID;
+6 -6
View File
@@ -133,9 +133,9 @@ namespace Game.Networking.Packets
public uint[] ActionButtons = new uint[10];
public List<uint> Actions = new List<uint>();
public List<PetSpellCooldown> Cooldowns = new List<PetSpellCooldown>();
public List<PetSpellHistory> SpellHistory = new List<PetSpellHistory>();
public List<uint> Actions = new();
public List<PetSpellCooldown> Cooldowns = new();
public List<PetSpellHistory> SpellHistory = new();
}
class PetStableList : ServerPacket
@@ -161,7 +161,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid StableMaster;
public List<PetStableInfo> Pets = new List<PetStableInfo>();
public List<PetStableInfo> Pets = new();
}
class PetStableResult : ServerPacket
@@ -187,7 +187,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt32(spell);
}
public List<uint> Spells = new List<uint>();
public List<uint> Spells = new();
}
class PetUnlearnedSpells : ServerPacket
@@ -201,7 +201,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt32(spell);
}
public List<uint> Spells = new List<uint>();
public List<uint> Spells = new();
}
class PetNameInvalid : ServerPacket
@@ -341,6 +341,6 @@ namespace Game.Networking.Packets
public int NumChoices;
public int StaticType;
public uint Muid = 0;
public StringArray Choicetext = new StringArray(10);
public StringArray Choicetext = new(10);
}
}
+15 -15
View File
@@ -188,7 +188,7 @@ namespace Game.Networking.Packets
public uint PageTextID;
public bool Allow;
public List<PageTextInfo> Pages = new List<PageTextInfo>();
public List<PageTextInfo> Pages = new();
public struct PageTextInfo
{
@@ -277,7 +277,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteBit(Allow);
_worldPacket.FlushBits();
ByteBuffer statsData = new ByteBuffer();
ByteBuffer statsData = new();
if (Allow)
{
statsData.WriteUInt32(Stats.Type);
@@ -432,7 +432,7 @@ namespace Game.Networking.Packets
}
}
public List<QuestPOIData> QuestPOIDataStats = new List<QuestPOIData>();
public List<QuestPOIData> QuestPOIDataStats = new();
}
class QueryQuestCompletionNPCs : ClientPacket
@@ -468,7 +468,7 @@ namespace Game.Networking.Packets
}
}
public List<QuestCompletionNPC> QuestCompletionNPCs = new List<QuestCompletionNPC>();
public List<QuestCompletionNPC> QuestCompletionNPCs = new();
}
class QueryPetName : ClientPacket
@@ -514,7 +514,7 @@ namespace Game.Networking.Packets
public bool Allow;
public bool HasDeclined;
public DeclinedName DeclinedNames = new DeclinedName();
public DeclinedName DeclinedNames = new();
public uint Timestamp;
public string Name = "";
}
@@ -595,8 +595,8 @@ namespace Game.Networking.Packets
data.WriteUInt32(NativeRealmAddress.Value);
}
public Optional<uint> VirtualRealmAddress = new Optional<uint>(); // current realm (?) (identifier made from the Index, BattleGroup and Region)
public Optional<uint> NativeRealmAddress = new Optional<uint>(); // original realm (?) (identifier made from the Index, BattleGroup and Region)
public Optional<uint> VirtualRealmAddress = new(); // current realm (?) (identifier made from the Index, BattleGroup and Region)
public Optional<uint> NativeRealmAddress = new(); // original realm (?) (identifier made from the Index, BattleGroup and Region)
}
public class PlayerGuidLookupData
@@ -679,7 +679,7 @@ namespace Game.Networking.Packets
public Gender Sex = Gender.None;
public Class ClassID = Class.None;
public byte Level;
public DeclinedName DeclinedNames = new DeclinedName();
public DeclinedName DeclinedNames = new();
}
public class CreatureXDisplay
@@ -699,7 +699,7 @@ namespace Game.Networking.Packets
public class CreatureDisplayStats
{
public float TotalProbability;
public List<CreatureXDisplay> CreatureDisplay = new List<CreatureXDisplay>();
public List<CreatureXDisplay> CreatureDisplay = new();
}
public class CreatureStats
@@ -710,11 +710,11 @@ namespace Game.Networking.Packets
public int CreatureType;
public int CreatureFamily;
public int Classification;
public CreatureDisplayStats Display = new CreatureDisplayStats();
public CreatureDisplayStats Display = new();
public float HpMulti;
public float EnergyMulti;
public bool Leader;
public List<uint> QuestItems = new List<uint>();
public List<uint> QuestItems = new();
public uint CreatureMovementInfoID;
public int HealthScalingExpansion;
public uint RequiredExpansion;
@@ -724,8 +724,8 @@ namespace Game.Networking.Packets
public int WidgetSetUnitConditionID;
public uint[] Flags = new uint[2];
public uint[] ProxyCreatureID = new uint[SharedConst.MaxCreatureKillCredit];
public StringArray Name = new StringArray(SharedConst.MaxCreatureNames);
public StringArray NameAlt = new StringArray(SharedConst.MaxCreatureNames);
public StringArray Name = new(SharedConst.MaxCreatureNames);
public StringArray NameAlt = new(SharedConst.MaxCreatureNames);
}
public struct DBQueryRecord
@@ -743,13 +743,13 @@ namespace Game.Networking.Packets
public uint DisplayID;
public int[] Data = new int[SharedConst.MaxGOData];
public float Size;
public List<uint> QuestItems = new List<uint>();
public List<uint> QuestItems = new();
public uint ContentTuningId;
}
class QuestCompletionNPC
{
public uint QuestID;
public List<uint> NPCs = new List<uint>();
public List<uint> NPCs = new();
}
}
+20 -20
View File
@@ -72,7 +72,7 @@ namespace Game.Networking.Packets
}
}
public List<QuestGiverInfo> QuestGiver = new List<QuestGiverInfo>();
public List<QuestGiverInfo> QuestGiver = new();
}
public class QuestGiverHello : ClientPacket
@@ -246,7 +246,7 @@ namespace Game.Networking.Packets
}
public bool Allow;
public QuestInfo Info = new QuestInfo();
public QuestInfo Info = new();
public uint QuestID;
}
@@ -387,7 +387,7 @@ namespace Game.Networking.Packets
public bool LaunchGossip;
public bool LaunchQuest;
public bool HideChatMessage;
public ItemInstance ItemReward = new ItemInstance();
public ItemInstance ItemReward = new();
}
public class QuestGiverCompleteQuest : ClientPacket
@@ -487,10 +487,10 @@ namespace Game.Networking.Packets
public int QuestPackageID;
public uint[] QuestFlags = new uint[2];
public uint SuggestedPartyMembers;
public QuestRewards Rewards = new QuestRewards();
public List<QuestObjectiveSimple> Objectives = new List<QuestObjectiveSimple>();
public List<QuestDescEmote> DescEmotes = new List<QuestDescEmote>();
public List<uint> LearnSpells = new List<uint>();
public QuestRewards Rewards = new();
public List<QuestObjectiveSimple> Objectives = new();
public List<QuestDescEmote> DescEmotes = new();
public List<uint> LearnSpells = new();
public uint PortraitTurnIn;
public uint PortraitGiver;
public uint PortraitGiverMount;
@@ -557,8 +557,8 @@ namespace Game.Networking.Packets
public bool AutoLaunched;
public uint SuggestPartyMembers;
public int MoneyToGet;
public List<QuestObjectiveCollect> Collect = new List<QuestObjectiveCollect>();
public List<QuestCurrency> Currency = new List<QuestCurrency>();
public List<QuestObjectiveCollect> Collect = new();
public List<QuestCurrency> Currency = new();
public int StatusFlags;
public uint[] QuestFlags = new uint[2];
public string QuestTitle = "";
@@ -645,7 +645,7 @@ namespace Game.Networking.Packets
public ObjectGuid QuestGiverGUID;
public uint GreetEmoteDelay;
public uint GreetEmoteType;
public List<ClientGossipText> QuestDataText = new List<ClientGossipText>();
public List<ClientGossipText> QuestDataText = new();
public string Greeting = "";
}
@@ -825,7 +825,7 @@ namespace Game.Networking.Packets
}
}
List<WorldQuestUpdateInfo> WorldQuestUpdates = new List<WorldQuestUpdateInfo>();
List<WorldQuestUpdateInfo> WorldQuestUpdates = new();
}
class DisplayPlayerChoice : ServerPacket
@@ -856,7 +856,7 @@ namespace Game.Networking.Packets
public int UiTextureKitID;
public uint SoundKitID;
public string Question;
public List<PlayerChoiceResponse> Responses = new List<PlayerChoiceResponse>();
public List<PlayerChoiceResponse> Responses = new();
public bool CloseChoiceFrame;
public bool HideWarboardHeader;
public bool KeepOpenAfterChoice;
@@ -944,7 +944,7 @@ namespace Game.Networking.Packets
public uint RewardMoneyDifficulty;
public float RewardMoneyMultiplier = 1.0f;
public uint RewardBonusMoney;
public List<QuestCompleteDisplaySpell> RewardDisplaySpell = new List<QuestCompleteDisplaySpell>(); // reward spell, this spell will be displayed (icon)
public List<QuestCompleteDisplaySpell> RewardDisplaySpell = new(); // reward spell, this spell will be displayed (icon)
public uint RewardSpell;
public uint RewardHonor;
public float RewardKillHonor;
@@ -985,7 +985,7 @@ namespace Game.Networking.Packets
public int Expansion;
public int ManagedWorldStateID;
public int QuestSessionBonus;
public List<QuestObjective> Objectives = new List<QuestObjective>();
public List<QuestObjective> Objectives = new();
public uint[] RewardItems = new uint[SharedConst.QuestRewardItemCount];
public uint[] RewardAmount = new uint[SharedConst.QuestRewardItemCount];
public int[] ItemDrop = new int[SharedConst.QuestItemDropCount];
@@ -1142,8 +1142,8 @@ namespace Game.Networking.Packets
public uint QuestID = 0;
public bool AutoLaunched = false;
public uint SuggestedPartyMembers = 0;
public QuestRewards Rewards = new QuestRewards();
public List<QuestDescEmote> Emotes = new List<QuestDescEmote>();
public QuestRewards Rewards = new();
public List<QuestDescEmote> Emotes = new();
public uint[] QuestFlags = new uint[2]; // Flags and FlagsEx
}
@@ -1252,10 +1252,10 @@ namespace Game.Networking.Packets
public uint HonorPointCount;
public ulong Money;
public uint Xp;
public List<PlayerChoiceResponseRewardEntry> Items = new List<PlayerChoiceResponseRewardEntry>();
public List<PlayerChoiceResponseRewardEntry> Currencies = new List<PlayerChoiceResponseRewardEntry>();
public List<PlayerChoiceResponseRewardEntry> Factions = new List<PlayerChoiceResponseRewardEntry>();
public List<PlayerChoiceResponseRewardEntry> ItemChoices = new List<PlayerChoiceResponseRewardEntry>();
public List<PlayerChoiceResponseRewardEntry> Items = new();
public List<PlayerChoiceResponseRewardEntry> Currencies = new();
public List<PlayerChoiceResponseRewardEntry> Factions = new();
public List<PlayerChoiceResponseRewardEntry> ItemChoices = new();
}
struct PlayerChoiceResponseMawPower
@@ -63,7 +63,7 @@ namespace Game.Networking.Packets
reaction.Write(_worldPacket);
}
public List<ForcedReaction> Reactions = new List<ForcedReaction>();
public List<ForcedReaction> Reactions = new();
}
class SetFactionStanding : ServerPacket
@@ -85,7 +85,7 @@ namespace Game.Networking.Packets
public float ReferAFriendBonus;
public float BonusFromAchievementSystem;
public List<FactionStandingData> Faction = new List<FactionStandingData>();
public List<FactionStandingData> Faction = new();
public bool ShowVisual;
}
@@ -60,10 +60,10 @@ namespace Game.Networking.Packets
public uint WaveCurrent;
public uint WaveMax;
public uint TimerDuration;
public List<CriteriaProgressPkt> CriteriaProgress = new List<CriteriaProgressPkt>();
public List<BonusObjectiveData> BonusObjectives = new List<BonusObjectiveData>();
public List<uint> PickedSteps = new List<uint>();
public List<ScenarioSpellUpdate> Spells = new List<ScenarioSpellUpdate>();
public List<CriteriaProgressPkt> CriteriaProgress = new();
public List<BonusObjectiveData> BonusObjectives = new();
public List<uint> PickedSteps = new();
public List<ScenarioSpellUpdate> Spells = new();
public bool ScenarioComplete = false;
}
@@ -122,7 +122,7 @@ namespace Game.Networking.Packets
MissingScenarioPOIs[i] = _worldPacket.ReadInt32();
}
public Array<int> MissingScenarioPOIs = new Array<int>(50);
public Array<int> MissingScenarioPOIs = new(50);
}
class ScenarioPOIs : ServerPacket
@@ -160,7 +160,7 @@ namespace Game.Networking.Packets
}
}
public List<ScenarioPOIData> ScenarioPOIDataStats = new List<ScenarioPOIData>();
public List<ScenarioPOIData> ScenarioPOIDataStats = new();
}
struct BonusObjectiveData
+37 -37
View File
@@ -84,7 +84,7 @@ namespace Game.Networking.Packets
public class SpellCategoryCooldown : ServerPacket
{
public List<CategoryCooldownInfo> CategoryCooldowns = new List<CategoryCooldownInfo>();
public List<CategoryCooldownInfo> CategoryCooldowns = new();
public SpellCategoryCooldown() : base(ServerOpcodes.CategoryCooldown, ConnectionType.Instance) { }
@@ -130,8 +130,8 @@ namespace Game.Networking.Packets
}
public bool InitialLogin;
public List<uint> KnownSpells = new List<uint>();
public List<uint> FavoriteSpells = new List<uint>(); // tradeskill recipes
public List<uint> KnownSpells = new();
public List<uint> FavoriteSpells = new(); // tradeskill recipes
}
public class UpdateActionButtons : ServerPacket
@@ -169,7 +169,7 @@ namespace Game.Networking.Packets
public class SendUnlearnSpells : ServerPacket
{
List<uint> Spells = new List<uint>();
List<uint> Spells = new();
public SendUnlearnSpells() : base(ServerOpcodes.SendUnlearnSpells, ConnectionType.Instance) { }
@@ -197,7 +197,7 @@ namespace Game.Networking.Packets
public bool UpdateAll;
public ObjectGuid UnitGUID;
public List<AuraInfo> Auras = new List<AuraInfo>();
public List<AuraInfo> Auras = new();
}
public class CastSpell : ClientPacket
@@ -281,7 +281,7 @@ namespace Game.Networking.Packets
WriteLogData();
}
public SpellCastData Cast = new SpellCastData();
public SpellCastData Cast = new();
}
public class SpellStart : ServerPacket
@@ -319,9 +319,9 @@ namespace Game.Networking.Packets
_worldPacket.WriteInt32(spellId);
}
public List<uint> SpellID = new List<uint>();
public List<uint> Superceded = new List<uint>();
public List<int> FavoriteSpellID = new List<int>();
public List<uint> SpellID = new();
public List<uint> Superceded = new();
public List<int> FavoriteSpellID = new();
}
public class LearnedSpells : ServerPacket
@@ -344,8 +344,8 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public List<uint> SpellID = new List<uint>();
public List<int> FavoriteSpellID = new List<int>();
public List<uint> SpellID = new();
public List<int> FavoriteSpellID = new();
public uint SpecializationID;
public bool SuppressMessaging;
}
@@ -454,7 +454,7 @@ namespace Game.Networking.Packets
spellMod.Write(_worldPacket);
}
public List<SpellModifierInfo> Modifiers = new List<SpellModifierInfo>();
public List<SpellModifierInfo> Modifiers = new();
}
public class UnlearnedSpells : ServerPacket
@@ -471,7 +471,7 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public List<uint> SpellID = new List<uint>();
public List<uint> SpellID = new();
public bool SuppressMessaging;
}
@@ -508,7 +508,7 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public List<uint> SpellID = new List<uint>();
public List<uint> SpellID = new();
public bool IsPet;
}
@@ -558,7 +558,7 @@ namespace Game.Networking.Packets
SpellCooldowns.ForEach(p => p.Write(_worldPacket));
}
public List<SpellCooldownStruct> SpellCooldowns = new List<SpellCooldownStruct>();
public List<SpellCooldownStruct> SpellCooldowns = new();
public ObjectGuid Caster;
public SpellCooldownFlags Flags;
}
@@ -573,7 +573,7 @@ namespace Game.Networking.Packets
Entries.ForEach(p => p.Write(_worldPacket));
}
public List<SpellHistoryEntry> Entries = new List<SpellHistoryEntry>();
public List<SpellHistoryEntry> Entries = new();
}
public class ClearAllSpellCharges : ServerPacket
@@ -635,7 +635,7 @@ namespace Game.Networking.Packets
Entries.ForEach(p => p.Write(_worldPacket));
}
public List<SpellChargeEntry> Entries = new List<SpellChargeEntry>();
public List<SpellChargeEntry> Entries = new();
}
public class ClearTarget : ServerPacket
@@ -948,10 +948,10 @@ namespace Game.Networking.Packets
public byte RaceID;
public byte Gender;
public byte ClassID;
public List<ChrCustomizationChoice> Customizations = new List<ChrCustomizationChoice>();
public List<ChrCustomizationChoice> Customizations = new();
public ObjectGuid GuildGUID;
public List<int> ItemDisplayID = new List<int>();
public List<int> ItemDisplayID = new();
}
class MirrorImageCreatureData : ServerPacket
@@ -993,7 +993,7 @@ namespace Game.Networking.Packets
Runes.Write(_worldPacket);
}
public RuneData Runes = new RuneData();
public RuneData Runes = new();
}
class AddRunePower : ServerPacket
@@ -1103,7 +1103,7 @@ namespace Game.Networking.Packets
public ObjectGuid CasterGUID;
public ObjectGuid VictimGUID;
public uint SpellID;
public List<uint> FailedSpells = new List<uint>();
public List<uint> FailedSpells = new();
}
class CustomLoadScreen : ServerPacket
@@ -1219,7 +1219,7 @@ namespace Game.Networking.Packets
int AttackPower;
int SpellPower;
uint Armor;
List<SpellLogPowerData> PowerData = new List<SpellLogPowerData>();
List<SpellLogPowerData> PowerData = new();
}
class ContentTuningParams
@@ -1384,7 +1384,7 @@ namespace Game.Networking.Packets
public static implicit operator SpellCastVisualField(SpellCastVisual spellCastVisual)
{
SpellCastVisualField visual = new SpellCastVisualField();
SpellCastVisualField visual = new();
visual.SpellXSpellVisualID = spellCastVisual.SpellXSpellVisualID;
visual.ScriptVisualID = spellCastVisual.ScriptVisualID;
return visual;
@@ -1449,7 +1449,7 @@ namespace Game.Networking.Packets
public Optional<int> Remaining;
Optional<float> TimeMod;
public float[] Points = new float[0];
public List<float> EstimatedPoints = new List<float>();
public List<float> EstimatedPoints = new();
}
public struct AuraInfo
@@ -1609,12 +1609,12 @@ namespace Game.Networking.Packets
public uint SpellID;
public SpellCastVisual Visual;
public uint SendCastFlags;
public SpellTargetData Target = new SpellTargetData();
public SpellTargetData Target = new();
public MissileTrajectoryRequest MissileTrajectory;
public Optional<MovementInfo> MoveUpdate;
public List<SpellWeight> Weight = new List<SpellWeight>();
public Array<SpellOptionalReagent> OptionalReagents = new Array<SpellOptionalReagent>(3);
public Array<SpellExtraCurrencyCost> OptionalCurrencies = new Array<SpellExtraCurrencyCost>(5 /*MAX_ITEM_EXT_COST_CURRENCIES*/);
public List<SpellWeight> Weight = new();
public Array<SpellOptionalReagent> OptionalReagents = new(3);
public Array<SpellExtraCurrencyCost> OptionalCurrencies = new(5 /*MAX_ITEM_EXT_COST_CURRENCIES*/);
public ObjectGuid CraftingNPC;
public uint[] Misc = new uint[2];
@@ -1721,7 +1721,7 @@ namespace Game.Networking.Packets
public byte Start;
public byte Count;
public List<byte> Cooldowns = new List<byte>();
public List<byte> Cooldowns = new();
}
public struct MissileTrajectoryResult
@@ -1840,17 +1840,17 @@ namespace Game.Networking.Packets
public SpellCastFlags CastFlags;
public SpellCastFlagsEx CastFlagsEx;
public uint CastTime;
public List<ObjectGuid> HitTargets = new List<ObjectGuid>();
public List<ObjectGuid> MissTargets = new List<ObjectGuid>();
public List<SpellHitStatus> HitStatus = new List<SpellHitStatus>();
public List<SpellMissStatus> MissStatus = new List<SpellMissStatus>();
public SpellTargetData Target = new SpellTargetData();
public List<SpellPowerData> RemainingPower = new List<SpellPowerData>();
public List<ObjectGuid> HitTargets = new();
public List<ObjectGuid> MissTargets = new();
public List<SpellHitStatus> HitStatus = new();
public List<SpellMissStatus> MissStatus = new();
public SpellTargetData Target = new();
public List<SpellPowerData> RemainingPower = new();
public Optional<RuneData> RemainingRunes;
public MissileTrajectoryResult MissileTrajectory;
public SpellAmmo Ammo;
public byte DestLocSpellCastIndex;
public List<TargetLocation> TargetPoints = new List<TargetLocation>();
public List<TargetLocation> TargetPoints = new();
public CreatureImmunities Immunities;
public SpellHealPrediction Predict;
}
@@ -1870,7 +1870,7 @@ namespace Game.Networking.Packets
public class SpellModifierInfo
{
public byte ModIndex;
public List<SpellModifierData> ModifierData = new List<SpellModifierData>();
public List<SpellModifierData> ModifierData = new();
public void Write(WorldPacket data)
{
@@ -296,7 +296,7 @@ namespace Game.Networking.Packets
public bool LiveRegionKeyBindingsCopyEnabled = false;
public bool Unknown901CheckoutRelated = false; // NYI
public Optional<EuropaTicketConfig> EuropaTicketSystemStatus;
public List<int> LiveRegionCharacterCopySourceRegions = new List<int>();
public List<int> LiveRegionCharacterCopySourceRegions = new();
public uint TokenPollTimeSeconds; // NYI
public long TokenBalanceAmount; // NYI
public int MaxCharactersPerRealm;
@@ -45,20 +45,20 @@ namespace Game.Networking.Packets
}
}
public TalentInfoUpdate Info = new TalentInfoUpdate();
public TalentInfoUpdate Info = new();
public class TalentGroupInfo
{
public uint SpecID;
public List<ushort> TalentIDs = new List<ushort>();
public List<PvPTalent> PvPTalents = new List<PvPTalent>();
public List<ushort> TalentIDs = new();
public List<PvPTalent> PvPTalents = new();
}
public class TalentInfoUpdate
{
public byte ActiveGroup;
public uint PrimarySpecialization;
public List<TalentGroupInfo> TalentGroups = new List<TalentGroupInfo>();
public List<TalentGroupInfo> TalentGroups = new();
}
}
@@ -73,7 +73,7 @@ namespace Game.Networking.Packets
Talents[i] = _worldPacket.ReadUInt16();
}
public Array<ushort> Talents = new Array<ushort>(PlayerConst.MaxTalentTiers);
public Array<ushort> Talents = new(PlayerConst.MaxTalentTiers);
}
class RespecWipeConfirm : ServerPacket
@@ -122,7 +122,7 @@ namespace Game.Networking.Packets
public uint Reason;
public int SpellID;
public List<ushort> Talents = new List<ushort>();
public List<ushort> Talents = new();
}
class ActiveGlyphs : ServerPacket
@@ -139,7 +139,7 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
public List<GlyphBinding> Glyphs = new List<GlyphBinding>();
public List<GlyphBinding> Glyphs = new();
public bool IsFullUpdate;
}
@@ -154,7 +154,7 @@ namespace Game.Networking.Packets
Talents[i] = new PvPTalent(_worldPacket);
}
public Array<PvPTalent> Talents = new Array<PvPTalent>(4);
public Array<PvPTalent> Talents = new(4);
}
class LearnPvpTalentFailed : ServerPacket
@@ -173,7 +173,7 @@ namespace Game.Networking.Packets
public uint Reason;
public uint SpellID;
public List<PvPTalent> Talents = new List<PvPTalent>();
public List<PvPTalent> Talents = new();
}
//Structs
@@ -75,7 +75,7 @@ namespace Game.Networking.Packets
}
}
public List<GMTicketCase> Cases = new List<GMTicketCase>();
public List<GMTicketCase> Cases = new();
public struct GMTicketCase
{
@@ -252,7 +252,7 @@ namespace Game.Networking.Packets
ReportLineIndex.Value = data.ReadUInt32();
}
public List<SupportTicketChatLine> Lines = new List<SupportTicketChatLine>();
public List<SupportTicketChatLine> Lines = new();
public Optional<uint> ReportLineIndex;
}
@@ -316,7 +316,7 @@ namespace Game.Networking.Packets
public class SupportTicketHorusChatLog
{
public List<SupportTicketHorusChatLine> Lines = new List<SupportTicketHorusChatLine>();
public List<SupportTicketHorusChatLine> Lines = new();
public void Read(WorldPacket data)
{
@@ -54,7 +54,7 @@ namespace Game.Networking.Packets
public uint UnkInt; // send CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST
public TokenResult Result;
List<AuctionableTokenAuctionable> AuctionableTokenAuctionableList =new List<AuctionableTokenAuctionable>();
List<AuctionableTokenAuctionable> AuctionableTokenAuctionableList =new();
struct AuctionableTokenAuctionable
{
+2 -2
View File
@@ -43,7 +43,7 @@ namespace Game.Networking.Packets
Cast.Read(_worldPacket);
}
public SpellCastRequest Cast = new SpellCastRequest();
public SpellCastRequest Cast = new();
}
class AccountToyUpdate : ServerPacket
@@ -73,7 +73,7 @@ namespace Game.Networking.Packets
}
public bool IsFullUpdate = false;
public Dictionary<uint, ToyFlags> Toys = new Dictionary<uint, ToyFlags>();
public Dictionary<uint, ToyFlags> Toys = new();
}
class ToyClearFanfare : ClientPacket
@@ -230,7 +230,7 @@ namespace Game.Networking.Packets
public bool Lock;
public uint MaxDurability;
public uint Durability;
public List<ItemGemData> Gems = new List<ItemGemData>();
public List<ItemGemData> Gems = new();
}
public class TradeItem
@@ -249,7 +249,7 @@ namespace Game.Networking.Packets
}
public byte Slot;
public ItemInstance Item = new ItemInstance();
public ItemInstance Item = new();
public int StackCount;
public ObjectGuid GiftCreator;
public Optional<UnwrappedTradeItem> Unwrapped;
@@ -259,7 +259,7 @@ namespace Game.Networking.Packets
public uint CurrentStateIndex;
public byte WhichPlayer;
public uint ClientStateIndex;
public List<TradeItem> Items = new List<TradeItem>();
public List<TradeItem> Items = new();
public int CurrencyType;
public uint Id;
public int ProposedEnchantment;
@@ -32,7 +32,7 @@ namespace Game.Networking.Packets
for (var i = 0; i < itemsCount; ++i)
{
TransmogrifyItem item = new TransmogrifyItem();
TransmogrifyItem item = new();
item.Read(_worldPacket);
Items[i] = item;
}
@@ -41,7 +41,7 @@ namespace Game.Networking.Packets
}
public ObjectGuid Npc;
public Array<TransmogrifyItem> Items = new Array<TransmogrifyItem>(13);
public Array<TransmogrifyItem> Items = new(13);
public bool CurrentSpecOnly;
}
@@ -65,8 +65,8 @@ namespace Game.Networking.Packets
public bool IsFullUpdate;
public bool IsSetFavorite;
public List<uint> FavoriteAppearances = new List<uint>();
public List<uint> NewAppearances = new List<uint>();
public List<uint> FavoriteAppearances = new();
public List<uint> NewAppearances = new();
}
class TransmogrifyNPC : ServerPacket
@@ -85,7 +85,7 @@ namespace Game.Networking.Packets
voidItem.Write(_worldPacket);
}
public List<VoidItem> Items = new List<VoidItem>();
public List<VoidItem> Items = new();
}
class VoidStorageTransfer : ClientPacket
@@ -127,8 +127,8 @@ namespace Game.Networking.Packets
_worldPacket.WritePackedGuid(removedItem);
}
public List<ObjectGuid> RemovedItems = new List<ObjectGuid>();
public List<VoidItem> AddedItems = new List<VoidItem>();
public List<ObjectGuid> RemovedItems = new();
public List<VoidItem> AddedItems = new();
}
class SwapVoidItem : ClientPacket
+5 -5
View File
@@ -63,9 +63,9 @@ namespace Game.Networking.Packets
Areas.Add(_worldPacket.ReadInt32());
}
public WhoRequest Request = new WhoRequest();
public WhoRequest Request = new();
public uint RequestID;
public List<int> Areas= new List<int>();
public List<int> Areas= new();
}
public class WhoResponsePkt : ServerPacket
@@ -82,7 +82,7 @@ namespace Game.Networking.Packets
}
public uint RequestID;
public List<WhoEntry> Response = new List<WhoEntry>();
public List<WhoEntry> Response = new();
}
public struct WhoRequestServerInfo
@@ -143,7 +143,7 @@ namespace Game.Networking.Packets
public string GuildVirtualRealmName;
public long RaceFilter;
public int ClassFilter = -1;
public List<string> Words = new List<string>();
public List<string> Words = new();
public bool ShowEnemies;
public bool ShowArenaPlayers;
public bool ExactName;
@@ -167,7 +167,7 @@ namespace Game.Networking.Packets
data.FlushBits();
}
public PlayerGuidLookupData PlayerData = new PlayerGuidLookupData();
public PlayerGuidLookupData PlayerData = new();
public ObjectGuid GuildGUID;
public uint GuildVirtualRealmAddress;
public string GuildName = "";
@@ -52,7 +52,7 @@ namespace Game.Networking.Packets
public uint SubareaID;
public uint MapID;
List<WorldStateInfo> Worldstates = new List<WorldStateInfo>();
List<WorldStateInfo> Worldstates = new();
struct WorldStateInfo
{