BFA Update (still lots of testing to do tho)
This commit is contained in:
@@ -124,9 +124,9 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid Sender;
|
||||
}
|
||||
|
||||
public class ServerFirstAchievement : ServerPacket
|
||||
public class BroadcastAchievement : ServerPacket
|
||||
{
|
||||
public ServerFirstAchievement() : base(ServerOpcodes.ServerFirstAchievement) { }
|
||||
public BroadcastAchievement() : base(ServerOpcodes.BroadcastAchievement) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
|
||||
@@ -68,21 +68,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid( TriggerGUID);
|
||||
AreaTriggerSpline.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public AreaTriggerSplineInfo AreaTriggerSpline = new AreaTriggerSplineInfo();
|
||||
public ObjectGuid TriggerGUID;
|
||||
}
|
||||
|
||||
class AreaTriggerReShape : ServerPacket
|
||||
{
|
||||
public AreaTriggerReShape() : base(ServerOpcodes.AreaTriggerReShape) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WritePackedGuid( TriggerGUID);
|
||||
_worldPacket.WritePackedGuid(TriggerGUID);
|
||||
|
||||
_worldPacket.WriteBit(AreaTriggerSpline.HasValue);
|
||||
_worldPacket.WriteBit(AreaTriggerCircularMovement.HasValue);
|
||||
|
||||
@@ -122,18 +122,4 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid ArtifactGUID;
|
||||
public ulong Amount;
|
||||
}
|
||||
|
||||
class ArtifactKnowledge : ServerPacket
|
||||
{
|
||||
public ArtifactKnowledge() : base(ServerOpcodes.ArtifactKnowledge) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(ArtifactCategoryID);
|
||||
_worldPacket.WriteInt8(KnowledgeLevel);
|
||||
}
|
||||
|
||||
public ArtifactCategory ArtifactCategoryID;
|
||||
public sbyte KnowledgeLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +78,6 @@ namespace Game.Network.Packets
|
||||
public override void Read()
|
||||
{
|
||||
DosResponse = _worldPacket.ReadUInt64();
|
||||
Build = _worldPacket.ReadUInt16();
|
||||
BuildType = _worldPacket.ReadInt8();
|
||||
RegionID = _worldPacket.ReadUInt32();
|
||||
BattlegroupID = _worldPacket.ReadUInt32();
|
||||
RealmID = _worldPacket.ReadUInt32();
|
||||
@@ -95,8 +93,6 @@ namespace Game.Network.Packets
|
||||
RealmJoinTicket = _worldPacket.ReadString(realmJoinTicketSize);
|
||||
}
|
||||
|
||||
public ushort Build;
|
||||
public sbyte BuildType;
|
||||
public uint RegionID;
|
||||
public uint BattlegroupID;
|
||||
public uint RealmID;
|
||||
@@ -145,6 +141,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.ForceCharacterTemplate);
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.NumPlayersHorde.HasValue);
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.NumPlayersAlliance.HasValue);
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.ExpansionTrialExpiration.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
{
|
||||
@@ -164,6 +161,9 @@ namespace Game.Network.Packets
|
||||
if (SuccessInfo.Value.NumPlayersAlliance.HasValue)
|
||||
_worldPacket.WriteUInt16(SuccessInfo.Value.NumPlayersAlliance.Value);
|
||||
|
||||
if(SuccessInfo.Value.ExpansionTrialExpiration.HasValue)
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.ExpansionTrialExpiration.Value);
|
||||
|
||||
foreach (VirtualRealmInfo virtualRealm in SuccessInfo.Value.VirtualRealms)
|
||||
virtualRealm.Write(_worldPacket);
|
||||
|
||||
@@ -216,6 +216,7 @@ namespace Game.Network.Packets
|
||||
public bool ForceCharacterTemplate; // forces the client to always use a character template when creating a new character. @see Templates. @todo implement
|
||||
public Optional<ushort> NumPlayersHorde; // number of horde players in this realm. @todo implement
|
||||
public Optional<ushort> NumPlayersAlliance; // number of alliance players in this realm. @todo implement
|
||||
public Optional<int> ExpansionTrialExpiration; // expansion trial expiration unix timestamp
|
||||
|
||||
public struct BillingInfo
|
||||
{
|
||||
|
||||
@@ -146,8 +146,11 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(HealingDone);
|
||||
data.WriteUInt32(Stats.Count);
|
||||
data.WriteInt32(PrimaryTalentTree);
|
||||
data.WriteInt32(PrimaryTalentTreeNameIndex);
|
||||
data.WriteInt32(Sex);
|
||||
data.WriteInt32(PlayerRace);
|
||||
data.WriteInt32(PlayerClass);
|
||||
data.WriteInt32(CreatureID);
|
||||
data.WriteInt32(HonorLevel);
|
||||
|
||||
foreach (var id in Stats)
|
||||
data.WriteUInt32(id);
|
||||
@@ -190,9 +193,11 @@ namespace Game.Network.Packets
|
||||
public Optional<int> MmrChange;
|
||||
public List<uint> Stats = new List<uint>();
|
||||
public int PrimaryTalentTree;
|
||||
public int PrimaryTalentTreeNameIndex; // controls which name field from ChrSpecialization.dbc will be sent to lua
|
||||
public int Sex;
|
||||
public Race PlayerRace;
|
||||
public uint Prestige;
|
||||
public int PlayerClass;
|
||||
public int CreatureID;
|
||||
public int HonorLevel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Dynamic;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -41,17 +42,19 @@ namespace Game.Network.Packets
|
||||
public ulong EventID;
|
||||
}
|
||||
|
||||
class CalendarGuildFilter : ClientPacket
|
||||
class CalendarCommunityFilter : ClientPacket
|
||||
{
|
||||
public CalendarGuildFilter(WorldPacket packet) : base(packet) { }
|
||||
public CalendarCommunityFilter(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
ClubId = _worldPacket.ReadUInt64();
|
||||
MinLevel = _worldPacket.ReadUInt8();
|
||||
MaxLevel = _worldPacket.ReadUInt8();
|
||||
MaxRankOrder = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public ulong ClubId;
|
||||
public byte MinLevel = 1;
|
||||
public byte MaxLevel = 100;
|
||||
public byte MaxRankOrder;
|
||||
@@ -77,18 +80,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
EventInfo.EventID = _worldPacket.ReadUInt64();
|
||||
EventInfo.ModeratorID = _worldPacket.ReadUInt64();
|
||||
EventInfo.EventType = _worldPacket.ReadUInt8();
|
||||
EventInfo.TextureID = _worldPacket.ReadUInt32();
|
||||
EventInfo.Time = _worldPacket.ReadPackedTime();
|
||||
EventInfo.Flags = _worldPacket.ReadUInt32();
|
||||
|
||||
byte titleLen = _worldPacket.ReadBits<byte>(8);
|
||||
ushort descLen = _worldPacket.ReadBits<ushort>(11);
|
||||
|
||||
EventInfo.Title = _worldPacket.ReadString(titleLen);
|
||||
EventInfo.Description = _worldPacket.ReadString(descLen);
|
||||
EventInfo.Read(_worldPacket);
|
||||
MaxSize = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
@@ -104,11 +96,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
EventID = _worldPacket.ReadUInt64();
|
||||
ModeratorID = _worldPacket.ReadUInt64();
|
||||
ClubID = _worldPacket.ReadUInt64();
|
||||
Flags = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public ulong ModeratorID;
|
||||
public ulong EventID;
|
||||
public ulong ClubID;
|
||||
public uint Flags;
|
||||
}
|
||||
|
||||
@@ -120,11 +114,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
EventID = _worldPacket.ReadUInt64();
|
||||
ModeratorID = _worldPacket.ReadUInt64();
|
||||
EventClubID = _worldPacket.ReadUInt64();
|
||||
Date = _worldPacket.ReadPackedTime();
|
||||
}
|
||||
|
||||
public ulong ModeratorID;
|
||||
public ulong EventID;
|
||||
public ulong EventClubID;
|
||||
public long Date;
|
||||
}
|
||||
|
||||
@@ -272,6 +268,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
EventID = _worldPacket.ReadUInt64();
|
||||
ModeratorID = _worldPacket.ReadUInt64();
|
||||
ClubID = _worldPacket.ReadUInt64();
|
||||
|
||||
ushort nameLen = _worldPacket.ReadBits<ushort>(9);
|
||||
Creating = _worldPacket.HasBit();
|
||||
@@ -284,6 +281,7 @@ namespace Game.Network.Packets
|
||||
public bool IsSignUp;
|
||||
public bool Creating = true;
|
||||
public ulong EventID;
|
||||
public ulong ClubID;
|
||||
public string Name;
|
||||
}
|
||||
|
||||
@@ -477,11 +475,13 @@ namespace Game.Network.Packets
|
||||
public override void Read()
|
||||
{
|
||||
EventID = _worldPacket.ReadUInt64();
|
||||
ClubID = _worldPacket.ReadUInt64();
|
||||
Tentative = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public bool Tentative;
|
||||
public ulong EventID;
|
||||
public ulong ClubID;
|
||||
}
|
||||
|
||||
class CalendarRemoveInvite : ClientPacket
|
||||
@@ -740,28 +740,40 @@ namespace Game.Network.Packets
|
||||
Guid = data.ReadPackedGuid();
|
||||
Status = data.ReadUInt8();
|
||||
Moderator = data.ReadUInt8();
|
||||
|
||||
bool hasUnused801_1 = data.HasBit();
|
||||
bool hasUnused801_2 = data.HasBit();
|
||||
bool hasUnused801_3 = data.HasBit();
|
||||
|
||||
if (hasUnused801_1)
|
||||
Unused801_1.Set(data.ReadPackedGuid());
|
||||
if (hasUnused801_2)
|
||||
Unused801_2.Set(data.ReadUInt64());
|
||||
if (hasUnused801_3)
|
||||
Unused801_3.Set(data.ReadUInt64());
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
public byte Status;
|
||||
public byte Moderator;
|
||||
public Optional<ObjectGuid> Unused801_1;
|
||||
public Optional<ulong> Unused801_2;
|
||||
public Optional<ulong> Unused801_3;
|
||||
}
|
||||
|
||||
class CalendarAddEventInfo
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
byte titleLength = data.ReadBits<byte>(8);
|
||||
ushort descriptionLength = data.ReadBits<ushort>(11);
|
||||
|
||||
ClubId = data.ReadUInt64();
|
||||
EventType = data.ReadUInt8();
|
||||
TextureID = data.ReadInt32();
|
||||
Time = data.ReadPackedTime();
|
||||
Flags = data.ReadUInt32();
|
||||
var InviteCount = data.ReadUInt32();
|
||||
|
||||
Title = data.ReadString(titleLength);
|
||||
Description = data.ReadString(descriptionLength);
|
||||
byte titleLength = data.ReadBits<byte>(8);
|
||||
ushort descriptionLength = data.ReadBits<ushort>(11);
|
||||
|
||||
for (var i = 0; i < InviteCount; ++i)
|
||||
{
|
||||
@@ -769,8 +781,12 @@ namespace Game.Network.Packets
|
||||
invite.Read(data);
|
||||
Invites[i] = invite;
|
||||
}
|
||||
|
||||
Title = data.ReadString(titleLength);
|
||||
Description = data.ReadString(descriptionLength);
|
||||
}
|
||||
|
||||
public ulong ClubId;
|
||||
public string Title;
|
||||
public string Description;
|
||||
public byte EventType;
|
||||
@@ -782,6 +798,24 @@ namespace Game.Network.Packets
|
||||
|
||||
struct CalendarUpdateEventInfo
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
ClubID = data.ReadUInt64();
|
||||
EventID = data.ReadUInt64();
|
||||
ModeratorID = data.ReadUInt64();
|
||||
EventType = data.ReadUInt8();
|
||||
TextureID = data.ReadUInt32();
|
||||
Time = data.ReadPackedTime();
|
||||
Flags = data.ReadUInt32();
|
||||
|
||||
byte titleLen = data.ReadBits<byte>(8);
|
||||
ushort descLen = data.ReadBits<ushort>(11);
|
||||
|
||||
Title = data.ReadString(titleLen);
|
||||
Description = data.ReadString(descLen);
|
||||
}
|
||||
|
||||
public ulong ClubID;
|
||||
public ulong EventID;
|
||||
public ulong ModeratorID;
|
||||
public string Title;
|
||||
@@ -836,7 +870,7 @@ namespace Game.Network.Packets
|
||||
data.WritePackedTime(Date);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteInt32(TextureID);
|
||||
data.WritePackedGuid(EventGuildID);
|
||||
data.WriteUInt64(EventClubID);
|
||||
data.WritePackedGuid(OwnerGuid);
|
||||
|
||||
data.WriteBits(EventName.GetByteCount(), 8);
|
||||
@@ -850,7 +884,7 @@ namespace Game.Network.Packets
|
||||
public long Date;
|
||||
public CalendarFlags Flags;
|
||||
public int TextureID;
|
||||
public ObjectGuid EventGuildID;
|
||||
public ulong EventClubID;
|
||||
public ObjectGuid OwnerGuid;
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,6 @@ namespace Game.Network.Packets
|
||||
case ClientOpcodes.ChatChannelDeclineInvite:
|
||||
case ClientOpcodes.ChatChannelDisplayList:
|
||||
case ClientOpcodes.ChatChannelList:
|
||||
case ClientOpcodes.ChatChannelModerate:
|
||||
case ClientOpcodes.ChatChannelOwner:
|
||||
break;
|
||||
default:
|
||||
@@ -248,12 +247,10 @@ namespace Game.Network.Packets
|
||||
case ClientOpcodes.ChatChannelInvite:
|
||||
case ClientOpcodes.ChatChannelKick:
|
||||
case ClientOpcodes.ChatChannelModerator:
|
||||
case ClientOpcodes.ChatChannelMute:
|
||||
case ClientOpcodes.ChatChannelSetOwner:
|
||||
case ClientOpcodes.ChatChannelSilenceAll:
|
||||
case ClientOpcodes.ChatChannelUnban:
|
||||
case ClientOpcodes.ChatChannelUnmoderator:
|
||||
case ClientOpcodes.ChatChannelUnmute:
|
||||
case ClientOpcodes.ChatChannelUnsilenceAll:
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.WriteBit(IsDeletedCharacters);
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(IsTestDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(HasDemonHunterOnRealm);
|
||||
_worldPacket.WriteBit(Unknown7x);
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.HasValue);
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket.WriteUInt32(Characters.Count);
|
||||
@@ -62,9 +62,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public bool Success;
|
||||
public bool IsDeletedCharacters; // used for character undelete list
|
||||
public bool IsDemonHunterCreationAllowed = false; //used for demon hunter early access
|
||||
public bool IsTestDemonHunterCreationAllowed = false; //allows client to skip 1 per realm and level 70 requirements
|
||||
public bool HasDemonHunterOnRealm = false;
|
||||
public bool Unknown7x = false;
|
||||
public bool IsDemonHunterCreationAllowed = false; //used for demon hunter early access
|
||||
public bool IsAlliedRacesCreationAllowed = false;
|
||||
|
||||
public int MaxCharacterLevel = 1;
|
||||
@@ -306,7 +306,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
CreateInfo = new CharacterCreateInfo();
|
||||
uint nameLength = _worldPacket.ReadBits<uint>(6);
|
||||
CreateInfo.TemplateSet.HasValue = _worldPacket.HasBit();
|
||||
bool hasTemplateSet = _worldPacket.HasBit();
|
||||
CreateInfo.IsTrialBoost = _worldPacket.HasBit();
|
||||
|
||||
CreateInfo.RaceId = (Race)_worldPacket.ReadUInt8();
|
||||
CreateInfo.ClassId = (Class)_worldPacket.ReadUInt8();
|
||||
CreateInfo.Sex = (Gender)_worldPacket.ReadUInt8();
|
||||
@@ -322,7 +324,7 @@ namespace Game.Network.Packets
|
||||
|
||||
CreateInfo.Name = _worldPacket.ReadString(nameLength);
|
||||
if (CreateInfo.TemplateSet.HasValue)
|
||||
CreateInfo.TemplateSet.Value = _worldPacket.ReadUInt32();
|
||||
CreateInfo.TemplateSet.Set(_worldPacket.ReadUInt32());
|
||||
}
|
||||
|
||||
public CharacterCreateInfo CreateInfo;
|
||||
@@ -335,9 +337,11 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Code);
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
}
|
||||
|
||||
public ResponseCodes Code;
|
||||
public ObjectGuid Guid;
|
||||
}
|
||||
|
||||
public class CharDelete : ClientPacket
|
||||
@@ -1043,6 +1047,7 @@ namespace Game.Network.Packets
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public byte OutfitId;
|
||||
public Optional<uint> TemplateSet = new Optional<uint>();
|
||||
public bool IsTrialBoost;
|
||||
public string Name;
|
||||
|
||||
// Server side data
|
||||
|
||||
@@ -19,6 +19,7 @@ using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Groups;
|
||||
using System;
|
||||
using Framework.Dynamic;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -79,52 +80,25 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
uint prefixLen = _worldPacket.ReadBits<uint>(5);
|
||||
uint textLen = _worldPacket.ReadBits<uint>(9);
|
||||
Prefix = _worldPacket.ReadString(prefixLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
Params.Read(_worldPacket);
|
||||
}
|
||||
|
||||
public string Prefix;
|
||||
public string Text;
|
||||
public ChatAddonMessageParams Params = new ChatAddonMessageParams();
|
||||
}
|
||||
|
||||
public class ChatAddonMessageWhisper : ClientPacket
|
||||
class ChatAddonMessageTargeted : ClientPacket
|
||||
{
|
||||
public ChatAddonMessageWhisper(WorldPacket packet) : base(packet) { }
|
||||
public ChatAddonMessageTargeted(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
uint targetLen = _worldPacket.ReadBits<uint>(9);
|
||||
uint prefixLen = _worldPacket.ReadBits<uint>(5);
|
||||
uint textLen = _worldPacket.ReadBits<uint>(9);
|
||||
Params.Read(_worldPacket);
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
Prefix = _worldPacket.ReadString(prefixLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
}
|
||||
|
||||
public string Prefix;
|
||||
public string Target;
|
||||
public string Text;
|
||||
}
|
||||
|
||||
class ChatAddonMessageChannel : ClientPacket
|
||||
{
|
||||
public ChatAddonMessageChannel(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
uint targetLen = _worldPacket.ReadBits<uint>(9);
|
||||
uint prefixLen = _worldPacket.ReadBits<uint>(5);
|
||||
uint textLen = _worldPacket.ReadBits<uint>(9);
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
Prefix = _worldPacket.ReadString(prefixLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
}
|
||||
|
||||
public string Text;
|
||||
public string Target;
|
||||
public string Prefix;
|
||||
public ChatAddonMessageParams Params = new ChatAddonMessageParams();
|
||||
}
|
||||
|
||||
public class ChatMessageDND : ClientPacket
|
||||
@@ -235,7 +209,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(SlashCmd);
|
||||
_worldPacket.WriteInt8(_Language);
|
||||
_worldPacket.WriteUInt32(_Language);
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WritePackedGuid(SenderGuildGUID);
|
||||
_worldPacket.WritePackedGuid(SenderAccountGUID);
|
||||
@@ -253,6 +227,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBits((byte)_ChatFlags, 11);
|
||||
_worldPacket.WriteBit(HideChatLog);
|
||||
_worldPacket.WriteBit(FakeSenderName);
|
||||
_worldPacket.WriteBit(Unused_801.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(SenderName);
|
||||
@@ -260,6 +235,9 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteString(Prefix);
|
||||
_worldPacket.WriteString(Channel);
|
||||
_worldPacket.WriteString(ChatText);
|
||||
|
||||
if (Unused_801.HasValue)
|
||||
_worldPacket.WriteUInt32(Unused_801.Value);
|
||||
}
|
||||
|
||||
public ChatMsg SlashCmd = 0;
|
||||
@@ -279,6 +257,7 @@ namespace Game.Network.Packets
|
||||
public uint AchievementID;
|
||||
public ChatFlags _ChatFlags = 0;
|
||||
public float DisplayTime = 0.0f;
|
||||
public Optional<uint> Unused_801;
|
||||
public bool HideChatLog = false;
|
||||
public bool FakeSenderName = false;
|
||||
}
|
||||
@@ -447,7 +426,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WriteUInt32(ZoneID);
|
||||
_worldPacket.WriteUInt32(ZoneID);
|
||||
_worldPacket.WriteBits(MessageText.GetByteCount(), 12);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(MessageText);
|
||||
@@ -470,4 +449,22 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid IgnoredGUID;
|
||||
public byte Reason;
|
||||
}
|
||||
|
||||
public class ChatAddonMessageParams
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
uint prefixLen = data.ReadBits<uint>(5);
|
||||
uint textLen = data.ReadBits<uint>(8);
|
||||
IsLogged = data.HasBit();
|
||||
Type = (ChatMsg)data.ReadInt32();
|
||||
Prefix = data.ReadString(prefixLen);
|
||||
Text = data.ReadString(textLen);
|
||||
}
|
||||
|
||||
public string Prefix;
|
||||
public string Text;
|
||||
public ChatMsg Type = ChatMsg.Party;
|
||||
public bool IsLogged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(SpellXSpellVisualID);
|
||||
_worldPacket.WriteInt32(Damage);
|
||||
_worldPacket.WriteInt32(OriginalDamage);
|
||||
_worldPacket.WriteInt32(Overkill);
|
||||
_worldPacket.WriteUInt8(SchoolMask);
|
||||
_worldPacket.WriteInt32(Absorbed);
|
||||
@@ -78,11 +79,11 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBits(Flags, 7);
|
||||
_worldPacket.WriteBit(false); // Debug info
|
||||
WriteLogDataBit();
|
||||
_worldPacket.WriteBit(SandboxScaling.HasValue);
|
||||
_worldPacket.WriteBit(ContentTuning.HasValue);
|
||||
FlushBits();
|
||||
WriteLogData();
|
||||
if (SandboxScaling.HasValue)
|
||||
SandboxScaling.Value.Write(_worldPacket);
|
||||
if (ContentTuning.HasValue)
|
||||
ContentTuning.Value.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public ObjectGuid Me;
|
||||
@@ -91,6 +92,7 @@ namespace Game.Network.Packets
|
||||
public int SpellID;
|
||||
public int SpellXSpellVisualID;
|
||||
public int Damage;
|
||||
public int OriginalDamage;
|
||||
public int Overkill = -1;
|
||||
public byte SchoolMask;
|
||||
public int ShieldBlock;
|
||||
@@ -99,7 +101,7 @@ namespace Game.Network.Packets
|
||||
public int Absorbed;
|
||||
public int Flags;
|
||||
// Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
|
||||
public Optional<SandboxScalingData> SandboxScaling = new Optional<SandboxScalingData>();
|
||||
public Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
|
||||
}
|
||||
|
||||
class EnvironmentalDamageLog : CombatLogServerPacket
|
||||
@@ -212,6 +214,7 @@ namespace Game.Network.Packets
|
||||
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Health);
|
||||
_worldPacket.WriteInt32(OriginalHeal);
|
||||
_worldPacket.WriteUInt32(OverHeal);
|
||||
_worldPacket.WriteUInt32(Absorbed);
|
||||
|
||||
@@ -220,7 +223,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(CritRollMade.HasValue);
|
||||
_worldPacket.WriteBit(CritRollNeeded.HasValue);
|
||||
WriteLogDataBit();
|
||||
_worldPacket.WriteBit(SandboxScaling.HasValue);
|
||||
_worldPacket.WriteBit(ContentTuning.HasValue);
|
||||
FlushBits();
|
||||
|
||||
WriteLogData();
|
||||
@@ -231,20 +234,21 @@ namespace Game.Network.Packets
|
||||
if (CritRollNeeded.HasValue)
|
||||
_worldPacket.WriteFloat(CritRollNeeded.Value);
|
||||
|
||||
if (SandboxScaling.HasValue)
|
||||
SandboxScaling.Value.Write(_worldPacket);
|
||||
if (ContentTuning.HasValue)
|
||||
ContentTuning.Value.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public ObjectGuid CasterGUID;
|
||||
public ObjectGuid TargetGUID;
|
||||
public uint SpellID;
|
||||
public uint Health;
|
||||
public int OriginalHeal;
|
||||
public uint OverHeal;
|
||||
public uint Absorbed;
|
||||
public bool Crit;
|
||||
public Optional<float> CritRollMade;
|
||||
public Optional<float> CritRollNeeded;
|
||||
Optional<SandboxScalingData> SandboxScaling = new Optional<SandboxScalingData>();
|
||||
Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
|
||||
}
|
||||
|
||||
class SpellPeriodicAuraLog : CombatLogServerPacket
|
||||
@@ -282,6 +286,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt32(Effect);
|
||||
data.WriteUInt32(Amount);
|
||||
data.WriteInt32(OriginalDamage);
|
||||
data.WriteUInt32(OverHealOrKill);
|
||||
data.WriteUInt32(SchoolMaskOrPower);
|
||||
data.WriteUInt32(AbsorbedOrAmplitude);
|
||||
@@ -289,11 +294,11 @@ namespace Game.Network.Packets
|
||||
|
||||
data.WriteBit(Crit);
|
||||
data.WriteBit(DebugInfo.HasValue);
|
||||
data.WriteBit(SandboxScaling.HasValue);
|
||||
data.WriteBit(ContentTuning.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (SandboxScaling.HasValue)
|
||||
SandboxScaling.Value.Write(data);
|
||||
if (ContentTuning.HasValue)
|
||||
ContentTuning.Value.Write(data);
|
||||
|
||||
if (DebugInfo.HasValue)
|
||||
{
|
||||
@@ -304,13 +309,14 @@ namespace Game.Network.Packets
|
||||
|
||||
public uint Effect;
|
||||
public uint Amount;
|
||||
public int OriginalDamage;
|
||||
public uint OverHealOrKill;
|
||||
public uint SchoolMaskOrPower;
|
||||
public uint AbsorbedOrAmplitude;
|
||||
public uint Resisted;
|
||||
public bool Crit;
|
||||
public Optional<PeriodicalAuraLogEffectDebugInfo> DebugInfo;
|
||||
public Optional<SandboxScalingData> SandboxScaling = new Optional<SandboxScalingData>();
|
||||
public Optional<ContentTuningParams> ContentTuning = new Optional<ContentTuningParams>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,6 +493,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(Defender);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(TotalDamage);
|
||||
_worldPacket.WriteInt32(OriginalDamage);
|
||||
_worldPacket.WriteUInt32(OverKill);
|
||||
_worldPacket.WriteUInt32(SchoolMask);
|
||||
_worldPacket.WriteUInt32(LogAbsorbed);
|
||||
@@ -500,6 +507,7 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid Defender;
|
||||
public uint SpellID;
|
||||
public uint TotalDamage;
|
||||
public int OriginalDamage;
|
||||
public uint OverKill;
|
||||
public uint SchoolMask;
|
||||
public uint LogAbsorbed;
|
||||
@@ -519,6 +527,7 @@ namespace Game.Network.Packets
|
||||
attackRoundInfo.WritePackedGuid(AttackerGUID);
|
||||
attackRoundInfo.WritePackedGuid(VictimGUID);
|
||||
attackRoundInfo.WriteInt32(Damage);
|
||||
attackRoundInfo.WriteInt32(OriginalDamage);
|
||||
attackRoundInfo.WriteInt32(OverDamage);
|
||||
attackRoundInfo.WriteUInt8(SubDmg.HasValue);
|
||||
|
||||
@@ -562,15 +571,16 @@ namespace Game.Network.Packets
|
||||
if (hitInfo.HasAnyFlag(HitInfo.Block | HitInfo.Unk12))
|
||||
attackRoundInfo.WriteFloat(Unk);
|
||||
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.Type);
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.TargetLevel);
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.Expansion);
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.Class);
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.TargetMinScalingLevel);
|
||||
attackRoundInfo.WriteUInt8(SandboxScaling.TargetMaxScalingLevel);
|
||||
attackRoundInfo.WriteInt16(SandboxScaling.PlayerLevelDelta);
|
||||
attackRoundInfo.WriteInt8(SandboxScaling.TargetScalingLevelDelta);
|
||||
attackRoundInfo.WriteUInt16(SandboxScaling.PlayerItemLevel);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TuningType);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetLevel);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.Expansion);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetMinScalingLevel);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetMaxScalingLevel);
|
||||
attackRoundInfo.WriteInt16(ContentTuning.PlayerLevelDelta);
|
||||
attackRoundInfo.WriteInt8(ContentTuning.TargetScalingLevelDelta);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.ScalingHealthItemLevelCurveID);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.ScalesWithItemLevel ? 1 : 0);
|
||||
|
||||
WriteLogDataBit();
|
||||
FlushBits();
|
||||
@@ -584,6 +594,7 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid AttackerGUID;
|
||||
public ObjectGuid VictimGUID;
|
||||
public int Damage;
|
||||
public int OriginalDamage;
|
||||
public int OverDamage = -1; // (damage - health) or -1 if unit is still alive
|
||||
public Optional<SubDamage> SubDmg;
|
||||
public byte VictimState;
|
||||
@@ -593,7 +604,7 @@ namespace Game.Network.Packets
|
||||
public int RageGained;
|
||||
public UnkAttackerState UnkState;
|
||||
public float Unk;
|
||||
public SandboxScalingData SandboxScaling = new SandboxScalingData();
|
||||
public ContentTuningParams ContentTuning = new ContentTuningParams();
|
||||
}
|
||||
|
||||
//Structs
|
||||
@@ -645,7 +656,7 @@ namespace Game.Network.Packets
|
||||
public float HitRollNeeded;
|
||||
}
|
||||
|
||||
public struct SpellLogMissEntry
|
||||
public class SpellLogMissEntry
|
||||
{
|
||||
public SpellLogMissEntry(ObjectGuid victim, byte missReason)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits((uint)Reason, 2);
|
||||
_worldPacket.WriteBits((uint)Reason, 3);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,10 +114,12 @@ namespace Game.Network.Packets
|
||||
{
|
||||
ArbiterGUID = _worldPacket.ReadPackedGuid();
|
||||
Accepted = _worldPacket.HasBit();
|
||||
Forfeited = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public ObjectGuid ArbiterGUID;
|
||||
public bool Accepted;
|
||||
public bool Forfeited;
|
||||
}
|
||||
|
||||
public class DuelWinner : ServerPacket
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(Availability);
|
||||
data.WriteInt32(ClassRoles);
|
||||
data.WriteInt32(LevelRange);
|
||||
data.WriteUInt32(SecondsRemaining);
|
||||
data.WriteInt32(SecondsRemaining);
|
||||
data.WriteString(Comment);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace Game.Network.Packets
|
||||
public int Availability;
|
||||
public int ClassRoles;
|
||||
public int LevelRange;
|
||||
public long SecondsRemaining;
|
||||
public int SecondsRemaining;
|
||||
public string Comment = "";
|
||||
}
|
||||
|
||||
|
||||
@@ -558,12 +558,12 @@ namespace Game.Network.Packets
|
||||
RankOrder = _worldPacket.ReadInt32();
|
||||
Flags = _worldPacket.ReadUInt32();
|
||||
OldFlags = _worldPacket.ReadUInt32();
|
||||
WithdrawGoldLimit = _worldPacket.ReadInt32();
|
||||
WithdrawGoldLimit = _worldPacket.ReadUInt32();
|
||||
|
||||
for (byte i = 0; i < GuildConst.MaxBankTabs; i++)
|
||||
{
|
||||
TabFlags[i] = _worldPacket.ReadInt32();
|
||||
TabWithdrawItemLimit[i] = _worldPacket.ReadInt32();
|
||||
TabFlags[i] = _worldPacket.ReadUInt32();
|
||||
TabWithdrawItemLimit[i] = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
_worldPacket.ResetBitPos();
|
||||
@@ -574,11 +574,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public int RankID;
|
||||
public int RankOrder;
|
||||
public int WithdrawGoldLimit;
|
||||
public uint WithdrawGoldLimit;
|
||||
public uint Flags;
|
||||
public uint OldFlags;
|
||||
public int[] TabFlags = new int[GuildConst.MaxBankTabs];
|
||||
public int[] TabWithdrawItemLimit = new int[GuildConst.MaxBankTabs];
|
||||
public uint[] TabFlags = new uint[GuildConst.MaxBankTabs];
|
||||
public uint[] TabWithdrawItemLimit = new uint[GuildConst.MaxBankTabs];
|
||||
public string RankName;
|
||||
}
|
||||
|
||||
@@ -1430,7 +1430,7 @@ namespace Game.Network.Packets
|
||||
public GuildRosterProfessionData[] Profession = new GuildRosterProfessionData[2];
|
||||
}
|
||||
|
||||
public struct GuildEventEntry
|
||||
public class GuildEventEntry
|
||||
{
|
||||
public ObjectGuid PlayerGUID;
|
||||
public ObjectGuid OtherGUID;
|
||||
@@ -1512,7 +1512,7 @@ namespace Game.Network.Packets
|
||||
public string Icon;
|
||||
}
|
||||
|
||||
public struct GuildBankLogEntry
|
||||
public class GuildBankLogEntry
|
||||
{
|
||||
public ObjectGuid PlayerGUID;
|
||||
public uint TimeOffset;
|
||||
|
||||
@@ -59,12 +59,16 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt16(PvpTalents[i]);
|
||||
|
||||
_worldPacket.WriteBit(GuildData.HasValue);
|
||||
_worldPacket.WriteBit(AzeriteLevel.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
Items.ForEach(p => p.Write(_worldPacket));
|
||||
|
||||
if (GuildData.HasValue)
|
||||
GuildData.Value.Write(_worldPacket);
|
||||
|
||||
if (AzeriteLevel.HasValue)
|
||||
_worldPacket.WriteInt32(AzeriteLevel.Value);
|
||||
}
|
||||
|
||||
public ObjectGuid InspecteeGUID;
|
||||
@@ -76,6 +80,7 @@ namespace Game.Network.Packets
|
||||
public Gender GenderID = Gender.None;
|
||||
public Optional<InspectGuildData> GuildData = new Optional<InspectGuildData>();
|
||||
public int SpecializationID;
|
||||
public Optional<int> AzeriteLevel;
|
||||
}
|
||||
|
||||
public class RequestHonorStats : ClientPacket
|
||||
@@ -211,6 +216,10 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WritePackedGuid(CreatorGUID);
|
||||
data.WriteUInt8(Index);
|
||||
data.WriteUInt32(AzeritePowers.Count);
|
||||
foreach (var id in AzeritePowers)
|
||||
data.WriteInt32(id);
|
||||
|
||||
Item.Write(data);
|
||||
data.WriteBit(Usable);
|
||||
data.WriteBits(Enchants.Count, 4);
|
||||
@@ -230,6 +239,7 @@ namespace Game.Network.Packets
|
||||
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 struct InspectGuildData
|
||||
@@ -250,6 +260,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Bracket);
|
||||
data.WriteInt32(Rating);
|
||||
data.WriteInt32(Rank);
|
||||
data.WriteInt32(WeeklyPlayed);
|
||||
@@ -258,7 +269,10 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(SeasonWon);
|
||||
data.WriteInt32(WeeklyBestRating);
|
||||
data.WriteInt32(Unk710);
|
||||
data.WriteUInt8(Bracket);
|
||||
data.WriteInt32(Unk801_1);
|
||||
data.WriteBit(Unk801_2);
|
||||
data.FlushBits();
|
||||
|
||||
}
|
||||
|
||||
public int Rating;
|
||||
@@ -269,7 +283,9 @@ namespace Game.Network.Packets
|
||||
public int SeasonWon;
|
||||
public int WeeklyBestRating;
|
||||
public int Unk710;
|
||||
public int Unk801_1;
|
||||
public byte Bracket;
|
||||
public bool Unk801_2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,11 +41,11 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteInt32(LockList.Count);
|
||||
|
||||
foreach (InstanceLockInfos lockInfos in LockList)
|
||||
foreach (InstanceLock lockInfos in LockList)
|
||||
lockInfos.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public List<InstanceLockInfos> LockList = new List<InstanceLockInfos>();
|
||||
public List<InstanceLock> LockList = new List<InstanceLock>();
|
||||
}
|
||||
|
||||
class ResetInstances : ClientPacket
|
||||
@@ -270,14 +270,14 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
//Structs
|
||||
public struct InstanceLockInfos
|
||||
public struct InstanceLock
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(MapID);
|
||||
data.WriteUInt32(DifficultyID);
|
||||
data.WriteUInt64(InstanceID);
|
||||
data.WriteInt32(TimeRemaining);
|
||||
data.WriteUInt32(TimeRemaining);
|
||||
data.WriteUInt32(CompletedMask);
|
||||
|
||||
data.WriteBit(Locked);
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Item);
|
||||
_worldPacket.WriteUInt32(Delay);
|
||||
_worldPacket.WriteBits(Subcode, 3);
|
||||
_worldPacket.WriteBits(Subcode, 2);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
|
||||
@@ -663,27 +663,40 @@ namespace Game.Network.Packets
|
||||
|
||||
public struct LFGPlayerRewards
|
||||
{
|
||||
public LFGPlayerRewards(uint rewardItem, uint rewardItemQuantity, int bonusCurrency, bool isCurrency)
|
||||
public LFGPlayerRewards(uint id, uint quantity, int bonusQuantity, bool isCurrency)
|
||||
{
|
||||
RewardItem = rewardItem;
|
||||
RewardItemQuantity = rewardItemQuantity;
|
||||
BonusCurrency = bonusCurrency;
|
||||
IsCurrency = isCurrency;
|
||||
Quantity = quantity;
|
||||
BonusQuantity = bonusQuantity;
|
||||
RewardItem = new Optional<ItemInstance>();
|
||||
RewardCurrency = new Optional<uint>();
|
||||
|
||||
if (!isCurrency)
|
||||
{
|
||||
RewardItem.HasValue = true;
|
||||
RewardItem.Value.ItemID = id;
|
||||
}
|
||||
else
|
||||
{
|
||||
RewardCurrency.Set(id);
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(RewardItem);
|
||||
data.WriteUInt32(RewardItemQuantity);
|
||||
data.WriteInt32(BonusCurrency);
|
||||
data.WriteBit(IsCurrency);
|
||||
data.FlushBits();
|
||||
data.WriteBit(RewardItem.HasValue);
|
||||
data.WriteBit(RewardCurrency.HasValue);
|
||||
if (RewardItem.HasValue)
|
||||
RewardItem.Value.Write(data);
|
||||
data.WriteUInt32(Quantity);
|
||||
data.WriteInt32(BonusQuantity);
|
||||
if (RewardCurrency.HasValue)
|
||||
data.WriteInt32(RewardCurrency.Value);
|
||||
}
|
||||
|
||||
public uint RewardItem;
|
||||
public uint RewardItemQuantity;
|
||||
public int BonusCurrency;
|
||||
public bool IsCurrency;
|
||||
public Optional<ItemInstance> RewardItem;
|
||||
public Optional<uint> RewardCurrency;
|
||||
public uint Quantity;
|
||||
public int BonusQuantity;
|
||||
}
|
||||
|
||||
public class LfgBootInfo
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Game.Network.Packets
|
||||
|
||||
class LootList : ServerPacket
|
||||
{
|
||||
public LootList() : base(ServerOpcodes.LootList) { }
|
||||
public LootList() : base(ServerOpcodes.LootList, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
|
||||
@@ -370,10 +370,10 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
DifficultyID = _worldPacket.ReadInt32();
|
||||
DifficultyID = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public int DifficultyID;
|
||||
public uint DifficultyID;
|
||||
}
|
||||
|
||||
public class SetRaidDifficulty : ClientPacket
|
||||
@@ -675,14 +675,16 @@ namespace Game.Network.Packets
|
||||
foreach (int stat in StatDelta)
|
||||
_worldPacket.WriteInt32(stat);
|
||||
|
||||
_worldPacket.WriteInt32(Cp);
|
||||
_worldPacket.WriteInt32(NumNewTalents);
|
||||
_worldPacket.WriteInt32(NumNewPvpTalentSlots);
|
||||
}
|
||||
|
||||
public uint Level = 0;
|
||||
public uint HealthDelta = 0;
|
||||
public int[] PowerDelta = new int[6];
|
||||
public int[] StatDelta = new int[(int)Stats.Max];
|
||||
public int Cp = 0;
|
||||
public int NumNewTalents;
|
||||
public int NumNewPvpTalentSlots;
|
||||
}
|
||||
|
||||
public class PlayMusic : ServerPacket
|
||||
@@ -760,15 +762,15 @@ namespace Game.Network.Packets
|
||||
foreach (ushort preloadMapId in PreloadMapIDs)
|
||||
_worldPacket.WriteUInt16(preloadMapId); // Inactive terrain swap map id
|
||||
|
||||
_worldPacket.WriteUInt32(UiWorldMapAreaIDSwaps.Count * 2); // size in bytes
|
||||
foreach (ushort uiWorldMapAreaIDSwap in UiWorldMapAreaIDSwaps)
|
||||
_worldPacket.WriteUInt16(uiWorldMapAreaIDSwap); // UI map id, WorldMapArea.db2, controls map display
|
||||
_worldPacket.WriteUInt32(UiMapPhaseIDs.Count * 2); // size in bytes
|
||||
foreach (ushort uiMapPhaseId in UiMapPhaseIDs)
|
||||
_worldPacket.WriteUInt16(uiMapPhaseId); // UI map id, WorldMapArea.db2, controls map display
|
||||
}
|
||||
|
||||
public ObjectGuid Client;
|
||||
public PhaseShiftData Phaseshift = new PhaseShiftData();
|
||||
public List<ushort> PreloadMapIDs = new List<ushort>();
|
||||
public List<ushort> UiWorldMapAreaIDSwaps = new List<ushort>();
|
||||
public List<ushort> UiMapPhaseIDs = new List<ushort>();
|
||||
public List<ushort> VisibleMapIDs = new List<ushort>();
|
||||
}
|
||||
|
||||
@@ -1276,13 +1278,6 @@ namespace Game.Network.Packets
|
||||
public bool IsFavorite;
|
||||
}
|
||||
|
||||
class PvpPrestigeRankUp : ClientPacket
|
||||
{
|
||||
public PvpPrestigeRankUp(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
class CloseInteraction : ClientPacket
|
||||
{
|
||||
public CloseInteraction(WorldPacket packet) : base(packet) { }
|
||||
|
||||
@@ -318,12 +318,13 @@ namespace Game.Network.Packets
|
||||
|
||||
if (splineFlags.hasFlag(SplineFlag.Parabolic))
|
||||
{
|
||||
movementSpline.JumpGravity = moveSpline.vertical_acceleration;
|
||||
movementSpline.SpecialTime = (uint)moveSpline.effect_start_time;
|
||||
movementSpline.JumpExtraData.HasValue = true;
|
||||
movementSpline.JumpExtraData.Value.JumpGravity = moveSpline.vertical_acceleration;
|
||||
movementSpline.JumpExtraData.Value.StartTime = (uint)moveSpline.effect_start_time;
|
||||
}
|
||||
|
||||
if (splineFlags.hasFlag(SplineFlag.FadeObject))
|
||||
movementSpline.SpecialTime = (uint)moveSpline.effect_start_time;
|
||||
movementSpline.FadeObjectTime = (uint)moveSpline.effect_start_time;
|
||||
|
||||
if (moveSpline.spell_effect_extra.HasValue)
|
||||
{
|
||||
@@ -332,6 +333,7 @@ namespace Game.Network.Packets
|
||||
movementSpline.SpellEffectExtraData.Value.SpellVisualID = moveSpline.spell_effect_extra.Value.SpellVisualId;
|
||||
movementSpline.SpellEffectExtraData.Value.ProgressCurveID = moveSpline.spell_effect_extra.Value.ProgressCurveId;
|
||||
movementSpline.SpellEffectExtraData.Value.ParabolicCurveID = moveSpline.spell_effect_extra.Value.ParabolicCurveId;
|
||||
movementSpline.SpellEffectExtraData.Value.JumpGravity = moveSpline.vertical_acceleration;
|
||||
}
|
||||
|
||||
Spline spline = moveSpline.spline;
|
||||
@@ -1096,12 +1098,28 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(SpellVisualID);
|
||||
data.WriteUInt32(ProgressCurveID);
|
||||
data.WriteUInt32(ParabolicCurveID);
|
||||
data.WriteFloat(JumpGravity);
|
||||
}
|
||||
|
||||
public ObjectGuid TargetGuid;
|
||||
public uint SpellVisualID;
|
||||
public uint ProgressCurveID;
|
||||
public uint ParabolicCurveID;
|
||||
public float JumpGravity;
|
||||
}
|
||||
|
||||
public struct MonsterSplineJumpExtraData
|
||||
{
|
||||
public float JumpGravity;
|
||||
public uint StartTime;
|
||||
public uint Duration;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteFloat(JumpGravity);
|
||||
data.WriteUInt32(StartTime);
|
||||
data.WriteUInt32(Duration);
|
||||
}
|
||||
}
|
||||
|
||||
public class MovementSpline
|
||||
@@ -1113,8 +1131,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(TierTransStartTime);
|
||||
data.WriteInt32(Elapsed);
|
||||
data.WriteUInt32(MoveTime);
|
||||
data.WriteFloat(JumpGravity);
|
||||
data.WriteUInt32(SpecialTime);
|
||||
data.WriteUInt32(FadeObjectTime);
|
||||
data.WriteUInt8(Mode);
|
||||
data.WriteUInt8(VehicleExitVoluntary);
|
||||
data.WritePackedGuid(TransportGUID);
|
||||
@@ -1124,6 +1141,7 @@ namespace Game.Network.Packets
|
||||
data.WriteBits(PackedDeltas.Count, 16);
|
||||
data.WriteBit(SplineFilter.HasValue);
|
||||
data.WriteBit(SpellEffectExtraData.HasValue);
|
||||
data.WriteBit(JumpExtraData.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (SplineFilter.HasValue)
|
||||
@@ -1151,6 +1169,9 @@ namespace Game.Network.Packets
|
||||
|
||||
if (SpellEffectExtraData.HasValue)
|
||||
SpellEffectExtraData.Value.Write(data);
|
||||
|
||||
if (JumpExtraData.HasValue)
|
||||
JumpExtraData.Value.Write(data);
|
||||
}
|
||||
|
||||
public uint Flags; // Spline flags
|
||||
@@ -1159,8 +1180,7 @@ namespace Game.Network.Packets
|
||||
public uint TierTransStartTime;
|
||||
public int Elapsed;
|
||||
public uint MoveTime;
|
||||
public float JumpGravity;
|
||||
public uint SpecialTime;
|
||||
public uint FadeObjectTime;
|
||||
public List<Vector3> Points = new List<Vector3>(); // 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 byte VehicleExitVoluntary;
|
||||
@@ -1169,6 +1189,7 @@ namespace Game.Network.Packets
|
||||
public List<Vector3> PackedDeltas = new List<Vector3>();
|
||||
public Optional<MonsterSplineFilter> SplineFilter;
|
||||
public Optional<MonsterSplineSpellEffectExtraData> SpellEffectExtraData;
|
||||
public Optional<MonsterSplineJumpExtraData> JumpExtraData;
|
||||
public float FaceDirection;
|
||||
public ObjectGuid FaceGUID;
|
||||
public Vector3 FaceSpot;
|
||||
|
||||
@@ -209,15 +209,18 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Flags, 14);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.WriteUInt32(ID);
|
||||
_worldPacket.WriteFloat(Pos.X);
|
||||
_worldPacket.WriteFloat(Pos.Y);
|
||||
_worldPacket.WriteUInt32(Icon);
|
||||
_worldPacket.WriteUInt32(Importance);
|
||||
_worldPacket.WriteBits(Flags, 14);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Name);
|
||||
}
|
||||
|
||||
public uint ID;
|
||||
public uint Flags;
|
||||
public Vector2 Pos;
|
||||
public uint Icon;
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
ProposedRoles = _worldPacket.ReadInt32();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
ProposedRoles = _worldPacket.ReadUInt32();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
|
||||
uint targetNameLen = _worldPacket.ReadBits<uint>(9);
|
||||
@@ -64,8 +64,8 @@ namespace Game.Network.Packets
|
||||
TargetRealm = _worldPacket.ReadString(targetRealmLen);
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public int ProposedRoles;
|
||||
public byte PartyIndex;
|
||||
public uint ProposedRoles;
|
||||
public string TargetName;
|
||||
public string TargetRealm;
|
||||
public ObjectGuid TargetGUID;
|
||||
@@ -75,7 +75,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public PartyInvite() : base(ServerOpcodes.PartyInvite) { }
|
||||
|
||||
public void Initialize(Player inviter, int proposedRoles, bool canAccept)
|
||||
public void Initialize(Player inviter, uint proposedRoles, bool canAccept)
|
||||
{
|
||||
CanAccept = canAccept;
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Game.Network.Packets
|
||||
public string InviterRealmNameNormalized;
|
||||
|
||||
// Lfg
|
||||
public int ProposedRoles;
|
||||
public uint ProposedRoles;
|
||||
public int LfgCompletedMask;
|
||||
public List<int> LfgSlots = new List<int>();
|
||||
}
|
||||
@@ -152,18 +152,18 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
|
||||
Accept = _worldPacket.HasBit();
|
||||
|
||||
bool hasRolesDesired = _worldPacket.HasBit();
|
||||
if (hasRolesDesired)
|
||||
RolesDesired.Set(_worldPacket.ReadInt32());
|
||||
RolesDesired.Set(_worldPacket.ReadUInt32());
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public bool Accept;
|
||||
public Optional<int> RolesDesired;
|
||||
public Optional<uint> RolesDesired;
|
||||
}
|
||||
|
||||
class PartyUninvite : ClientPacket
|
||||
@@ -172,14 +172,14 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
|
||||
byte reasonLen = _worldPacket.ReadBits<byte>(8);
|
||||
Reason = _worldPacket.ReadString(reasonLen);
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
public string Reason;
|
||||
}
|
||||
@@ -207,11 +207,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
}
|
||||
|
||||
@@ -571,13 +571,13 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
Apply = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public ObjectGuid Target;
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public bool Apply;
|
||||
}
|
||||
|
||||
@@ -635,11 +635,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
IsReady = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public bool IsReady;
|
||||
}
|
||||
|
||||
@@ -790,11 +790,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
EveryoneIsAssistant = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public bool EveryoneIsAssistant;
|
||||
}
|
||||
|
||||
@@ -1032,7 +1032,9 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteBits(VoiceStateID.GetByteCount(), 6);
|
||||
data.WriteBit(FromSocialQueue);
|
||||
data.WriteBit(VoiceChatSilenced);
|
||||
data.WritePackedGuid(GUID);
|
||||
data.WriteUInt8(Status);
|
||||
data.WriteUInt8(Subgroup);
|
||||
@@ -1040,17 +1042,19 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt8(RolesAssigned);
|
||||
data.WriteUInt8(Class);
|
||||
data.WriteString(Name);
|
||||
data.WriteString(VoiceStateID);
|
||||
}
|
||||
|
||||
public ObjectGuid GUID;
|
||||
public string Name;
|
||||
public string VoiceStateID; // same as bgs.protocol.club.v1.MemberVoiceState.id
|
||||
public byte Class;
|
||||
|
||||
public GroupMemberOnlineStatus Status;
|
||||
public byte Subgroup;
|
||||
public byte Flags;
|
||||
public byte RolesAssigned;
|
||||
public bool FromSocialQueue;
|
||||
public bool VoiceChatSilenced;
|
||||
}
|
||||
|
||||
struct PartyLFGInfo
|
||||
|
||||
@@ -154,9 +154,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(pet.CreatureID);
|
||||
_worldPacket.WriteUInt32(pet.DisplayID);
|
||||
_worldPacket.WriteUInt32(pet.ExperienceLevel);
|
||||
_worldPacket.WriteUInt32(pet.PetFlags);
|
||||
|
||||
_worldPacket.WriteUInt8(pet.PetName.GetByteCount());
|
||||
_worldPacket.WriteUInt8(pet.PetFlags);
|
||||
_worldPacket.WriteBits(pet.PetName.GetByteCount(), 8);
|
||||
_worldPacket.WriteString(pet.PetName);
|
||||
}
|
||||
}
|
||||
@@ -199,21 +198,18 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WritePackedGuid(RenameData.PetGUID);
|
||||
_worldPacket.WriteInt32(RenameData.PetNumber);
|
||||
|
||||
_worldPacket.WriteUInt8(RenameData.NewName.GetByteCount());
|
||||
|
||||
_worldPacket.WriteBit(RenameData.HasDeclinedNames);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (RenameData.HasDeclinedNames)
|
||||
{
|
||||
for (int i = 0; i < SharedConst.MaxDeclinedNameCases; i++)
|
||||
{
|
||||
_worldPacket.WriteBits(RenameData.DeclinedNames.name[i].GetByteCount(), 7);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
for (int i = 0; i < SharedConst.MaxDeclinedNameCases; i++)
|
||||
_worldPacket.WriteString(RenameData.DeclinedNames.name[i]);
|
||||
@@ -235,7 +231,7 @@ namespace Game.Network.Packets
|
||||
RenameData.PetGUID = _worldPacket.ReadPackedGuid();
|
||||
RenameData.PetNumber = _worldPacket.ReadInt32();
|
||||
|
||||
uint nameLen = _worldPacket.ReadUInt8();
|
||||
uint nameLen = _worldPacket.ReadBits<uint>(8);
|
||||
|
||||
RenameData.HasDeclinedNames = _worldPacket.HasBit();
|
||||
if (RenameData.HasDeclinedNames)
|
||||
|
||||
@@ -312,12 +312,12 @@ namespace Game.Network.Packets
|
||||
data.WriteBits(Title.GetByteCount(), 7);
|
||||
data.WriteBits(BodyText.GetByteCount(), 12);
|
||||
|
||||
for (byte i = 0; i < 10; i++)
|
||||
for (byte i = 0; i < Choicetext.Length; i++)
|
||||
data.WriteBits(Choicetext[i].GetByteCount(), 6);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
for (byte i = 0; i < 10; i++)
|
||||
for (byte i = 0; i < Choicetext.Length; i++)
|
||||
data.WriteString(Choicetext[i]);
|
||||
|
||||
data.WriteString(Title);
|
||||
|
||||
@@ -111,9 +111,18 @@ namespace Game.Network.Packets
|
||||
|
||||
for (var i = 0; i < SharedConst.MaxCreatureKillCredit; ++i)
|
||||
_worldPacket.WriteUInt32(Stats.ProxyCreatureID[i]);
|
||||
_worldPacket.WriteUInt32(Stats.Display.CreatureDisplay.Count);
|
||||
_worldPacket.WriteFloat(Stats.Display.TotalProbability);
|
||||
|
||||
for (var i = 0; i < SharedConst.MaxCreatureModelIds; ++i)
|
||||
_worldPacket.WriteUInt32(Stats.CreatureDisplayID[i]);
|
||||
_worldPacket.WriteUInt32(Stats.Display.CreatureDisplay.Count);
|
||||
_worldPacket.WriteFloat(Stats.Display.TotalProbability);
|
||||
|
||||
foreach (CreatureXDisplay display in Stats.Display.CreatureDisplay)
|
||||
{
|
||||
_worldPacket.WriteUInt32(display.CreatureDisplayID);
|
||||
_worldPacket.WriteFloat(display.Scale);
|
||||
_worldPacket.WriteFloat(display.Probability);
|
||||
}
|
||||
|
||||
_worldPacket.WriteFloat(Stats.HpMulti);
|
||||
_worldPacket.WriteFloat(Stats.EnergyMulti);
|
||||
@@ -123,6 +132,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(Stats.HealthScalingExpansion);
|
||||
_worldPacket.WriteUInt32(Stats.RequiredExpansion);
|
||||
_worldPacket.WriteInt32(Stats.VignetteID);
|
||||
_worldPacket.WriteInt32(Stats.Class);
|
||||
|
||||
if (!Stats.Title.IsEmpty())
|
||||
_worldPacket.WriteCString(Stats.Title);
|
||||
@@ -392,12 +402,12 @@ namespace Game.Network.Packets
|
||||
{
|
||||
MissingQuestCount = _worldPacket.ReadInt32();
|
||||
|
||||
for (byte i = 0; i < 50; ++i)
|
||||
for (byte i = 0; i < MissingQuestCount; ++i)
|
||||
MissingQuestPOIs[i] = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public int MissingQuestCount;
|
||||
public uint[] MissingQuestPOIs = new uint[50];
|
||||
public uint[] MissingQuestPOIs = new uint[100];
|
||||
}
|
||||
|
||||
public class QuestPOIQueryResponse : ServerPacket
|
||||
@@ -422,13 +432,12 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(questPOIBlobData.QuestObjectiveID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.QuestObjectID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.MapID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.WorldMapAreaID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.Floor);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.UiMapID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.Priority);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.Flags);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.WorldEffectID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.PlayerConditionID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.UnkWoD1);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.SpawnTrackingID);
|
||||
_worldPacket.WriteInt32(questPOIBlobData.QuestPOIBlobPointStats.Count);
|
||||
|
||||
foreach (QuestPOIBlobPoint questPOIBlobPoint in questPOIBlobData.QuestPOIBlobPointStats)
|
||||
@@ -670,6 +679,7 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(AccountID);
|
||||
data.WritePackedGuid(BnetAccountID);
|
||||
data.WritePackedGuid(GuidActual);
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WriteUInt32(VirtualRealmAddress);
|
||||
data.WriteUInt8(RaceID);
|
||||
data.WriteUInt8(Sex);
|
||||
@@ -683,6 +693,7 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid BnetAccountID;
|
||||
public ObjectGuid GuidActual;
|
||||
public string Name = "";
|
||||
public ulong GuildClubMemberID; // same as bgs.protocol.club.v1.MemberId.unique_id
|
||||
public uint VirtualRealmAddress;
|
||||
public Race RaceID = Race.None;
|
||||
public Gender Sex = Gender.None;
|
||||
@@ -691,6 +702,26 @@ namespace Game.Network.Packets
|
||||
public DeclinedName DeclinedNames = new DeclinedName();
|
||||
}
|
||||
|
||||
public class CreatureXDisplay
|
||||
{
|
||||
public CreatureXDisplay(uint creatureDisplayID, float displayScale, float probability)
|
||||
{
|
||||
CreatureDisplayID = creatureDisplayID;
|
||||
Scale = displayScale;
|
||||
Probability = probability;
|
||||
}
|
||||
|
||||
public uint CreatureDisplayID;
|
||||
public float Scale = 1.0f;
|
||||
public float Probability = 1.0f;
|
||||
}
|
||||
|
||||
public class CreatureDisplayStats
|
||||
{
|
||||
public float TotalProbability;
|
||||
public List<CreatureXDisplay> CreatureDisplay = new List<CreatureXDisplay>();
|
||||
}
|
||||
|
||||
public class CreatureStats
|
||||
{
|
||||
public string Title;
|
||||
@@ -699,6 +730,7 @@ namespace Game.Network.Packets
|
||||
public int CreatureType;
|
||||
public int CreatureFamily;
|
||||
public int Classification;
|
||||
public CreatureDisplayStats Display = new CreatureDisplayStats();
|
||||
public float HpMulti;
|
||||
public float EnergyMulti;
|
||||
public bool Leader;
|
||||
@@ -707,9 +739,9 @@ namespace Game.Network.Packets
|
||||
public int HealthScalingExpansion;
|
||||
public uint RequiredExpansion;
|
||||
public uint VignetteID;
|
||||
public int Class;
|
||||
public uint[] Flags = new uint[2];
|
||||
public uint[] ProxyCreatureID = new uint[SharedConst.MaxCreatureKillCredit];
|
||||
public uint[] CreatureDisplayID = new uint[SharedConst.MaxCreatureModelIds];
|
||||
public StringArray Name = new StringArray(SharedConst.MaxCreatureNames);
|
||||
public StringArray NameAlt = new StringArray(SharedConst.MaxCreatureNames);
|
||||
}
|
||||
@@ -753,13 +785,12 @@ namespace Game.Network.Packets
|
||||
public int QuestObjectiveID;
|
||||
public int QuestObjectID;
|
||||
public int MapID;
|
||||
public int WorldMapAreaID;
|
||||
public int Floor;
|
||||
public int UiMapID;
|
||||
public int Priority;
|
||||
public int Flags;
|
||||
public int WorldEffectID;
|
||||
public int PlayerConditionID;
|
||||
public int UnkWoD1;
|
||||
public int SpawnTrackingID;
|
||||
public List<QuestPOIBlobPoint> QuestPOIBlobPointStats = new List<QuestPOIBlobPoint>();
|
||||
public bool AlwaysAllowMergingBlobs;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(Info.QuestID);
|
||||
_worldPacket.WriteInt32(Info.QuestType);
|
||||
_worldPacket.WriteInt32(Info.QuestLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestScalingFactionGroup);
|
||||
_worldPacket.WriteInt32(Info.QuestMaxScalingLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestPackageID);
|
||||
_worldPacket.WriteInt32(Info.QuestMinLevel);
|
||||
@@ -143,6 +144,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(Info.StartItem);
|
||||
_worldPacket.WriteUInt32(Info.Flags);
|
||||
_worldPacket.WriteUInt32(Info.FlagsEx);
|
||||
_worldPacket.WriteUInt32(Info.FlagsEx2);
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardItemCount; ++i)
|
||||
{
|
||||
@@ -170,6 +172,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(Info.RewardNumSkillUps);
|
||||
|
||||
_worldPacket.WriteInt32(Info.PortraitGiver);
|
||||
_worldPacket.WriteInt32(Info.PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(Info.PortraitTurnIn);
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardReputationsCount; ++i)
|
||||
@@ -196,7 +199,7 @@ namespace Game.Network.Packets
|
||||
|
||||
_worldPacket.WriteUInt32(Info.Objectives.Count);
|
||||
_worldPacket.WriteInt64(Info.AllowableRaces);
|
||||
_worldPacket.WriteInt32(Info.QuestRewardID);
|
||||
_worldPacket.WriteInt32(Info.TreasurePickerID);
|
||||
_worldPacket.WriteInt32(Info.Expansion);
|
||||
|
||||
_worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9);
|
||||
@@ -309,6 +312,7 @@ namespace Game.Network.Packets
|
||||
QuestData.Write(_worldPacket);
|
||||
_worldPacket.WriteInt32(QuestPackageID);
|
||||
_worldPacket.WriteInt32(PortraitGiver);
|
||||
_worldPacket.WriteInt32(PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(PortraitTurnIn);
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
@@ -328,6 +332,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public uint PortraitTurnIn;
|
||||
public uint PortraitGiver;
|
||||
public uint PortraitGiverMount;
|
||||
public string QuestTitle = "";
|
||||
public string RewardText = "";
|
||||
public string PortraitGiverText = "";
|
||||
@@ -413,6 +418,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(QuestID);
|
||||
_worldPacket.WriteInt32(QuestPackageID);
|
||||
_worldPacket.WriteInt32(PortraitGiver);
|
||||
_worldPacket.WriteUInt32(PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(PortraitTurnIn);
|
||||
_worldPacket.WriteUInt32(QuestFlags[0]); // Flags
|
||||
_worldPacket.WriteUInt32(QuestFlags[1]); // FlagsEx
|
||||
@@ -474,6 +480,7 @@ namespace Game.Network.Packets
|
||||
public List<uint> LearnSpells = new List<uint>();
|
||||
public uint PortraitTurnIn;
|
||||
public uint PortraitGiver;
|
||||
public uint PortraitGiverMount;
|
||||
public int QuestStartItemID;
|
||||
public string PortraitGiverText = "";
|
||||
public string PortraitGiverName = "";
|
||||
@@ -833,6 +840,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBits(Question.GetByteCount(), 8);
|
||||
_worldPacket.WriteBit(CloseChoiceFrame);
|
||||
_worldPacket.WriteBit(HideWarboardHeader);
|
||||
_worldPacket.WriteBit(KeepOpenAfterChoice);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (PlayerChoiceResponse response in Responses)
|
||||
@@ -848,6 +856,7 @@ namespace Game.Network.Packets
|
||||
public List<PlayerChoiceResponse> Responses = new List<PlayerChoiceResponse>();
|
||||
public bool CloseChoiceFrame;
|
||||
public bool HideWarboardHeader;
|
||||
public bool KeepOpenAfterChoice;
|
||||
}
|
||||
|
||||
class ChoiceResponse : ClientPacket
|
||||
@@ -903,6 +912,7 @@ namespace Game.Network.Packets
|
||||
public uint QuestID;
|
||||
public int QuestType; // Accepted values: 0, 1 or 2. 0 == IsAutoComplete() (skip objectives/details)
|
||||
public int QuestLevel; // may be -1, static data, in other cases must be used dynamic level: Player.GetQuestLevel (0 is not known, but assuming this is no longer valid for quest intended for client)
|
||||
public int QuestScalingFactionGroup;
|
||||
public int QuestMaxScalingLevel = 255;
|
||||
public uint QuestPackageID;
|
||||
public int QuestMinLevel;
|
||||
@@ -926,6 +936,7 @@ namespace Game.Network.Packets
|
||||
public uint StartItem;
|
||||
public uint Flags;
|
||||
public uint FlagsEx;
|
||||
public uint FlagsEx2;
|
||||
public uint POIContinent;
|
||||
public float POIx;
|
||||
public float POIy;
|
||||
@@ -940,6 +951,7 @@ namespace Game.Network.Packets
|
||||
public uint RewardSkillLineID; // reward skill id
|
||||
public uint RewardNumSkillUps; // reward skill points
|
||||
public uint PortraitGiver; // quest giver entry ?
|
||||
public uint PortraitGiverMount;
|
||||
public uint PortraitTurnIn; // quest turn in entry ?
|
||||
public string PortraitGiverText;
|
||||
public string PortraitGiverName;
|
||||
@@ -951,7 +963,7 @@ namespace Game.Network.Packets
|
||||
public uint CompleteSoundKitID;
|
||||
public uint AreaGroupID;
|
||||
public uint TimeAllowed;
|
||||
public int QuestRewardID;
|
||||
public int TreasurePickerID;
|
||||
public int Expansion;
|
||||
public List<QuestObjective> Objectives = new List<QuestObjective>();
|
||||
public uint[] RewardItems = new uint[SharedConst.QuestRewardItemCount];
|
||||
@@ -969,7 +981,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public struct QuestChoiceItem
|
||||
{
|
||||
public uint ItemID;
|
||||
public ItemInstance Item;
|
||||
public uint Quantity;
|
||||
}
|
||||
|
||||
@@ -978,13 +990,6 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ChoiceItemCount);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||
{
|
||||
data.WriteUInt32(ChoiceItems[i].ItemID);
|
||||
data.WriteUInt32(ChoiceItems[i].Quantity);
|
||||
}
|
||||
|
||||
data.WriteUInt32(ItemCount);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardItemCount; ++i)
|
||||
@@ -1022,7 +1027,13 @@ namespace Game.Network.Packets
|
||||
|
||||
data.WriteUInt32(SkillLineID);
|
||||
data.WriteUInt32(NumSkillUps);
|
||||
data.WriteInt32(RewardID);
|
||||
data.WriteInt32(TreasurePickerID);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||
{
|
||||
ChoiceItems[i].Item.Write(data);
|
||||
data.WriteUInt32(ChoiceItems[i].Quantity);
|
||||
}
|
||||
|
||||
data.WriteBit(IsBoostSpell);
|
||||
data.FlushBits();
|
||||
@@ -1041,7 +1052,7 @@ namespace Game.Network.Packets
|
||||
public uint SpellCompletionID;
|
||||
public uint SkillLineID;
|
||||
public uint NumSkillUps;
|
||||
public uint RewardID;
|
||||
public uint TreasurePickerID;
|
||||
public QuestChoiceItem[] ChoiceItems = new QuestChoiceItem[SharedConst.QuestRewardChoicesCount];
|
||||
public uint[] ItemID = new uint[SharedConst.QuestRewardItemCount];
|
||||
public uint[] ItemQty = new uint[SharedConst.QuestRewardItemCount];
|
||||
@@ -1177,7 +1188,7 @@ namespace Game.Network.Packets
|
||||
public int Value;
|
||||
}
|
||||
|
||||
struct PlayerChoiceResponseRewardEntry
|
||||
public sealed class PlayerChoiceResponseRewardEntry
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -1241,6 +1252,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteInt32(ResponseID);
|
||||
data.WriteInt32(ChoiceArtFileID);
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteUInt32(WidgetSetID);
|
||||
data.WriteUInt8(GroupID);
|
||||
|
||||
data.WriteBits(Answer.GetByteCount(), 9);
|
||||
data.WriteBits(Header.GetByteCount(), 9);
|
||||
@@ -1261,6 +1275,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public int ResponseID;
|
||||
public int ChoiceArtFileID;
|
||||
public int Flags;
|
||||
public uint WidgetSetID;
|
||||
public byte GroupID;
|
||||
public string Answer;
|
||||
public string Header;
|
||||
public string Description;
|
||||
|
||||
@@ -61,8 +61,6 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(Reactions.Count);
|
||||
foreach (ForcedReaction reaction in Reactions)
|
||||
reaction.Write(_worldPacket);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public List<ForcedReaction> Reactions = new List<ForcedReaction>();
|
||||
|
||||
@@ -142,8 +142,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteInt32(scenarioPOI.BlobIndex);
|
||||
_worldPacket.WriteInt32(scenarioPOI.MapID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.WorldMapAreaID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.Floor);
|
||||
_worldPacket.WriteInt32(scenarioPOI.UiMapID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.Priority);
|
||||
_worldPacket.WriteInt32(scenarioPOI.Flags);
|
||||
_worldPacket.WriteInt32(scenarioPOI.WorldEffectID);
|
||||
|
||||
@@ -53,9 +53,12 @@ namespace Game.Network.Packets
|
||||
public override void Read()
|
||||
{
|
||||
ChannelSpell = _worldPacket.ReadInt32();
|
||||
Reason = _worldPacket.ReadInt32();
|
||||
}
|
||||
|
||||
int ChannelSpell;
|
||||
int Reason = 0; // 40 = /run SpellStopCasting(), 16 = movement/AURA_INTERRUPT_FLAG_MOVE, 41 = turning/AURA_INTERRUPT_FLAG_TURNING
|
||||
// does not match SpellCastResult enum
|
||||
}
|
||||
|
||||
class CancelGrowthAura : ClientPacket
|
||||
@@ -689,6 +692,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(SpellVisualID);
|
||||
_worldPacket.WriteFloat(TravelSpeed);
|
||||
_worldPacket.WriteFloat(UnkZero);
|
||||
_worldPacket.WriteFloat(Unk801);
|
||||
_worldPacket.WriteBit(SpeedAsTime);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -699,6 +703,7 @@ namespace Game.Network.Packets
|
||||
public bool SpeedAsTime;
|
||||
public float TravelSpeed;
|
||||
public float UnkZero; // Always zero
|
||||
public float Unk801;
|
||||
public Vector3 SourceRotation; // Vector of rotations, Orientation is z
|
||||
public Vector3 TargetLocation; // Exclusive with Target
|
||||
}
|
||||
@@ -711,18 +716,21 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Source);
|
||||
_worldPacket.WritePackedGuid(Target);
|
||||
_worldPacket.WritePackedGuid(Unk801_1);
|
||||
_worldPacket.WriteVector3(TargetPosition);
|
||||
_worldPacket.WriteUInt32(SpellVisualID);
|
||||
_worldPacket.WriteFloat(TravelSpeed);
|
||||
_worldPacket.WriteUInt16(MissReason);
|
||||
_worldPacket.WriteUInt16(ReflectStatus);
|
||||
_worldPacket.WriteFloat(Orientation);
|
||||
_worldPacket.WriteFloat(Unk801_2);
|
||||
_worldPacket.WriteBit(SpeedAsTime);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid Source;
|
||||
public ObjectGuid Target; // Exclusive with TargetPosition
|
||||
public ObjectGuid Unk801_1;
|
||||
public ushort MissReason;
|
||||
public uint SpellVisualID;
|
||||
public bool SpeedAsTime;
|
||||
@@ -730,6 +738,7 @@ namespace Game.Network.Packets
|
||||
public float TravelSpeed;
|
||||
public Vector3 TargetPosition; // Exclusive with Target
|
||||
public float Orientation;
|
||||
public float Unk801_2;
|
||||
}
|
||||
|
||||
class PlaySpellVisualKit : ServerPacket
|
||||
@@ -1118,6 +1127,7 @@ namespace Game.Network.Packets
|
||||
Health = (long)unit.GetHealth();
|
||||
AttackPower = (int)unit.GetTotalAttackPowerValue(unit.GetClass() == Class.Hunter ? WeaponAttackType.RangedAttack : WeaponAttackType.BaseAttack);
|
||||
SpellPower = unit.SpellBaseDamageBonusDone(SpellSchoolMask.Spell);
|
||||
Armor = unit.GetArmor();
|
||||
PowerData.Add(new SpellLogPowerData((int)unit.GetPowerType(), unit.GetPower(unit.GetPowerType()), 0));
|
||||
}
|
||||
|
||||
@@ -1126,6 +1136,7 @@ namespace Game.Network.Packets
|
||||
Health = (long)spell.GetCaster().GetHealth();
|
||||
AttackPower = (int)spell.GetCaster().GetTotalAttackPowerValue(spell.GetCaster().GetClass() == Class.Hunter ? WeaponAttackType.RangedAttack : WeaponAttackType.BaseAttack);
|
||||
SpellPower = spell.GetCaster().SpellBaseDamageBonusDone(SpellSchoolMask.Spell);
|
||||
Armor = spell.GetCaster().GetArmor();
|
||||
PowerType primaryPowerType = spell.GetCaster().GetPowerType();
|
||||
bool primaryPowerAdded = false;
|
||||
foreach (SpellPowerCost cost in spell.GetPowerCost())
|
||||
@@ -1144,6 +1155,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt64(Health);
|
||||
data.WriteInt32(AttackPower);
|
||||
data.WriteInt32(SpellPower);
|
||||
data.WriteUInt32(Armor);
|
||||
data.WriteBits(PowerData.Count, 9);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -1158,10 +1170,11 @@ namespace Game.Network.Packets
|
||||
long Health;
|
||||
int AttackPower;
|
||||
int SpellPower;
|
||||
uint Armor;
|
||||
List<SpellLogPowerData> PowerData = new List<SpellLogPowerData>();
|
||||
}
|
||||
|
||||
class SandboxScalingData
|
||||
class ContentTuningParams
|
||||
{
|
||||
bool GenerateDataPlayerToPlayer(Player attacker, Player target)
|
||||
{
|
||||
@@ -1172,12 +1185,12 @@ namespace Game.Network.Packets
|
||||
{
|
||||
CreatureTemplate creatureTemplate = attacker.GetCreatureTemplate();
|
||||
|
||||
Type = SandboxScalingDataType.CreatureToPlayerDamage;
|
||||
PlayerLevelDelta = (short)target.GetInt32Value(PlayerFields.ScalingLevelDelta);
|
||||
TuningType = ContentTuningType.CreatureToPlayerDamage;
|
||||
PlayerLevelDelta = (short)target.GetInt32Value(ActivePlayerFields.ScalingPlayerLevelDelta);
|
||||
PlayerItemLevel = (ushort)target.GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.GetUInt32Value(UnitFields.ScalingHealthItemLevelCurveId);
|
||||
TargetLevel = (byte)target.getLevel();
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
Class = (byte)creatureTemplate.UnitClass;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)attacker.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
@@ -1188,12 +1201,12 @@ namespace Game.Network.Packets
|
||||
{
|
||||
CreatureTemplate creatureTemplate = target.GetCreatureTemplate();
|
||||
|
||||
Type = SandboxScalingDataType.PlayerToCreatureDamage;
|
||||
PlayerLevelDelta = (short)attacker.GetInt32Value(PlayerFields.ScalingLevelDelta);
|
||||
TuningType = ContentTuningType.PlayerToCreatureDamage;
|
||||
PlayerLevelDelta = (short)attacker.GetInt32Value(ActivePlayerFields.ScalingPlayerLevelDelta);
|
||||
PlayerItemLevel = (ushort)attacker.GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.GetUInt32Value(UnitFields.ScalingHealthItemLevelCurveId);
|
||||
TargetLevel = (byte)target.getLevel();
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
Class = (byte)creatureTemplate.UnitClass;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)target.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
@@ -1205,12 +1218,11 @@ namespace Game.Network.Packets
|
||||
Creature accessor = target.HasScalableLevels() ? target : attacker;
|
||||
CreatureTemplate creatureTemplate = accessor.GetCreatureTemplate();
|
||||
|
||||
Type = SandboxScalingDataType.CreatureToCreatureDamage;
|
||||
TuningType = ContentTuningType.CreatureToCreatureDamage;
|
||||
PlayerLevelDelta = 0;
|
||||
PlayerItemLevel = 0;
|
||||
TargetLevel = (byte)target.getLevel();
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
Class = (byte)creatureTemplate.UnitClass;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)accessor.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
@@ -1254,32 +1266,35 @@ namespace Game.Network.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits(Type, 4);
|
||||
data.WriteInt16(PlayerLevelDelta);
|
||||
data.WriteUInt16(PlayerItemLevel);
|
||||
data.WriteUInt16(ScalingHealthItemLevelCurveID);
|
||||
data.WriteUInt8(TargetLevel);
|
||||
data.WriteUInt8(Expansion);
|
||||
data.WriteUInt8(Class);
|
||||
data.WriteUInt8(TargetMinScalingLevel);
|
||||
data.WriteUInt8(TargetMaxScalingLevel);
|
||||
data.WriteInt8(TargetScalingLevelDelta);
|
||||
data.WriteBits(TuningType, 4);
|
||||
data.WriteBit(ScalesWithItemLevel);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public SandboxScalingDataType Type;
|
||||
public ContentTuningType TuningType;
|
||||
public short PlayerLevelDelta;
|
||||
public ushort PlayerItemLevel;
|
||||
public ushort ScalingHealthItemLevelCurveID;
|
||||
public byte TargetLevel;
|
||||
public byte Expansion;
|
||||
public byte Class;
|
||||
public byte TargetMinScalingLevel;
|
||||
public byte TargetMaxScalingLevel;
|
||||
public sbyte TargetScalingLevelDelta;
|
||||
public bool ScalesWithItemLevel;
|
||||
|
||||
public enum SandboxScalingDataType
|
||||
public enum ContentTuningType
|
||||
{
|
||||
PlayerToPlayer = 1, // NYI
|
||||
CreatureToPlayerDamage = 2,
|
||||
PlayerToCreatureDamage = 3,
|
||||
PlayerToPlayer = 7, // NYI
|
||||
CreatureToPlayerDamage = 1,
|
||||
PlayerToCreatureDamage = 2,
|
||||
CreatureToCreatureDamage = 4
|
||||
}
|
||||
}
|
||||
@@ -1295,16 +1310,17 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(ActiveFlags);
|
||||
data.WriteUInt16(CastLevel);
|
||||
data.WriteUInt8(Applications);
|
||||
data.WriteInt32(ContentTuningID);
|
||||
data.WriteBit(CastUnit.HasValue);
|
||||
data.WriteBit(Duration.HasValue);
|
||||
data.WriteBit(Remaining.HasValue);
|
||||
data.WriteBit(TimeMod.HasValue);
|
||||
data.WriteBits(Points.Length, 6);
|
||||
data.WriteBits(EstimatedPoints.Count, 6);
|
||||
data.WriteBit(SandboxScaling.HasValue);
|
||||
data.WriteBit(ContentTuning.HasValue);
|
||||
|
||||
if (SandboxScaling.HasValue)
|
||||
SandboxScaling.Value.Write(data);
|
||||
if (ContentTuning.HasValue)
|
||||
ContentTuning.Value.Write(data);
|
||||
|
||||
if (CastUnit.HasValue)
|
||||
data.WritePackedGuid(CastUnit.Value);
|
||||
@@ -1332,7 +1348,8 @@ namespace Game.Network.Packets
|
||||
public uint ActiveFlags;
|
||||
public ushort CastLevel = 1;
|
||||
public byte Applications = 1;
|
||||
Optional<SandboxScalingData> SandboxScaling;
|
||||
public int ContentTuningID;
|
||||
Optional<ContentTuningParams> ContentTuning;
|
||||
public Optional<ObjectGuid> CastUnit;
|
||||
public Optional<int> Duration;
|
||||
public Optional<int> Remaining;
|
||||
@@ -1476,7 +1493,7 @@ namespace Game.Network.Packets
|
||||
SpellID = data.ReadUInt32();
|
||||
SpellXSpellVisualID = data.ReadUInt32();
|
||||
MissileTrajectory.Read(data);
|
||||
Charmer = data.ReadPackedGuid();
|
||||
CraftingNPC = data.ReadPackedGuid();
|
||||
SendCastFlags = data.ReadBits<uint>(5);
|
||||
MoveUpdate.HasValue = data.HasBit();
|
||||
var weightCount = data.ReadBits<uint>(2);
|
||||
@@ -1504,7 +1521,7 @@ namespace Game.Network.Packets
|
||||
public MissileTrajectoryRequest MissileTrajectory;
|
||||
public Optional<MovementInfo> MoveUpdate;
|
||||
public List<SpellWeight> Weight = new List<SpellWeight>();
|
||||
public ObjectGuid Charmer;
|
||||
public ObjectGuid CraftingNPC;
|
||||
public uint[] Misc = new uint[2];
|
||||
}
|
||||
|
||||
@@ -1613,6 +1630,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteUInt32(SpellXSpellVisualID);
|
||||
data.WriteUInt32(CastFlags);
|
||||
data.WriteUInt32(CastFlagsEx);
|
||||
data.WriteUInt32(CastTime);
|
||||
|
||||
MissileTrajectory.Write(data);
|
||||
@@ -1622,8 +1640,7 @@ namespace Game.Network.Packets
|
||||
|
||||
Immunities.Write(data);
|
||||
Predict.Write(data);
|
||||
|
||||
data.WriteBits(CastFlagsEx, 23);
|
||||
|
||||
data.WriteBits(HitTargets.Count, 16);
|
||||
data.WriteBits(MissTargets.Count, 16);
|
||||
data.WriteBits(MissStatus.Count, 16);
|
||||
|
||||
@@ -19,6 +19,7 @@ using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Game.Entities;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -48,6 +49,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
_worldPacket.WriteUInt32(ClubsPresenceUpdateTimer);
|
||||
|
||||
_worldPacket.WriteBit(VoiceEnabled);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.HasValue);
|
||||
@@ -61,16 +63,22 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(RecruitAFriendSendingEnabled);
|
||||
_worldPacket.WriteBit(CharUndeleteEnabled);
|
||||
_worldPacket.WriteBit(RestrictedAccount);
|
||||
_worldPacket.WriteBit(CommerceSystemEnabled);
|
||||
_worldPacket.WriteBit(TutorialsEnabled);
|
||||
_worldPacket.WriteBit(NPETutorialsEnabled);
|
||||
_worldPacket.WriteBit(TwitterEnabled);
|
||||
_worldPacket.WriteBit(CommerceSystemEnabled);
|
||||
_worldPacket.WriteBit(Unk67);
|
||||
_worldPacket.WriteBit(WillKickFromWorld);
|
||||
_worldPacket.WriteBit(KioskModeEnabled);
|
||||
_worldPacket.WriteBit(CompetitiveModeEnabled);
|
||||
_worldPacket.WriteBit(RaceClassExpansionLevels.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteBit(TokenBalanceEnabled);
|
||||
_worldPacket.WriteBit(WarModeFeatureEnabled);
|
||||
_worldPacket.WriteBit(ClubsEnabled);
|
||||
_worldPacket.WriteBit(ClubsBattleNetClubTypeAllowed);
|
||||
_worldPacket.WriteBit(ClubsCharacterClubTypeAllowed);
|
||||
_worldPacket.WriteBit(VoiceChatDisabledByParentalControl);
|
||||
_worldPacket.WriteBit(VoiceChatMutedByParentalControl);
|
||||
|
||||
{
|
||||
_worldPacket.WriteBit(QuickJoinConfig.ToastsDisabled);
|
||||
@@ -112,6 +120,10 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt8(level);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBit(VoiceChatManagerSettings.Enabled);
|
||||
_worldPacket.WritePackedGuid(VoiceChatManagerSettings.BnetAccountGuid);
|
||||
_worldPacket.WritePackedGuid(VoiceChatManagerSettings.GuildGuid);
|
||||
|
||||
if (EuropaTicketSystemStatus.HasValue)
|
||||
{
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.Value.TicketsEnabled);
|
||||
@@ -145,6 +157,7 @@ namespace Game.Network.Packets
|
||||
public uint TokenRedeemIndex;
|
||||
public long TokenBalanceAmount;
|
||||
public uint BpayStoreProductDeliveryDelay;
|
||||
public uint ClubsPresenceUpdateTimer;
|
||||
public bool ItemRestorationButtonEnabled;
|
||||
public bool CharUndeleteEnabled; // Implemented
|
||||
public bool BpayStoreDisabledByParentalControls;
|
||||
@@ -152,16 +165,22 @@ namespace Game.Network.Packets
|
||||
public bool CommerceSystemEnabled;
|
||||
public bool Unk67;
|
||||
public bool WillKickFromWorld;
|
||||
|
||||
public bool RestrictedAccount;
|
||||
public bool TutorialsEnabled;
|
||||
public bool NPETutorialsEnabled;
|
||||
public bool KioskModeEnabled;
|
||||
public bool CompetitiveModeEnabled;
|
||||
public bool TokenBalanceEnabled;
|
||||
public bool WarModeFeatureEnabled;
|
||||
public bool ClubsEnabled;
|
||||
public bool ClubsBattleNetClubTypeAllowed;
|
||||
public bool ClubsCharacterClubTypeAllowed;
|
||||
public bool VoiceChatDisabledByParentalControl;
|
||||
public bool VoiceChatMutedByParentalControl;
|
||||
|
||||
public Optional<List<byte>> RaceClassExpansionLevels;
|
||||
public SocialQueueConfig QuickJoinConfig;
|
||||
public VoiceChatProxySettings VoiceChatManagerSettings;
|
||||
|
||||
public struct SavedThrottleObjectState
|
||||
{
|
||||
@@ -214,6 +233,13 @@ namespace Game.Network.Packets
|
||||
public float ThrottleDfMaxItemLevel;
|
||||
public float ThrottleDfBestPriority;
|
||||
}
|
||||
|
||||
public struct VoiceChatProxySettings
|
||||
{
|
||||
public bool Enabled;
|
||||
public ObjectGuid BnetAccountGuid;
|
||||
public ObjectGuid GuildGuid;
|
||||
}
|
||||
}
|
||||
|
||||
public class FeatureSystemStatusGlueScreen : ServerPacket
|
||||
@@ -243,7 +269,12 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(TokenPollTimeSeconds);
|
||||
_worldPacket.WriteInt32(TokenRedeemIndex);
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
_worldPacket.WriteInt32(MaxCharactersPerRealm);
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
_worldPacket.WriteInt32(ActiveCharacterUpgradeBoostType);
|
||||
_worldPacket.WriteInt32(ActiveClassTrialBoostType);
|
||||
_worldPacket.WriteInt32(MinimumExpansionLevel);
|
||||
_worldPacket.WriteInt32(MaximumExpansionLevel);
|
||||
}
|
||||
|
||||
public bool BpayStoreAvailable; // NYI
|
||||
@@ -263,8 +294,13 @@ namespace Game.Network.Packets
|
||||
public bool LiveRegionAccountCopyEnabled; // NYI
|
||||
public int TokenPollTimeSeconds; // NYI
|
||||
public int TokenRedeemIndex; // NYI
|
||||
public long TokenBalanceAmount; // NYI
|
||||
public long TokenBalanceAmount; // NYI
|
||||
public int MaxCharactersPerRealm;
|
||||
public uint BpayStoreProductDeliveryDelay; // NYI
|
||||
public int ActiveCharacterUpgradeBoostType; // NYI
|
||||
public int ActiveClassTrialBoostType; // NYI
|
||||
public int MinimumExpansionLevel;
|
||||
public int MaximumExpansionLevel;
|
||||
}
|
||||
|
||||
public class MOTD : ServerPacket
|
||||
|
||||
@@ -152,12 +152,12 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
int size = _worldPacket.ReadBits<int>(6);
|
||||
uint size = _worldPacket.ReadUInt32();
|
||||
for (int i = 0; i < size; ++i)
|
||||
Talents[i] = _worldPacket.ReadUInt16();
|
||||
Talents[i].Read(_worldPacket);
|
||||
}
|
||||
|
||||
public Array<ushort> Talents = new Array<ushort>(6);
|
||||
public Array<PvPTalent> Talents = new Array<PvPTalent>(4);
|
||||
}
|
||||
|
||||
class LearnPvpTalentsFailed : ServerPacket
|
||||
@@ -170,16 +170,34 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Talents.Count);
|
||||
|
||||
foreach (var id in Talents)
|
||||
_worldPacket.WriteUInt16(id);
|
||||
foreach (var pvpTalent in Talents)
|
||||
pvpTalent.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public uint Reason;
|
||||
public uint SpellID;
|
||||
public List<ushort> Talents = new List<ushort>();
|
||||
public List<PvPTalent> Talents = new List<PvPTalent>();
|
||||
}
|
||||
|
||||
//Structs
|
||||
public struct PvPTalent
|
||||
{
|
||||
public ushort PvPTalentID;
|
||||
public byte Slot;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
PvPTalentID = data.ReadUInt16();
|
||||
Slot = data.ReadUInt8();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt16(PvPTalentID);
|
||||
data.WriteUInt8(Slot);
|
||||
}
|
||||
}
|
||||
|
||||
struct GlyphBinding
|
||||
{
|
||||
public GlyphBinding(uint spellId, ushort glyphId)
|
||||
|
||||
@@ -148,9 +148,17 @@ namespace Game.Network.Packets
|
||||
bool hasGuildInfo = _worldPacket.HasBit();
|
||||
bool hasLFGListSearchResult = _worldPacket.HasBit();
|
||||
bool hasLFGListApplicant = _worldPacket.HasBit();
|
||||
bool hasClubMessage = _worldPacket.HasBit();
|
||||
|
||||
_worldPacket.ResetBitPos();
|
||||
|
||||
if (hasClubMessage)
|
||||
{
|
||||
CommunityMessage.HasValue = true;
|
||||
CommunityMessage.Value.IsPlayerUsingVoice = _worldPacket.HasBit();
|
||||
_worldPacket.ResetBitPos();
|
||||
}
|
||||
|
||||
if (hasMailInfo)
|
||||
{
|
||||
MailInfo.HasValue = true;
|
||||
@@ -201,6 +209,7 @@ namespace Game.Network.Packets
|
||||
public Optional<SupportTicketGuildInfo> GuildInfo;
|
||||
public Optional<SupportTicketLFGListSearchResult> LFGListSearchResult;
|
||||
public Optional<SupportTicketLFGListApplicant> LFGListApplicant;
|
||||
public Optional<SupportTicketCommunityMessage> CommunityMessage;
|
||||
|
||||
public struct SupportTicketChatLine
|
||||
{
|
||||
@@ -352,6 +361,11 @@ namespace Game.Network.Packets
|
||||
RideTicket RideTicket;
|
||||
string Comment;
|
||||
}
|
||||
|
||||
public struct SupportTicketCommunityMessage
|
||||
{
|
||||
public bool IsPlayerUsingVoice;
|
||||
}
|
||||
}
|
||||
|
||||
class Complaint : ClientPacket
|
||||
|
||||
Reference in New Issue
Block a user