aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server/Packets
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-06-05 14:08:53 +0200
committerShauren <shauren.trinity@gmail.com>2016-06-05 14:08:53 +0200
commit6b1c85a6762e6343e5b1787db73e0b200c5af70d (patch)
tree63f03ecbbe89b13dd03f48dab10baf9bc6d80f2d /src/server/game/Server/Packets
parent40065aa658bf6eb0e4321983d36f16e8e61ad58e (diff)
Core/PacketIO: Updated spell packets
Diffstat (limited to 'src/server/game/Server/Packets')
-rw-r--r--src/server/game/Server/Packets/MovementPackets.cpp6
-rw-r--r--src/server/game/Server/Packets/SpellPackets.cpp274
-rw-r--r--src/server/game/Server/Packets/SpellPackets.h65
3 files changed, 222 insertions, 123 deletions
diff --git a/src/server/game/Server/Packets/MovementPackets.cpp b/src/server/game/Server/Packets/MovementPackets.cpp
index 209aab0af00..fde1b1bf875 100644
--- a/src/server/game/Server/Packets/MovementPackets.cpp
+++ b/src/server/game/Server/Packets/MovementPackets.cpp
@@ -89,11 +89,11 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo)
data >> movementInfo.pitch;
data >> movementInfo.splineElevation;
- uint32 removeMovementForcesCount = 0;
+ uint32 removeMovementForcesCount;
data >> removeMovementForcesCount;
- uint32 int168;
- data >> int168;
+ uint32 moveIndex;
+ data >> moveIndex;
for (uint32 i = 0; i < removeMovementForcesCount; ++i)
{
diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp
index 59d39183cea..36ce28478f0 100644
--- a/src/server/game/Server/Packets/SpellPackets.cpp
+++ b/src/server/game/Server/Packets/SpellPackets.cpp
@@ -52,7 +52,7 @@ WorldPacket const* WorldPackets::Spells::CategoryCooldown::Write()
WorldPacket const* WorldPackets::Spells::SendKnownSpells::Write()
{
- _worldPacket.reserve(1 + 4 * KnownSpells.size());
+ _worldPacket.reserve(1 + 4 * KnownSpells.size() + 4 * FavoriteSpells.size());
_worldPacket.WriteBit(InitialLogin);
_worldPacket << uint32(KnownSpells.size());
@@ -102,64 +102,95 @@ void WorldPackets::Spells::SpellCastLogData::Initialize(Unit const* unit)
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData)
{
- data << spellCastLogData.Health;
- data << spellCastLogData.AttackPower;
- data << spellCastLogData.SpellPower;
- data << int32(spellCastLogData.PowerData.size());
+ data << int64(spellCastLogData.Health);
+ data << int32(spellCastLogData.AttackPower);
+ data << int32(spellCastLogData.SpellPower);
+ data.WriteBits(spellCastLogData.PowerData.size(), 9);
+ data.FlushBits();
+
for (WorldPackets::Spells::SpellLogPowerData const& powerData : spellCastLogData.PowerData)
{
- data << powerData.PowerType;
- data << powerData.Amount;
+ data << int32(powerData.PowerType);
+ data << int32(powerData.Amount);
}
- data.WriteBit(false);
- // data << float // Unk data if bit is true
+
+ return data;
+}
+
+ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& unknown)
+{
+ data.WriteBits(unknown.Type, 3);
+ data << int16(unknown.PlayerLevelDelta);
+ data << uint8(unknown.TargetLevel);
+ data << uint8(unknown.Expansion);
+ data << uint8(unknown.Class);
+ data << uint8(unknown.TargetMinScalingLevel);
+ data << uint8(unknown.TargetMaxScalingLevel);
+ data << int8(unknown.TargetScalingLevelDelta);
+ return data;
+}
+
+ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::AuraDataInfo const& auraData)
+{
+ data << auraData.CastID;
+ data << int32(auraData.SpellID);
+ data << int32(auraData.SpellXSpellVisualID);
+ data << uint8(auraData.Flags);
+ data << uint32(auraData.ActiveFlags);
+ data << uint16(auraData.CastLevel);
+ data << uint8(auraData.Applications);
+ data.WriteBit(auraData.CastUnit.is_initialized());
+ data.WriteBit(auraData.Duration.is_initialized());
+ data.WriteBit(auraData.Remaining.is_initialized());
+ data.WriteBit(auraData.TimeMod.is_initialized());
+ data.WriteBits(auraData.Points.size(), 6);
+ data.WriteBits(auraData.EstimatedPoints.size(), 6);
+ data.WriteBit(auraData.SandboxScaling.is_initialized());
+
+ if (auraData.CastUnit)
+ data << *auraData.CastUnit;
+
+ if (auraData.Duration)
+ data << uint32(*auraData.Duration);
+
+ if (auraData.Remaining)
+ data << uint32(*auraData.Remaining);
+
+ if (auraData.TimeMod)
+ data << float(*auraData.TimeMod);
+
+ if (!auraData.Points.empty())
+ data.append(auraData.Points.data(), auraData.Points.size());
+
+ if (!auraData.EstimatedPoints.empty())
+ data.append(auraData.EstimatedPoints.data(), auraData.EstimatedPoints.size());
+
+ if (auraData.SandboxScaling)
+ data << *auraData.SandboxScaling;
+
+ return data;
+}
+
+ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::AuraInfo const& aura)
+{
+ data << aura.Slot;
+ data.WriteBit(aura.AuraData.is_initialized());
data.FlushBits();
+ if (aura.AuraData)
+ data << *aura.AuraData;
+
return data;
}
WorldPacket const* WorldPackets::Spells::AuraUpdate::Write()
{
_worldPacket.WriteBit(UpdateAll);
+ _worldPacket.WriteBits(Auras.size(), 9);
+ for (AuraInfo const& aura : Auras)
+ _worldPacket << aura;
+
_worldPacket << UnitGUID;
- _worldPacket << uint32(Auras.size());
- for (auto& aura : Auras)
- {
- _worldPacket << aura.Slot;
- if (_worldPacket.WriteBit(aura.AuraData.is_initialized()))
- {
- AuraDataInfo const& data = *aura.AuraData;
- _worldPacket << uint32(data.SpellID);
- _worldPacket << uint32(data.SpellXSpellVisualID);
- _worldPacket << uint8(data.Flags);
- _worldPacket << uint32(data.ActiveFlags);
- _worldPacket << uint16(data.CastLevel);
- _worldPacket << uint8(data.Applications);
- _worldPacket << uint32(data.Points.size());
- _worldPacket << uint32(data.EstimatedPoints.size());
-
- if (!data.Points.empty())
- _worldPacket.append(data.Points.data(), data.Points.size());
-
- if (!data.EstimatedPoints.empty())
- _worldPacket.append(data.EstimatedPoints.data(), data.EstimatedPoints.size());
-
- _worldPacket.WriteBit(data.CastUnit.is_initialized());
- _worldPacket.WriteBit(data.Duration.is_initialized());
- _worldPacket.WriteBit(data.Remaining.is_initialized());
-
- if (data.CastUnit)
- _worldPacket << *data.CastUnit;
-
- if (data.Duration)
- _worldPacket << uint32(*data.Duration);
-
- if (data.Remaining)
- _worldPacket << uint32(*data.Remaining);
- }
-
- _worldPacket.FlushBits();
- }
return &_worldPacket;
}
@@ -178,10 +209,11 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellTargetData
{
buffer.ResetBitPos();
- targetData.Flags = buffer.ReadBits(23);
- bool const hasSrcLocation = buffer.ReadBit();
- bool const hasDstLocation = buffer.ReadBit();
- bool const hasOrientation = buffer.ReadBit();
+ targetData.Flags = buffer.ReadBits(25);
+ bool hasSrcLocation = buffer.ReadBit();
+ bool hasDstLocation = buffer.ReadBit();
+ bool hasOrientation = buffer.ReadBit();
+ bool hasMapID = buffer.ReadBit();
uint32 nameLength = buffer.ReadBits(7);
buffer >> targetData.Unit;
@@ -196,6 +228,9 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellTargetData
if (hasOrientation)
targetData.Orientation = buffer.read<float>();
+ if (hasMapID)
+ targetData.MapID = buffer.read<int32>();
+
targetData.Name = buffer.ReadString(nameLength);
return buffer;
@@ -215,20 +250,17 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellCastReques
buffer >> request.Misc[1];
buffer >> request.SpellID;
buffer >> request.SpellXSpellVisualID;
- buffer >> request.Target;
buffer >> request.MissileTrajectory;
buffer >> request.Charmer;
-
- buffer.ResetBitPos();
request.SendCastFlags = buffer.ReadBits(5);
- bool const hasMoveUpdate = buffer.ReadBit();
+ bool hasMoveUpdate = buffer.ReadBit();
request.Weight.resize(buffer.ReadBits(2));
+ buffer >> request.Target;
if (hasMoveUpdate)
{
- MovementInfo movementInfo;
- buffer >> movementInfo;
- request.MoveUpdate = movementInfo;
+ request.MoveUpdate = boost::in_place();
+ buffer >> *request.MoveUpdate;
}
for (WorldPackets::Spells::SpellWeight& weight : request.Weight)
@@ -261,6 +293,14 @@ void WorldPackets::Spells::UseItem::Read()
_worldPacket >> Cast;
}
+WorldPacket const* WorldPackets::Spells::SpellPrepare::Write()
+{
+ _worldPacket << ClientCastID;
+ _worldPacket << ServerCastID;
+
+ return &_worldPacket;
+}
+
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::TargetLocation const& targetLocation)
{
data << targetLocation.Transport;
@@ -272,10 +312,11 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::TargetLocation co
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData const& spellTargetData)
{
- data.WriteBits(spellTargetData.Flags, 23);
+ data.WriteBits(spellTargetData.Flags, 25);
data.WriteBit(spellTargetData.SrcLocation.is_initialized());
data.WriteBit(spellTargetData.DstLocation.is_initialized());
data.WriteBit(spellTargetData.Orientation.is_initialized());
+ data.WriteBit(spellTargetData.MapID.is_initialized());
data.WriteBits(spellTargetData.Name.size(), 7);
data.FlushBits();
@@ -291,6 +332,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData c
if (spellTargetData.Orientation)
data << *spellTargetData.Orientation;
+ if (spellTargetData.MapID)
+ data << *spellTargetData.MapID;
+
data.WriteString(spellTargetData.Name);
return data;
@@ -299,8 +343,10 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData c
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellMissStatus const& spellMissStatus)
{
data.WriteBits(spellMissStatus.Reason, 4);
- data.WriteBits(spellMissStatus.ReflectStatus, 4);
- // No need to flush bits as we written exactly 8 bits (1 byte)
+ if (spellMissStatus.Reason == SPELL_MISS_REFLECT)
+ data.WriteBits(spellMissStatus.ReflectStatus, 4);
+
+ data.FlushBits();
return data;
}
@@ -315,12 +361,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::RuneData const& r
{
data << uint8(runeData.Start);
data << uint8(runeData.Count);
-
- data.WriteBits(runeData.Cooldowns.size(), 3);
- data.FlushBits();
-
- for (uint8 cd : runeData.Cooldowns)
- data << cd;
+ data << uint32(runeData.Cooldowns.size());
+ if (!runeData.Cooldowns.empty())
+ data.append(runeData.Cooldowns.data(), runeData.Cooldowns.size());
return data;
}
@@ -359,21 +402,29 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastData con
data << spellCastData.CasterGUID;
data << spellCastData.CasterUnit;
data << spellCastData.CastID;
+ data << spellCastData.OriginalCastID;
data << int32(spellCastData.SpellID);
data << uint32(spellCastData.SpellXSpellVisualID);
data << uint32(spellCastData.CastFlags);
data << uint32(spellCastData.CastTime);
- data << uint32(spellCastData.HitTargets.size());
- data << uint32(spellCastData.MissTargets.size());
- data << uint32(spellCastData.MissStatus.size());
- data << spellCastData.Target;
- data << uint32(spellCastData.RemainingPower.size());
data << spellCastData.MissileTrajectory;
- data << spellCastData.Ammo;
+ data << int32(spellCastData.Ammo.DisplayID);
data << uint8(spellCastData.DestLocSpellCastIndex);
- data << uint32(spellCastData.TargetPoints.size());
data << spellCastData.Immunities;
data << spellCastData.Predict;
+ data.WriteBits(spellCastData.CastFlagsEx, 22);
+ data.WriteBits(spellCastData.HitTargets.size(), 16);
+ data.WriteBits(spellCastData.MissTargets.size(), 16);
+ data.WriteBits(spellCastData.MissStatus.size(), 16);
+ data.WriteBits(spellCastData.RemainingPower.size(), 9);
+ data.WriteBit(spellCastData.RemainingRunes.is_initialized());
+ data.WriteBits(spellCastData.TargetPoints.size(), 16);
+ data.FlushBits();
+
+ for (WorldPackets::Spells::SpellMissStatus const& status : spellCastData.MissStatus)
+ data << status;
+
+ data << spellCastData.Target;
for (ObjectGuid const& target : spellCastData.HitTargets)
data << target;
@@ -381,22 +432,15 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastData con
for (ObjectGuid const& target : spellCastData.MissTargets)
data << target;
- for (WorldPackets::Spells::SpellMissStatus const& status : spellCastData.MissStatus)
- data << status;
-
for (WorldPackets::Spells::SpellPowerData const& power : spellCastData.RemainingPower)
data << power;
- for (WorldPackets::Spells::TargetLocation const& targetLoc : spellCastData.TargetPoints)
- data << targetLoc;
-
- data.WriteBits(spellCastData.CastFlagsEx, 20);
- data.WriteBit(spellCastData.RemainingRunes.is_initialized());
- data.FlushBits();
-
if (spellCastData.RemainingRunes)
data << *spellCastData.RemainingRunes;
+ for (WorldPackets::Spells::TargetLocation const& targetLoc : spellCastData.TargetPoints)
+ data << targetLoc;
+
return data;
}
@@ -423,9 +467,13 @@ WorldPacket const* WorldPackets::Spells::SpellGo::Write()
WorldPacket const* WorldPackets::Spells::LearnedSpells::Write()
{
_worldPacket << uint32(SpellID.size());
+ _worldPacket << uint32(FavoriteSpellID.size());
for (int32 spell : SpellID)
_worldPacket << spell;
+ for (int32 spell : FavoriteSpellID)
+ _worldPacket << spell;
+
_worldPacket.WriteBit(SuppressMessaging);
_worldPacket.FlushBits();
@@ -448,6 +496,7 @@ WorldPacket const* WorldPackets::Spells::SpellFailedOther::Write()
_worldPacket << CasterUnit;
_worldPacket << CastID;
_worldPacket << uint32(SpellID);
+ _worldPacket << uint32(SpelXSpellVisualID);
_worldPacket << uint8(Reason);
return &_worldPacket;
@@ -465,6 +514,17 @@ WorldPacket const* WorldPackets::Spells::CastFailed::Write()
return &_worldPacket;
}
+WorldPacket const* WorldPackets::Spells::PetCastFailed::Write()
+{
+ _worldPacket << CastID;
+ _worldPacket << int32(SpellID);
+ _worldPacket << int32(Reason);
+ _worldPacket << int32(FailedArg1);
+ _worldPacket << int32(FailedArg2);
+
+ return &_worldPacket;
+}
+
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellModifierData const& spellModifierData)
{
data << float(spellModifierData.ModifierValue);
@@ -670,8 +730,8 @@ WorldPacket const* WorldPackets::Spells::PlaySpellVisualKit::Write()
void WorldPackets::Spells::CancelCast::Read()
{
- _worldPacket >> SpellID;
_worldPacket >> CastID;
+ _worldPacket >> SpellID;
}
void WorldPackets::Spells::OpenItem::Read()
@@ -722,15 +782,12 @@ WorldPacket const* WorldPackets::Spells::SpellChannelUpdate::Write()
WorldPacket const* WorldPackets::Spells::ResurrectRequest::Write()
{
_worldPacket << ResurrectOffererGUID;
- _worldPacket << ResurrectOffererVirtualRealmAddress;
-
- _worldPacket << PetNumber;
- _worldPacket << SpellID;
-
+ _worldPacket << uint32(ResurrectOffererVirtualRealmAddress);
+ _worldPacket << uint32(PetNumber);
+ _worldPacket << int32(SpellID);
_worldPacket.WriteBits(Name.length(), 6);
_worldPacket.WriteBit(UseTimer);
_worldPacket.WriteBit(Sickness);
-
_worldPacket.FlushBits();
_worldPacket.WriteString(Name);
@@ -752,21 +809,21 @@ void WorldPackets::Spells::GetMirrorImageData::Read()
WorldPacket const* WorldPackets::Spells::MirrorImageComponentedData::Write()
{
_worldPacket << UnitGUID;
- _worldPacket << DisplayID;
- _worldPacket << RaceID;
- _worldPacket << Gender;
- _worldPacket << ClassID;
- _worldPacket << SkinColor;
- _worldPacket << FaceVariation;
- _worldPacket << HairVariation;
- _worldPacket << HairColor;
- _worldPacket << BeardVariation;
+ _worldPacket << int32(DisplayID);
+ _worldPacket << uint8(RaceID);
+ _worldPacket << uint8(Gender);
+ _worldPacket << uint8(ClassID);
+ _worldPacket << uint8(SkinColor);
+ _worldPacket << uint8(FaceVariation);
+ _worldPacket << uint8(HairVariation);
+ _worldPacket << uint8(HairColor);
+ _worldPacket << uint8(BeardVariation);
+ _worldPacket.append(CustomDisplay.data(), CustomDisplay.size());
_worldPacket << GuildGUID;
-
_worldPacket << uint32(ItemDisplayID.size());
- for (auto const& itemDisplayId : ItemDisplayID)
- _worldPacket << itemDisplayId;
+ for (int32 itemDisplayId : ItemDisplayID)
+ _worldPacket << int32(itemDisplayId);
return &_worldPacket;
}
@@ -774,7 +831,7 @@ WorldPacket const* WorldPackets::Spells::MirrorImageComponentedData::Write()
WorldPacket const* WorldPackets::Spells::MirrorImageCreatureData::Write()
{
_worldPacket << UnitGUID;
- _worldPacket << DisplayID;
+ _worldPacket << int32(DisplayID);
return &_worldPacket;
}
@@ -787,9 +844,7 @@ void WorldPackets::Spells::SpellClick::Read()
WorldPacket const* WorldPackets::Spells::ResyncRunes::Write()
{
- _worldPacket << uint32(Runes.size());
- if (!Runes.empty())
- _worldPacket.append(Runes.data(), Runes.size());
+ _worldPacket << Runes;
return &_worldPacket;
}
@@ -825,9 +880,8 @@ void WorldPackets::Spells::UpdateMissileTrajectory::Read()
_worldPacket.ResetBitPos();
if (hasStatus)
{
- MovementInfo info;
- _worldPacket >> info;
- Status = info;
+ Status = boost::in_place();
+ _worldPacket >> *Status;
}
}
diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h
index 8e9835f4009..901ebdd6b87 100644
--- a/src/server/game/Server/Packets/SpellPackets.h
+++ b/src/server/game/Server/Packets/SpellPackets.h
@@ -174,7 +174,7 @@ namespace WorldPackets
struct SpellCastLogData
{
- int32 Health = 0;
+ int64 Health = 0;
int32 AttackPower = 0;
int32 SpellPower = 0;
std::vector<SpellLogPowerData> PowerData;
@@ -182,10 +182,23 @@ namespace WorldPackets
void Initialize(Unit const* unit);
};
+ struct SandboxScalingData
+ {
+ uint32 Type = 0;
+ int16 PlayerLevelDelta = 0;
+ uint8 TargetLevel = 0;
+ uint8 Expansion = 0;
+ uint8 Class = 1;
+ uint8 TargetMinScalingLevel = 1;
+ uint8 TargetMaxScalingLevel = 1;
+ int8 TargetScalingLevelDelta = 1;
+ };
+
struct AuraDataInfo
{
+ ObjectGuid CastID;
int32 SpellID = 0;
- uint32 SpellXSpellVisualID = 0;
+ int32 SpellXSpellVisualID = 0;
uint8 Flags = 0;
uint32 ActiveFlags = 0;
uint16 CastLevel = 1;
@@ -193,8 +206,10 @@ namespace WorldPackets
Optional<ObjectGuid> CastUnit;
Optional<int32> Duration;
Optional<int32> Remaining;
+ Optional<float> TimeMod;
std::vector<float> Points;
std::vector<float> EstimatedPoints;
+ Optional<SandboxScalingData> SandboxScaling;
};
struct AuraInfo
@@ -229,6 +244,7 @@ namespace WorldPackets
Optional<TargetLocation> SrcLocation;
Optional<TargetLocation> DstLocation;
Optional<float> Orientation;
+ Optional<int32> MapID;
std::string Name;
};
@@ -293,6 +309,17 @@ namespace WorldPackets
SpellCastRequest Cast;
};
+ class SpellPrepare final : public ServerPacket
+ {
+ public:
+ SpellPrepare() : ServerPacket(SMSG_SPELL_PREPARE, 16 + 16) { }
+
+ WorldPacket const* Write() override;
+
+ ObjectGuid ClientCastID;
+ ObjectGuid ServerCastID;
+ };
+
struct SpellMissStatus
{
uint8 Reason = 0;
@@ -342,6 +369,7 @@ namespace WorldPackets
ObjectGuid CasterGUID;
ObjectGuid CasterUnit;
ObjectGuid CastID;
+ ObjectGuid OriginalCastID;
int32 SpellID = 0;
uint32 SpellXSpellVisualID = 0;
uint32 CastFlags = 0;
@@ -390,6 +418,7 @@ namespace WorldPackets
WorldPacket const* Write() override;
std::vector<int32> SpellID;
+ std::vector<int32> FavoriteSpellID;
bool SuppressMessaging = false;
};
@@ -416,6 +445,7 @@ namespace WorldPackets
ObjectGuid CasterUnit;
uint32 SpellID = 0;
+ uint32 SpelXSpellVisualID = 0;
uint8 Reason = 0;
ObjectGuid CastID;
};
@@ -423,16 +453,30 @@ namespace WorldPackets
class TC_GAME_API CastFailed final : public ServerPacket
{
public:
- CastFailed(OpcodeServer opcode) : ServerPacket(opcode, 4+4+4+4+1) { }
+ CastFailed() : ServerPacket(SMSG_CAST_FAILED, 4 + 4 + 4 + 4 + 1) { }
WorldPacket const* Write() override;
ObjectGuid CastID;
- int32 Reason = 0;
+ int32 SpellID = 0;
int32 SpellXSpellVisualID = 0;
+ int32 Reason = 0;
int32 FailedArg1 = -1;
int32 FailedArg2 = -1;
- int32 SpellID = 0;
+ };
+
+ class TC_GAME_API PetCastFailed final : public ServerPacket
+ {
+ public:
+ PetCastFailed() : ServerPacket(SMSG_PET_CAST_FAILED, 4 + 4 + 4 + 1) { }
+
+ WorldPacket const* Write() override;
+
+ ObjectGuid CastID;
+ int32 SpellID = 0;
+ int32 Reason = 0;
+ int32 FailedArg1 = -1;
+ int32 FailedArg2 = -1;
};
struct SpellModifierData
@@ -765,7 +809,7 @@ namespace WorldPackets
WorldPacket const* Write() override;
ObjectGuid UnitGUID;
- uint32 DisplayID = 0;
+ int32 DisplayID = 0;
uint8 RaceID = 0;
uint8 Gender = 0;
uint8 ClassID = 0;
@@ -774,9 +818,10 @@ namespace WorldPackets
uint8 HairVariation = 0;
uint8 HairColor = 0;
uint8 BeardVariation = 0;
+ std::array<uint8, PLAYER_CUSTOM_DISPLAY_SIZE> CustomDisplay;
ObjectGuid GuildGUID;
- std::vector<uint32> ItemDisplayID;
+ std::vector<int32> ItemDisplayID;
};
class MirrorImageCreatureData final : public ServerPacket
@@ -787,7 +832,7 @@ namespace WorldPackets
WorldPacket const* Write() override;
ObjectGuid UnitGUID;
- uint32 DisplayID = 0;
+ int32 DisplayID = 0;
};
class SpellClick final : public ClientPacket
@@ -804,11 +849,11 @@ namespace WorldPackets
class ResyncRunes final : public ServerPacket
{
public:
- ResyncRunes(size_t size) : ServerPacket(SMSG_RESYNC_RUNES, 4 + 2 * size) { }
+ ResyncRunes(size_t size) : ServerPacket(SMSG_RESYNC_RUNES, 1 + 1 + 4 + size) { }
WorldPacket const* Write() override;
- std::vector<uint8> Runes;
+ RuneData Runes;
};
class MissileTrajectoryCollision final : public ClientPacket