Core/PacketIO: Updated packet structures to 9.0.2
Port From (https://github.com/TrinityCore/TrinityCore/commit/96d340f70ccef57fad177a24ca099055d7dce04d)
This commit is contained in:
@@ -42,6 +42,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.WriteBit(IsDeletedCharacters);
|
||||
_worldPacket.WriteBit(IsNewPlayerRestrictionSkipped);
|
||||
_worldPacket.WriteBit(IsNewPlayerRestricted);
|
||||
_worldPacket.WriteBit(IsNewPlayer);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.HasValue);
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
@@ -65,9 +66,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
public bool Success;
|
||||
public bool IsDeletedCharacters; // used for character undelete list
|
||||
public bool IsNewPlayerRestrictionSkipped = false; // allows client to skip new player restrictions
|
||||
public bool IsNewPlayer = false; // forbids hero classes and allied races
|
||||
public bool IsAlliedRacesCreationAllowed = false;
|
||||
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 IsAlliedRacesCreationAllowed;
|
||||
|
||||
public int MaxCharacterLevel = 1;
|
||||
public Optional<uint> DisabledClassesMask = new Optional<uint>();
|
||||
@@ -192,6 +194,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(LastLoginVersion);
|
||||
data.WriteUInt32(Flags4);
|
||||
data.WriteInt32(MailSenders.Count);
|
||||
data.WriteInt32(MailSenderTypes.Count);
|
||||
data.WriteUInt32(OverrideSelectScreenFileDataID);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
@@ -200,6 +203,9 @@ 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);
|
||||
@@ -248,6 +254,7 @@ namespace Game.Networking.Packets
|
||||
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 struct VisualItemInfo
|
||||
{
|
||||
|
||||
@@ -581,7 +581,7 @@ namespace Game.Networking.Packets
|
||||
attackRoundInfo.WriteFloat(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo.WriteFloat(ContentTuning.TargetItemLevel);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.ScalingHealthItemLevelCurveID);
|
||||
attackRoundInfo.WriteUInt8((byte)(ContentTuning.ScalesWithItemLevel ? 1 : 0));
|
||||
attackRoundInfo.WriteUInt32((uint)ContentTuning.Flags);
|
||||
|
||||
WriteLogDataBit();
|
||||
FlushBits();
|
||||
|
||||
@@ -435,21 +435,27 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(ItemID);
|
||||
data.WriteUInt32(Quantity);
|
||||
data.WriteUInt32(ItemQuantity);
|
||||
data.WriteInt32(CurrencyID);
|
||||
data.WriteUInt32(CurrencyQuantity);
|
||||
data.WriteUInt32(FollowerXP);
|
||||
data.WriteUInt32(BonusAbilityID);
|
||||
data.WriteInt32(Unknown);
|
||||
data.WriteUInt32(GarrMssnBonusAbilityID);
|
||||
data.WriteInt32(ItemFileDataID);
|
||||
data.WriteBit(ItemInstance.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (ItemInstance.HasValue)
|
||||
ItemInstance.Value.Write(data);
|
||||
}
|
||||
|
||||
public int ItemID;
|
||||
public uint Quantity;
|
||||
public uint ItemQuantity;
|
||||
public int CurrencyID;
|
||||
public uint CurrencyQuantity;
|
||||
public uint FollowerXP;
|
||||
public uint BonusAbilityID;
|
||||
public int Unknown;
|
||||
public uint GarrMssnBonusAbilityID;
|
||||
public int ItemFileDataID;
|
||||
public Optional<ItemInstance> ItemInstance;
|
||||
}
|
||||
|
||||
struct GarrisonMissionBonusAbility
|
||||
@@ -582,17 +588,9 @@ namespace Game.Networking.Packets
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionRewards)
|
||||
data.WriteInt32(missionReward.Count);
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionRewards)
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionOvermaxRewards)
|
||||
data.WriteInt32(missionReward.Count);
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionOvermaxRewards)
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
|
||||
foreach (GarrisonMissionBonusAbility areaBonus in MissionAreaBonuses)
|
||||
areaBonus.Write(data);
|
||||
|
||||
@@ -621,6 +619,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
foreach (GarrisonTalent talent in Talents)
|
||||
talent.Write(data);
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionRewards)
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionOvermaxRewards)
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
}
|
||||
|
||||
public GarrisonType GarrTypeID;
|
||||
|
||||
@@ -20,6 +20,7 @@ using Framework.GameMath;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Dynamic;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
@@ -66,12 +67,16 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(options.Text.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits(options.Confirm.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits((byte)options.Status, 2);
|
||||
_worldPacket.WriteBit(options.SpellID.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
options.Treasure.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteString(options.Text);
|
||||
_worldPacket.WriteString(options.Confirm);
|
||||
|
||||
if (options.SpellID.HasValue)
|
||||
_worldPacket.WriteInt32(options.SpellID.Value);
|
||||
}
|
||||
|
||||
foreach (ClientGossipText text in GossipText)
|
||||
@@ -79,11 +84,11 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public List<ClientGossipOptions> GossipOptions = new List<ClientGossipOptions>();
|
||||
public int FriendshipFactionID = 0;
|
||||
public int FriendshipFactionID;
|
||||
public ObjectGuid GossipGUID;
|
||||
public List<ClientGossipText> GossipText = new List<ClientGossipText>();
|
||||
public int TextID = 0;
|
||||
public int GossipID = 0;
|
||||
public int TextID;
|
||||
public int GossipID;
|
||||
}
|
||||
|
||||
public class GossipSelectOption : ClientPacket
|
||||
@@ -323,6 +328,7 @@ namespace Game.Networking.Packets
|
||||
public string Text;
|
||||
public string Confirm;
|
||||
public TreasureLootList Treasure;
|
||||
public Optional<int> SpellID;
|
||||
}
|
||||
|
||||
public class ClientGossipText
|
||||
|
||||
@@ -718,7 +718,7 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8(PartyIndex);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 9);
|
||||
_worldPacket.WriteString(Name);
|
||||
}
|
||||
|
||||
|
||||
@@ -1325,9 +1325,9 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt8(Expansion);
|
||||
data.WriteUInt8(TargetMinScalingLevel);
|
||||
data.WriteUInt8(TargetMaxScalingLevel);
|
||||
data.WriteInt8(TargetScalingLevelDelta);
|
||||
data.WriteInt8(TargetScalingLevelDelta);
|
||||
data.WriteUInt32((uint)Flags);
|
||||
data.WriteBits(TuningType, 4);
|
||||
data.WriteBit(ScalesWithItemLevel);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
@@ -1341,14 +1341,21 @@ namespace Game.Networking.Packets
|
||||
public byte TargetMinScalingLevel;
|
||||
public byte TargetMaxScalingLevel;
|
||||
public sbyte TargetScalingLevelDelta;
|
||||
public bool ScalesWithItemLevel;
|
||||
public ContentTuningFlags Flags = ContentTuningFlags.NoLevelScaling | ContentTuningFlags.NoItemLevelScaling;
|
||||
|
||||
public enum ContentTuningType
|
||||
{
|
||||
PlayerToPlayer = 7, // NYI
|
||||
{
|
||||
CreatureToPlayerDamage = 1,
|
||||
PlayerToCreatureDamage = 2,
|
||||
CreatureToCreatureDamage = 4
|
||||
CreatureToCreatureDamage = 4,
|
||||
PlayerToSandboxScaling = 7, // NYI
|
||||
PlayerToPlayerExpectedStat = 8
|
||||
}
|
||||
|
||||
public enum ContentTuningFlags
|
||||
{
|
||||
NoLevelScaling = 0x1,
|
||||
NoItemLevelScaling = 0x2
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user