aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-07-07 22:56:07 +0200
committerShauren <shauren.trinity@gmail.com>2016-07-07 22:56:07 +0200
commitef344664e3ee1bef048cf197d416e83b95c74e30 (patch)
tree81f45c9a9d90a5506aa2236fac76e59eb7bb187d
parent70137b8f3aae7c875f1fc0b1643d80aece933104 (diff)
Core: Update to 7.0.3.22150
-rw-r--r--src/server/game/Server/Packets/CombatLogPackets.h49
-rw-r--r--src/server/game/Server/Packets/SpellPackets.cpp30
-rw-r--r--src/server/game/Server/Packets/SpellPackets.h104
-rw-r--r--src/server/game/Server/Packets/SystemPackets.cpp1
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h216
-rw-r--r--src/server/game/Spells/Spell.cpp4
-rw-r--r--src/server/game/Spells/Spell.h2
7 files changed, 219 insertions, 187 deletions
diff --git a/src/server/game/Server/Packets/CombatLogPackets.h b/src/server/game/Server/Packets/CombatLogPackets.h
index f4eed7caea5..5652ecba8ab 100644
--- a/src/server/game/Server/Packets/CombatLogPackets.h
+++ b/src/server/game/Server/Packets/CombatLogPackets.h
@@ -26,55 +26,6 @@ namespace WorldPackets
{
namespace CombatLog
{
- class CombatLogServerPacket : public ServerPacket
- {
- public:
- CombatLogServerPacket(OpcodeServer opcode, size_t initialSize = 200, ConnectionType connection = CONNECTION_TYPE_DEFAULT)
- : ServerPacket(opcode, initialSize, connection), _fullLogPacket(opcode, initialSize, connection) { }
-
- WorldPacket const* GetFullLogPacket() const { return &_fullLogPacket; }
- WorldPacket const* GetBasicLogPacket() const { return &_worldPacket; }
-
- Spells::SpellCastLogData LogData;
-
- protected:
- template<typename T>
- void operator<<(T const& val)
- {
- _worldPacket << val;
- _fullLogPacket << val;
- }
-
- void WriteLogDataBit()
- {
- _worldPacket.WriteBit(false);
- _fullLogPacket.WriteBit(true);
- }
-
- void FlushBits()
- {
- _worldPacket.FlushBits();
- _fullLogPacket.FlushBits();
- }
-
- bool WriteBit(bool bit)
- {
- _worldPacket.WriteBit(bit);
- _fullLogPacket.WriteBit(bit);
- return bit;
- }
-
- void WriteBits(uint32 value, uint32 bitCount)
- {
- _worldPacket.WriteBits(value, bitCount);
- _fullLogPacket.WriteBits(value, bitCount);
- }
-
- ByteBuffer& WriteLogData() { return _fullLogPacket << LogData; }
-
- WorldPacket _fullLogPacket;
- };
-
class SpellNonMeleeDamageLog final : public CombatLogServerPacket
{
public:
diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp
index be57dc2ab9d..b2fff8cddfa 100644
--- a/src/server/game/Server/Packets/SpellPackets.cpp
+++ b/src/server/game/Server/Packets/SpellPackets.cpp
@@ -97,7 +97,25 @@ void WorldPackets::Spells::SpellCastLogData::Initialize(Unit const* unit)
Health = unit->GetHealth();
AttackPower = unit->GetTotalAttackPowerValue(unit->getClass() == CLASS_HUNTER ? RANGED_ATTACK : BASE_ATTACK);
SpellPower = unit->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SPELL);
- PowerData.emplace_back(int32(unit->getPowerType()), unit->GetPower(unit->getPowerType()));
+ PowerData.emplace_back(int32(unit->getPowerType()), unit->GetPower(unit->getPowerType()), int32(0));
+}
+
+void WorldPackets::Spells::SpellCastLogData::Initialize(Spell const* spell)
+{
+ Health = spell->GetCaster()->GetHealth();
+ AttackPower = spell->GetCaster()->GetTotalAttackPowerValue(spell->GetCaster()->getClass() == CLASS_HUNTER ? RANGED_ATTACK : BASE_ATTACK);
+ SpellPower = spell->GetCaster()->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SPELL);
+ Powers primaryPowerType = spell->GetCaster()->getPowerType();
+ bool primaryPowerAdded = false;
+ for (SpellInfo::CostData const& cost : spell->GetPowerCost())
+ {
+ PowerData.emplace_back(int32(cost.Power), spell->GetCaster()->GetPower(Powers(cost.Power)), int32(cost.Amount));
+ if (cost.Power == primaryPowerType)
+ primaryPowerAdded = true;
+ }
+
+ if (!primaryPowerAdded)
+ PowerData.insert(PowerData.begin(), SpellLogPowerData(int32(primaryPowerType), spell->GetCaster()->GetPower(primaryPowerType), 0));
}
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData)
@@ -112,6 +130,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData
{
data << int32(powerData.PowerType);
data << int32(powerData.Amount);
+ data << int32(powerData.Cost);
}
return data;
@@ -453,13 +472,12 @@ WorldPacket const* WorldPackets::Spells::SpellStart::Write()
WorldPacket const* WorldPackets::Spells::SpellGo::Write()
{
- _worldPacket << Cast;
+ *this << Cast;
- _worldPacket.WriteBit(LogData.is_initialized());
- _worldPacket.FlushBits();
+ WriteLogDataBit();
+ FlushBits();
- if (LogData)
- _worldPacket << *LogData;
+ WriteLogData();
return &_worldPacket;
}
diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h
index 60299e06c4d..595b5522175 100644
--- a/src/server/game/Server/Packets/SpellPackets.h
+++ b/src/server/game/Server/Packets/SpellPackets.h
@@ -28,6 +28,86 @@ namespace WorldPackets
{
namespace Spells
{
+ struct SpellLogPowerData
+ {
+ SpellLogPowerData(int32 powerType, int32 amount, int32 cost) : PowerType(powerType), Amount(amount), Cost(cost) { }
+
+ int32 PowerType = 0;
+ int32 Amount = 0;
+ int32 Cost = 0;
+ };
+
+ struct SpellCastLogData
+ {
+ int64 Health = 0;
+ int32 AttackPower = 0;
+ int32 SpellPower = 0;
+ std::vector<SpellLogPowerData> PowerData;
+
+ void Initialize(Unit const* unit);
+ void Initialize(Spell const* spell);
+ };
+ }
+}
+
+ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData);
+
+namespace WorldPackets
+{
+ namespace CombatLog
+ {
+ class CombatLogServerPacket : public ServerPacket
+ {
+ public:
+ CombatLogServerPacket(OpcodeServer opcode, size_t initialSize = 200, ConnectionType connection = CONNECTION_TYPE_DEFAULT)
+ : ServerPacket(opcode, initialSize, connection), _fullLogPacket(opcode, initialSize, connection) { }
+
+ WorldPacket const* GetFullLogPacket() const { return &_fullLogPacket; }
+ WorldPacket const* GetBasicLogPacket() const { return &_worldPacket; }
+
+ Spells::SpellCastLogData LogData;
+
+ protected:
+ template<typename T>
+ void operator<<(T const& val)
+ {
+ _worldPacket << val;
+ _fullLogPacket << val;
+ }
+
+ void WriteLogDataBit()
+ {
+ _worldPacket.WriteBit(false);
+ _fullLogPacket.WriteBit(true);
+ }
+
+ void FlushBits()
+ {
+ _worldPacket.FlushBits();
+ _fullLogPacket.FlushBits();
+ }
+
+ bool WriteBit(bool bit)
+ {
+ _worldPacket.WriteBit(bit);
+ _fullLogPacket.WriteBit(bit);
+ return bit;
+ }
+
+ void WriteBits(uint32 value, uint32 bitCount)
+ {
+ _worldPacket.WriteBits(value, bitCount);
+ _fullLogPacket.WriteBits(value, bitCount);
+ }
+
+ ByteBuffer& WriteLogData() { return _fullLogPacket << LogData; }
+
+ WorldPacket _fullLogPacket;
+ };
+ }
+
+ namespace Spells
+ {
class CancelAura final : public ClientPacket
{
public:
@@ -164,24 +244,6 @@ namespace WorldPackets
std::vector<uint32> Spells;
};
- struct SpellLogPowerData
- {
- SpellLogPowerData(int32 powerType, int32 amount) : PowerType(powerType), Amount(amount) { }
-
- int32 PowerType = 0;
- int32 Amount = 0;
- };
-
- struct SpellCastLogData
- {
- int64 Health = 0;
- int32 AttackPower = 0;
- int32 SpellPower = 0;
- std::vector<SpellLogPowerData> PowerData;
-
- void Initialize(Unit const* unit);
- };
-
struct SandboxScalingData
{
uint32 Type = 0;
@@ -389,14 +451,13 @@ namespace WorldPackets
SpellHealPrediction Predict;
};
- class SpellGo final : public ServerPacket
+ class SpellGo final : public CombatLog::CombatLogServerPacket
{
public:
- SpellGo() : ServerPacket(SMSG_SPELL_GO) { }
+ SpellGo() : CombatLog::CombatLogServerPacket(SMSG_SPELL_GO) { }
WorldPacket const* Write() override;
- Optional<SpellCastLogData> LogData;
SpellCastData Cast;
};
@@ -936,7 +997,6 @@ namespace WorldPackets
}
}
-ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData);
ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellCastRequest& request);
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& sandboxScalingData);
diff --git a/src/server/game/Server/Packets/SystemPackets.cpp b/src/server/game/Server/Packets/SystemPackets.cpp
index e39182b280f..00882b27600 100644
--- a/src/server/game/Server/Packets/SystemPackets.cpp
+++ b/src/server/game/Server/Packets/SystemPackets.cpp
@@ -94,6 +94,7 @@ WorldPacket const* WorldPackets::System::FeatureSystemStatusGlueScreen::Write()
_worldPacket.WriteBit(WillKickFromWorld);
_worldPacket.WriteBit(IsExpansionPreorderInStore);
_worldPacket.WriteBit(KioskModeEnabled);
+ _worldPacket.WriteBit(false); // not accessed in handler
_worldPacket.WriteBit(TrialBoostEnabled);
_worldPacket.FlushBits();
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index dbd448e1bba..400f7995f21 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -598,9 +598,9 @@ enum OpcodeClient : uint32
CMSG_RESURRECT_RESPONSE = 0x3689,
CMSG_REVERT_MONUMENT_APPEARANCE = 0x32DE,
CMSG_RIDE_VEHICLE_INTERACT = 0x321E,
- CMSG_SAVE_CLIENT_VARIABLES = 0x3702,
+ CMSG_SAVE_CLIENT_VARIABLES = 0x3704,
CMSG_SAVE_CUF_PROFILES = 0x3189,
- CMSG_SAVE_ENABLED_ADDONS = 0x3701,
+ CMSG_SAVE_ENABLED_ADDONS = 0x3703,
CMSG_SAVE_EQUIPMENT_SET = 0x34FE,
CMSG_SAVE_GUILD_EMBLEM = 0x3280,
CMSG_SCENE_PLAYBACK_CANCELED = 0x3205,
@@ -772,11 +772,11 @@ enum OpcodeServer : uint32
SMSG_AREA_TRIGGER_RE_SHAPE = 0x2639,
SMSG_ARENA_ERROR = 0x270E,
SMSG_ARENA_PREP_OPPONENT_SPECIALIZATIONS = 0x2661,
- SMSG_ARTIFACT_APPEARANCE_CHANGED = 0x27E0,
- SMSG_ARTIFACT_FORGE_OPENED = 0x27DE,
- SMSG_ARTIFACT_POWERS_UPDATED = 0x27DF,
- SMSG_ARTIFACT_XP_GAIN = 0x2820,
- SMSG_ATTACKER_STATE_UPDATE = 0x27CB,
+ SMSG_ARTIFACT_APPEARANCE_CHANGED = 0x27E3,
+ SMSG_ARTIFACT_FORGE_OPENED = 0x27E1,
+ SMSG_ARTIFACT_POWERS_UPDATED = 0x27E2,
+ SMSG_ARTIFACT_XP_GAIN = 0x2823,
+ SMSG_ATTACKER_STATE_UPDATE = 0x27CE,
SMSG_ATTACK_START = 0x2669,
SMSG_ATTACK_STOP = 0x266A,
SMSG_ATTACK_SWING_ERROR = 0x2730,
@@ -813,28 +813,28 @@ enum OpcodeServer : uint32
SMSG_BATTLEGROUND_PLAYER_LEFT = 0x2599,
SMSG_BATTLEGROUND_PLAYER_POSITIONS = 0x2595,
SMSG_BATTLEGROUND_POINTS = 0x279D,
- SMSG_BATTLENET_CHALLENGE_ABORT = 0x27CA,
- SMSG_BATTLENET_CHALLENGE_START = 0x27C9,
- SMSG_BATTLENET_NOTIFICATION = 0x2835,
- SMSG_BATTLENET_REALM_LIST_TICKET = 0x2837,
- SMSG_BATTLENET_RESPONSE = 0x2834,
- SMSG_BATTLENET_SET_SESSION_STATE = 0x2836,
- SMSG_BATTLE_PAY_ACK_FAILED = 0x27C2,
- SMSG_BATTLE_PAY_CONFIRM_PURCHASE = 0x27C1,
+ SMSG_BATTLENET_CHALLENGE_ABORT = 0x27CD,
+ SMSG_BATTLENET_CHALLENGE_START = 0x27CC,
+ SMSG_BATTLENET_NOTIFICATION = 0x2838,
+ SMSG_BATTLENET_REALM_LIST_TICKET = 0x283A,
+ SMSG_BATTLENET_RESPONSE = 0x2837,
+ SMSG_BATTLENET_SET_SESSION_STATE = 0x2839,
+ SMSG_BATTLE_PAY_ACK_FAILED = 0x27C5,
+ SMSG_BATTLE_PAY_CONFIRM_PURCHASE = 0x27C4,
SMSG_BATTLE_PAY_DELIVERY_ENDED = 0x27B8,
SMSG_BATTLE_PAY_DELIVERY_STARTED = 0x27B7,
SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE = 0x27B6,
SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE = 0x27B4,
SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE = 0x27B2,
SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE = 0x27B3,
- SMSG_BATTLE_PAY_PURCHASE_UPDATE = 0x27C0,
- SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE = 0x27BE,
- SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE = 0x27BD,
+ SMSG_BATTLE_PAY_PURCHASE_UPDATE = 0x27C3,
+ SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE = 0x27C1,
+ SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE = 0x27C0,
SMSG_BATTLE_PAY_VAS_BOOST_CONSUMED = 0x27B5,
- SMSG_BATTLE_PAY_VAS_CHARACTER_LIST = 0x2824,
- SMSG_BATTLE_PAY_VAS_PURCHASE_COMPLETE = 0x2827,
- SMSG_BATTLE_PAY_VAS_PURCHASE_LIST = 0x2828,
- SMSG_BATTLE_PAY_VAS_PURCHASE_STARTED = 0x2826,
+ SMSG_BATTLE_PAY_VAS_CHARACTER_LIST = 0x2827,
+ SMSG_BATTLE_PAY_VAS_PURCHASE_COMPLETE = 0x282A,
+ SMSG_BATTLE_PAY_VAS_PURCHASE_LIST = 0x282B,
+ SMSG_BATTLE_PAY_VAS_PURCHASE_STARTED = 0x2829,
SMSG_BATTLE_PETS_HEALED = 0x2606,
SMSG_BATTLE_PET_CAGE_DATE_ERROR = 0x269C,
SMSG_BATTLE_PET_DELETED = 0x2603,
@@ -856,7 +856,7 @@ enum OpcodeServer : uint32
SMSG_BLACK_MARKET_REQUEST_ITEMS_RESULT = 0x2640,
SMSG_BLACK_MARKET_WON = 0x2643,
SMSG_BONUS_ROLL_EMPTY = 0x265E,
- SMSG_BOSS_KILL_CREDIT = 0x27BC,
+ SMSG_BOSS_KILL_CREDIT = 0x27BF,
SMSG_BREAK_TARGET = 0x2668,
SMSG_BUY_FAILED = 0x26EE,
SMSG_BUY_SUCCEEDED = 0x26ED,
@@ -906,18 +906,18 @@ enum OpcodeServer : uint32
SMSG_CHANNEL_NOTIFY = 0x2BC5,
SMSG_CHANNEL_NOTIFY_JOINED = 0x2BC6,
SMSG_CHANNEL_NOTIFY_LEFT = 0x2BC7,
- SMSG_CHARACTER_CLASS_TRIAL_CREATE = 0x27F9,
- SMSG_CHARACTER_ITEM_FIXUP = 0x2841,
+ SMSG_CHARACTER_CLASS_TRIAL_CREATE = 0x27FC,
+ SMSG_CHARACTER_ITEM_FIXUP = 0x2845,
SMSG_CHARACTER_LOGIN_FAILED = 0x2741,
- SMSG_CHARACTER_OBJECT_TEST_RESPONSE = 0x27C8,
+ SMSG_CHARACTER_OBJECT_TEST_RESPONSE = 0x27CB,
SMSG_CHARACTER_RENAME_RESULT = 0x27A4,
- SMSG_CHARACTER_UPGRADE_COMPLETE = 0x27F8,
- SMSG_CHARACTER_UPGRADE_QUEUED = 0x27F7,
+ SMSG_CHARACTER_UPGRADE_COMPLETE = 0x27FB,
+ SMSG_CHARACTER_UPGRADE_QUEUED = 0x27FA,
SMSG_CHARACTER_UPGRADE_SPELL_TIER_SET = 0x25F1,
- SMSG_CHARACTER_UPGRADE_STARTED = 0x27F6,
+ SMSG_CHARACTER_UPGRADE_STARTED = 0x27F9,
SMSG_CHAR_CUSTOMIZE = 0x2716,
SMSG_CHAR_CUSTOMIZE_FAILED = 0x2715,
- SMSG_CHAR_FACTION_CHANGE_RESULT = 0x27E5,
+ SMSG_CHAR_FACTION_CHANGE_RESULT = 0x27E8,
SMSG_CHAT = 0x2BAD,
SMSG_CHAT_AUTO_RESPONDED = 0x2BBD,
SMSG_CHAT_DOWN = 0x2BC2,
@@ -944,11 +944,11 @@ enum OpcodeServer : uint32
SMSG_COMMENTATOR_PLAYER_INFO = 0x2744,
SMSG_COMMENTATOR_STATE_CHANGED = 0x2742,
SMSG_COMPLAINT_RESULT = 0x26D0,
- SMSG_COMPLETE_SHIPMENT_RESPONSE = 0x27DA,
+ SMSG_COMPLETE_SHIPMENT_RESPONSE = 0x27DD,
SMSG_CONNECT_TO = 0x304D,
- SMSG_CONQUEST_FORMULA_CONSTANTS = 0x27C3,
+ SMSG_CONQUEST_FORMULA_CONSTANTS = 0x27C6,
SMSG_CONSOLE_WRITE = 0x264D,
- SMSG_CONTACT_LIST = 0x27C6,
+ SMSG_CONTACT_LIST = 0x27C9,
SMSG_CONTROL_UPDATE = 0x2660,
SMSG_COOLDOWN_CHEAT = 0x2779,
SMSG_COOLDOWN_EVENT = 0x26E0,
@@ -956,13 +956,13 @@ enum OpcodeServer : uint32
SMSG_CORPSE_RECLAIM_DELAY = 0x278C,
SMSG_CORPSE_TRANSPORT_QUERY = 0x274E,
SMSG_CREATE_CHAR = 0x273B,
- SMSG_CREATE_SHIPMENT_RESPONSE = 0x27D9,
+ SMSG_CREATE_SHIPMENT_RESPONSE = 0x27DC,
SMSG_CRITERIA_DELETED = 0x271A,
SMSG_CRITERIA_UPDATE = 0x2714,
SMSG_CROSSED_INEBRIATION_THRESHOLD = 0x26E9,
SMSG_CUSTOM_LOAD_SCREEN = 0x25DF,
SMSG_DAILY_QUESTS_RESET = 0x2A80,
- SMSG_DAMAGE_CALC_LOG = 0x2800,
+ SMSG_DAMAGE_CALC_LOG = 0x2803,
SMSG_DANCE_STUDIO_CREATE_RESULT = 0x27A1,
SMSG_DB_REPLY = 0x25A0,
SMSG_DEATH_RELEASE_LOC = 0x2702,
@@ -989,12 +989,12 @@ enum OpcodeServer : uint32
SMSG_DUEL_REQUESTED = 0x266C,
SMSG_DUEL_WINNER = 0x2671,
SMSG_DURABILITY_DAMAGE_DEATH = 0x2788,
- SMSG_EMOTE = 0x2801,
+ SMSG_EMOTE = 0x2804,
SMSG_ENABLE_BARBER_SHOP = 0x26E4,
SMSG_ENABLE_ENCRYPTION = 0x3049,
SMSG_ENCHANTMENT_LOG = 0x274F,
- SMSG_ENCOUNTER_END = 0x27BB,
- SMSG_ENCOUNTER_START = 0x27BA,
+ SMSG_ENCOUNTER_END = 0x27BE,
+ SMSG_ENCOUNTER_START = 0x27BD,
SMSG_ENUM_CHARACTERS_RESULT = 0x2582,
SMSG_ENVIRONMENTAL_DAMAGE_LOG = 0x2C20,
SMSG_EQUIPMENT_SET_ID = 0x26D9,
@@ -1011,14 +1011,14 @@ enum OpcodeServer : uint32
SMSG_FORCED_DEATH_UPDATE = 0x2703,
SMSG_FORCE_ANIM = 0x2792,
SMSG_FORCE_OBJECT_RELINK = 0x2663,
- SMSG_FRIEND_STATUS = 0x27C7,
+ SMSG_FRIEND_STATUS = 0x27CA,
SMSG_GAME_OBJECT_ACTIVATE_ANIM_KIT = 0x25D2,
SMSG_GAME_OBJECT_CUSTOM_ANIM = 0x25D3,
SMSG_GAME_OBJECT_DESPAWN = 0x25D4,
SMSG_GAME_OBJECT_PLAY_SPELL_VISUAL = 0x2C4A,
SMSG_GAME_OBJECT_PLAY_SPELL_VISUAL_KIT = 0x2C49,
SMSG_GAME_OBJECT_RESET_STATE = 0x275A,
- SMSG_GAME_OBJECT_SET_STATE = 0x2833,
+ SMSG_GAME_OBJECT_SET_STATE = 0x2836,
SMSG_GAME_OBJECT_UI_ACTION = 0x2757,
SMSG_GAME_SPEED_SET = 0x26A6,
SMSG_GAME_TIME_SET = 0x2748,
@@ -1040,7 +1040,7 @@ enum OpcodeServer : uint32
SMSG_GARRISON_FOLLOWER_CHANGED_STATUS = 0x2915,
SMSG_GARRISON_FOLLOWER_CHANGED_XP = 0x2912,
SMSG_GARRISON_IS_UPGRADEABLE_RESULT = 0x2929,
- SMSG_GARRISON_LANDING_PAGE_SHIPMENT_INFO = 0x27DC,
+ SMSG_GARRISON_LANDING_PAGE_SHIPMENT_INFO = 0x27DF,
SMSG_GARRISON_LEARN_BLUEPRINT_RESULT = 0x28F7,
SMSG_GARRISON_LEARN_SPECIALIZATION_RESULT = 0x28F5,
SMSG_GARRISON_LIST_FOLLOWERS_CHEAT_RESULT = 0x2905,
@@ -1071,9 +1071,9 @@ enum OpcodeServer : uint32
SMSG_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A2,
SMSG_GET_DISPLAYED_TROPHY_LIST_RESPONSE = 0x2928,
SMSG_GET_GARRISON_INFO_RESULT = 0x28F0,
- SMSG_GET_SHIPMENTS_OF_TYPE_RESPONSE = 0x27DB,
- SMSG_GET_SHIPMENT_INFO_RESPONSE = 0x27D7,
- SMSG_GET_TROPHY_LIST_RESPONSE = 0x27FC,
+ SMSG_GET_SHIPMENTS_OF_TYPE_RESPONSE = 0x27DE,
+ SMSG_GET_SHIPMENT_INFO_RESPONSE = 0x27DA,
+ SMSG_GET_TROPHY_LIST_RESPONSE = 0x27FF,
SMSG_GM_PLAYER_INFO = 0x2778,
SMSG_GM_REQUEST_PLAYER_INFO = 0x25E9,
SMSG_GM_TICKET_CASE_STATUS = 0x26C9,
@@ -1081,12 +1081,12 @@ enum OpcodeServer : uint32
SMSG_GOD_MODE = 0x2735,
SMSG_GOSSIP_COMPLETE = 0x2A96,
SMSG_GOSSIP_MESSAGE = 0x2A97,
- SMSG_GOSSIP_POI = 0x27D4,
+ SMSG_GOSSIP_POI = 0x27D7,
SMSG_GROUP_ACTION_THROTTLED = 0x259C,
- SMSG_GROUP_DECLINE = 0x27CF,
- SMSG_GROUP_DESTROYED = 0x27D1,
+ SMSG_GROUP_DECLINE = 0x27D2,
+ SMSG_GROUP_DESTROYED = 0x27D4,
SMSG_GROUP_NEW_LEADER = 0x2646,
- SMSG_GROUP_UNINVITE = 0x27D0,
+ SMSG_GROUP_UNINVITE = 0x27D3,
SMSG_GUILD_ACHIEVEMENT_DELETED = 0x29C5,
SMSG_GUILD_ACHIEVEMENT_EARNED = 0x29C4,
SMSG_GUILD_ACHIEVEMENT_MEMBERS = 0x29C7,
@@ -1149,36 +1149,36 @@ enum OpcodeServer : uint32
SMSG_INSPECT_HONOR_STATS = 0x25B0,
SMSG_INSPECT_PVP = 0x275E,
SMSG_INSPECT_RESULT = 0x264A,
- SMSG_INSTANCE_ENCOUNTER_CHANGE_PRIORITY = 0x27EB,
- SMSG_INSTANCE_ENCOUNTER_DISENGAGE_UNIT = 0x27EA,
- SMSG_INSTANCE_ENCOUNTER_END = 0x27F1,
- SMSG_INSTANCE_ENCOUNTER_ENGAGE_UNIT = 0x27E9,
- SMSG_INSTANCE_ENCOUNTER_GAIN_COMBAT_RESURRECTION_CHARGE = 0x27F3,
- SMSG_INSTANCE_ENCOUNTER_IN_COMBAT_RESURRECTION = 0x27F2,
- SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE = 0x27EE,
- SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_START = 0x27ED,
- SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE = 0x27F0,
- SMSG_INSTANCE_ENCOUNTER_PHASE_SHIFT_CHANGED = 0x27F4,
- SMSG_INSTANCE_ENCOUNTER_START = 0x27EF,
- SMSG_INSTANCE_ENCOUNTER_TIMER_START = 0x27EC,
+ SMSG_INSTANCE_ENCOUNTER_CHANGE_PRIORITY = 0x27EE,
+ SMSG_INSTANCE_ENCOUNTER_DISENGAGE_UNIT = 0x27ED,
+ SMSG_INSTANCE_ENCOUNTER_END = 0x27F4,
+ SMSG_INSTANCE_ENCOUNTER_ENGAGE_UNIT = 0x27EC,
+ SMSG_INSTANCE_ENCOUNTER_GAIN_COMBAT_RESURRECTION_CHARGE = 0x27F6,
+ SMSG_INSTANCE_ENCOUNTER_IN_COMBAT_RESURRECTION = 0x27F5,
+ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE = 0x27F1,
+ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_START = 0x27F0,
+ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE = 0x27F3,
+ SMSG_INSTANCE_ENCOUNTER_PHASE_SHIFT_CHANGED = 0x27F7,
+ SMSG_INSTANCE_ENCOUNTER_START = 0x27F2,
+ SMSG_INSTANCE_ENCOUNTER_TIMER_START = 0x27EF,
SMSG_INSTANCE_GROUP_SIZE_CHANGED = 0x2733,
SMSG_INSTANCE_INFO = 0x264C,
SMSG_INSTANCE_RESET = 0x26AB,
SMSG_INSTANCE_RESET_FAILED = 0x26AC,
- SMSG_INSTANCE_SAVE_CREATED = 0x27B9,
+ SMSG_INSTANCE_SAVE_CREATED = 0x27BC,
SMSG_INVALIDATE_PAGE_TEXT = 0x26FE,
SMSG_INVALIDATE_PLAYER = 0x26CF,
SMSG_INVALID_PROMOTION_CODE = 0x2793,
SMSG_INVENTORY_CHANGE_FAILURE = 0x2760,
SMSG_IS_QUEST_COMPLETE_RESPONSE = 0x2A83,
SMSG_ITEM_CHANGED = 0x271D,
- SMSG_ITEM_COOLDOWN = 0x27FF,
+ SMSG_ITEM_COOLDOWN = 0x2802,
SMSG_ITEM_ENCHANT_TIME_UPDATE = 0x2795,
SMSG_ITEM_EXPIRE_PURCHASE_REFUND = 0x25AF,
SMSG_ITEM_PURCHASE_REFUND_RESULT = 0x25AD,
SMSG_ITEM_PUSH_RESULT = 0x2634,
SMSG_ITEM_TIME_UPDATE = 0x2794,
- SMSG_KICK_REASON = 0x2823,
+ SMSG_KICK_REASON = 0x2826,
SMSG_LEARNED_SPELLS = 0x2C4C,
SMSG_LEARN_PVP_TALENTS_FAILED = 0x25E6,
SMSG_LEARN_TALENTS_FAILED = 0x25E5,
@@ -1217,7 +1217,7 @@ enum OpcodeServer : uint32
SMSG_LIVE_REGION_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A3,
SMSG_LOAD_CUF_PROFILES = 0x25CB,
SMSG_LOAD_EQUIPMENT_SET = 0x274A,
- SMSG_LOAD_SELECTED_TROPHY_RESULT = 0x27FD,
+ SMSG_LOAD_SELECTED_TROPHY_RESULT = 0x2800,
SMSG_LOGIN_SET_TIME_SPEED = 0x2749,
SMSG_LOGIN_VERIFY_WORLD = 0x25AA,
SMSG_LOGOUT_CANCEL_ACK = 0x26AA,
@@ -1345,11 +1345,11 @@ enum OpcodeServer : uint32
SMSG_ON_MONSTER_MOVE = 0x2DA2,
SMSG_OPEN_CONTAINER = 0x2761,
SMSG_OPEN_LFG_DUNGEON_FINDER = 0x2A32,
- SMSG_OPEN_SHIPMENT_NPC_FROM_GOSSIP = 0x27D6,
- SMSG_OPEN_SHIPMENT_NPC_RESULT = 0x27D8,
+ SMSG_OPEN_SHIPMENT_NPC_FROM_GOSSIP = 0x27D9,
+ SMSG_OPEN_SHIPMENT_NPC_RESULT = 0x27DB,
SMSG_OVERRIDE_LIGHT = 0x26E3,
SMSG_PAGE_TEXT = 0x2756,
- SMSG_PARTY_COMMAND_RESULT = 0x27D3,
+ SMSG_PARTY_COMMAND_RESULT = 0x27D6,
SMSG_PARTY_INVITE = 0x25CC,
SMSG_PARTY_KILL_LOG = 0x279B,
SMSG_PARTY_MEMBER_STATE = 0x2799,
@@ -1427,14 +1427,14 @@ enum OpcodeServer : uint32
SMSG_QUERY_GAME_OBJECT_RESPONSE = 0x26F8,
SMSG_QUERY_GARRISON_CREATURE_NAME_RESPONSE = 0x292B,
SMSG_QUERY_GUILD_INFO_RESPONSE = 0x29E5,
- SMSG_QUERY_ITEM_TEXT_RESPONSE = 0x27FE,
+ SMSG_QUERY_ITEM_TEXT_RESPONSE = 0x2801,
SMSG_QUERY_NPC_TEXT_RESPONSE = 0x26FB,
SMSG_QUERY_PAGE_TEXT_RESPONSE = 0x26FD,
SMSG_QUERY_PETITION_RESPONSE = 0x2701,
SMSG_QUERY_PET_NAME_RESPONSE = 0x26FF,
SMSG_QUERY_PLAYER_NAME_RESPONSE = 0x26FC,
SMSG_QUERY_QUEST_INFO_RESPONSE = 0x2A95,
- SMSG_QUERY_QUEST_REWARD_RESPONSE = 0x2838,
+ SMSG_QUERY_QUEST_REWARD_RESPONSE = 0x283B,
SMSG_QUERY_TIME_RESPONSE = 0x2717,
SMSG_QUEST_COMPLETION_NPC_RESPONSE = 0x2A81,
SMSG_QUEST_CONFIRM_ACCEPT = 0x2A8E,
@@ -1461,9 +1461,9 @@ enum OpcodeServer : uint32
SMSG_QUEST_UPDATE_COMPLETE_BY_SPELL = 0x2A87,
SMSG_QUEST_UPDATE_FAILED = 0x2A89,
SMSG_QUEST_UPDATE_FAILED_TIMER = 0x2A8A,
- SMSG_RAF_EMAIL_ENABLED_RESPONSE = 0x27C4,
- SMSG_RAID_DIFFICULTY_SET = 0x27E6,
- SMSG_RAID_GROUP_ONLY = 0x27E8,
+ SMSG_RAF_EMAIL_ENABLED_RESPONSE = 0x27C7,
+ SMSG_RAID_DIFFICULTY_SET = 0x27E9,
+ SMSG_RAID_GROUP_ONLY = 0x27EB,
SMSG_RAID_INSTANCE_MESSAGE = 0x2BB9,
SMSG_RAID_MARKERS_CHANGED = 0x25B7,
SMSG_RANDOM_ROLL = 0x2649,
@@ -1471,17 +1471,17 @@ enum OpcodeServer : uint32
SMSG_READY_CHECK_COMPLETED = 0x260B,
SMSG_READY_CHECK_RESPONSE = 0x260A,
SMSG_READY_CHECK_STARTED = 0x2609,
- SMSG_READ_ITEM_RESULT_FAILED = 0x27E2,
- SMSG_READ_ITEM_RESULT_OK = 0x27DD,
+ SMSG_READ_ITEM_RESULT_FAILED = 0x27E5,
+ SMSG_READ_ITEM_RESULT_OK = 0x27E0,
SMSG_REALM_QUERY_RESPONSE = 0x26E2,
- SMSG_RECRUIT_A_FRIEND_RESPONSE = 0x27C5,
+ SMSG_RECRUIT_A_FRIEND_RESPONSE = 0x27C8,
SMSG_REFER_A_FRIEND_EXPIRED = 0x275F,
SMSG_REFER_A_FRIEND_FAILURE = 0x26E8,
SMSG_REFRESH_COMPONENT = 0x2674,
SMSG_REFRESH_SPELL_HISTORY = 0x2C2B,
SMSG_REMOVE_ITEM_PASSIVE = 0x25BE,
SMSG_REMOVE_LOSS_OF_CONTROL = 0x2693,
- SMSG_REPLACE_TROPHY_RESPONSE = 0x27FB,
+ SMSG_REPLACE_TROPHY_RESPONSE = 0x27FE,
SMSG_REPORT_PVP_PLAYER_AFK_RESULT = 0x26D6,
SMSG_REQUEST_ADDON_LIST = 0x265B,
SMSG_REQUEST_CEMETERY_LIST_RESPONSE = 0x259D,
@@ -1503,11 +1503,11 @@ enum OpcodeServer : uint32
SMSG_ROLE_CHOSEN = 0x2A3A,
SMSG_ROLE_POLL_INFORM = 0x258D,
SMSG_RUNE_REGEN_DEBUG = 0x25C5,
- SMSG_SCENARIO_BOOT = 0x27E3,
- SMSG_SCENARIO_COMPLETED = 0x281F,
+ SMSG_SCENARIO_BOOT = 0x27E6,
+ SMSG_SCENARIO_COMPLETED = 0x2822,
SMSG_SCENARIO_POIS = 0x264B,
SMSG_SCENARIO_PROGRESS_UPDATE = 0x2645,
- SMSG_SCENARIO_SPELL_UPDATE = 0x282B,
+ SMSG_SCENARIO_SPELL_UPDATE = 0x282E,
SMSG_SCENARIO_STATE = 0x2644,
SMSG_SCENE_OBJECT_EVENT = 0x25F4,
SMSG_SCENE_OBJECT_PET_BATTLE_FINAL_ROUND = 0x25F9,
@@ -1531,7 +1531,7 @@ enum OpcodeServer : uint32
SMSG_SETUP_CURRENCY = 0x2572,
SMSG_SETUP_RESEARCH_HISTORY = 0x2584,
SMSG_SET_AI_ANIM_KIT = 0x276F,
- SMSG_SET_ALL_TASK_PROGRESS = 0x27CD,
+ SMSG_SET_ALL_TASK_PROGRESS = 0x27D0,
SMSG_SET_ANIM_TIER = 0x2773,
SMSG_SET_CURRENCY = 0x2573,
SMSG_SET_DF_FAST_LAUNCH_RESULT = 0x2A2E,
@@ -1543,7 +1543,7 @@ enum OpcodeServer : uint32
SMSG_SET_FLAT_SPELL_MODIFIER = 0x2C36,
SMSG_SET_FORCED_REACTIONS = 0x2759,
SMSG_SET_ITEM_PURCHASE_DATA = 0x25AE,
- SMSG_SET_LOOT_METHOD_FAILED = 0x280A,
+ SMSG_SET_LOOT_METHOD_FAILED = 0x280D,
SMSG_SET_MAX_WEEKLY_QUANTITY = 0x25B5,
SMSG_SET_MELEE_ANIM_KIT = 0x2772,
SMSG_SET_MOVEMENT_ANIM_KIT = 0x2771,
@@ -1553,12 +1553,12 @@ enum OpcodeServer : uint32
SMSG_SET_PLAY_HOVER_ANIM = 0x25C9,
SMSG_SET_PROFICIENCY = 0x2774,
SMSG_SET_SPELL_CHARGES = 0x2C28,
- SMSG_SET_TASK_COMPLETE = 0x27CE,
+ SMSG_SET_TASK_COMPLETE = 0x27D1,
SMSG_SET_TIME_ZONE_INFORMATION = 0x269B,
SMSG_SET_VEHICLE_REC_ID = 0x272C,
- SMSG_SHOW_ADVENTURE_MAP = 0x2829,
+ SMSG_SHOW_ADVENTURE_MAP = 0x282C,
SMSG_SHOW_BANK = 0x26A4,
- SMSG_SHOW_MAILBOX = 0x27E4,
+ SMSG_SHOW_MAILBOX = 0x27E7,
SMSG_SHOW_NEUTRAL_PLAYER_FACTION_SELECT_UI = 0x25ED,
SMSG_SHOW_TAXI_NODES = 0x26F3,
SMSG_SHOW_TRADE_SKILL_RESPONSE = 0x27B1,
@@ -1627,27 +1627,27 @@ enum OpcodeServer : uint32
SMSG_TRANSFER_ABORTED = 0x273D,
SMSG_TRANSFER_PENDING = 0x25E1,
SMSG_TRANSMOG_COLLECTION_UPDATE = 0x25C4,
- SMSG_TRIGGER_CINEMATIC = 0x2802,
+ SMSG_TRIGGER_CINEMATIC = 0x2805,
SMSG_TRIGGER_MOVIE = 0x26F1,
SMSG_TURN_IN_PETITION_RESULT = 0x278F,
- SMSG_TUTORIAL_FLAGS = 0x27F5,
- SMSG_TUTORIAL_HIGHLIGHT_SPELL = 0x2832,
- SMSG_TUTORIAL_UNHIGHLIGHT_SPELL = 0x2831,
+ SMSG_TUTORIAL_FLAGS = 0x27F8,
+ SMSG_TUTORIAL_HIGHLIGHT_SPELL = 0x2835,
+ SMSG_TUTORIAL_UNHIGHLIGHT_SPELL = 0x2834,
SMSG_TWITTER_STATUS = 0x2FFD,
SMSG_UI_TIME = 0x2750,
- SMSG_UNDELETE_CHARACTER_RESPONSE = 0x2805,
- SMSG_UNDELETE_COOLDOWN_STATUS_RESPONSE = 0x2806,
+ SMSG_UNDELETE_CHARACTER_RESPONSE = 0x2808,
+ SMSG_UNDELETE_COOLDOWN_STATUS_RESPONSE = 0x2809,
SMSG_UNLEARNED_SPELLS = 0x2C4D,
SMSG_UPDATE_ACCOUNT_DATA = 0x2745,
SMSG_UPDATE_ACTION_BUTTONS = 0x25F2,
- SMSG_UPDATE_CHARACTER_FLAGS = 0x27FA,
+ SMSG_UPDATE_CHARACTER_FLAGS = 0x27FD,
SMSG_UPDATE_DUNGEON_ENCOUNTER_FOR_LOOT = 0x2A31,
SMSG_UPDATE_EXPANSION_LEVEL = 0x265F,
SMSG_UPDATE_INSTANCE_OWNERSHIP = 0x26CD,
SMSG_UPDATE_LAST_INSTANCE = 0x26AD,
- SMSG_UPDATE_OBJECT = 0x2803,
+ SMSG_UPDATE_OBJECT = 0x2806,
SMSG_UPDATE_TALENT_DATA = 0x25E7,
- SMSG_UPDATE_TASK_PROGRESS = 0x27CC,
+ SMSG_UPDATE_TASK_PROGRESS = 0x27CF,
SMSG_UPDATE_WEEKLY_SPELL_USAGE = 0x2C19,
SMSG_UPDATE_WORLD_STATE = 0x278A,
SMSG_USERLIST_ADD = 0x2BBE,
@@ -1674,22 +1674,22 @@ enum OpcodeServer : uint32
SMSG_WHO = 0x2BAE,
SMSG_WHO_IS = 0x26CB,
SMSG_WORLD_SERVER_INFO = 0x25C0,
- SMSG_WORLD_TEXT = 0x2821,
- SMSG_WOW_TOKEN_AUCTION_SOLD = 0x2810,
- SMSG_WOW_TOKEN_BUY_REQUEST_CONFIRMATION = 0x2812,
- SMSG_WOW_TOKEN_BUY_RESULT_CONFIRMATION = 0x2813,
- SMSG_WOW_TOKEN_CAN_VETERAN_BUY_RESULT = 0x2811,
- SMSG_WOW_TOKEN_DISTRIBUTION_GLUE_UPDATE = 0x280B,
- SMSG_WOW_TOKEN_DISTRIBUTION_UPDATE = 0x280C,
- SMSG_WOW_TOKEN_MARKET_PRICE_RESPONSE = 0x280D,
- SMSG_WOW_TOKEN_REDEEM_GAME_TIME_UPDATED = 0x2814,
- SMSG_WOW_TOKEN_REDEEM_REQUEST_CONFIRMATION = 0x2815,
- SMSG_WOW_TOKEN_REDEEM_RESULT = 0x2816,
- SMSG_WOW_TOKEN_SELL_REQUEST_CONFIRMATION = 0x280E,
- SMSG_WOW_TOKEN_SELL_RESULT_CONFIRMATION = 0x280F,
- SMSG_WOW_TOKEN_UPDATE_AUCTIONABLE_LIST_RESPONSE = 0x2817,
+ SMSG_WORLD_TEXT = 0x2824,
+ SMSG_WOW_TOKEN_AUCTION_SOLD = 0x2813,
+ SMSG_WOW_TOKEN_BUY_REQUEST_CONFIRMATION = 0x2815,
+ SMSG_WOW_TOKEN_BUY_RESULT_CONFIRMATION = 0x2816,
+ SMSG_WOW_TOKEN_CAN_VETERAN_BUY_RESULT = 0x2814,
+ SMSG_WOW_TOKEN_DISTRIBUTION_GLUE_UPDATE = 0x280E,
+ SMSG_WOW_TOKEN_DISTRIBUTION_UPDATE = 0x280F,
+ SMSG_WOW_TOKEN_MARKET_PRICE_RESPONSE = 0x2810,
+ SMSG_WOW_TOKEN_REDEEM_GAME_TIME_UPDATED = 0x2817,
+ SMSG_WOW_TOKEN_REDEEM_REQUEST_CONFIRMATION = 0x2818,
+ SMSG_WOW_TOKEN_REDEEM_RESULT = 0x2819,
+ SMSG_WOW_TOKEN_SELL_REQUEST_CONFIRMATION = 0x2811,
+ SMSG_WOW_TOKEN_SELL_RESULT_CONFIRMATION = 0x2812,
+ SMSG_WOW_TOKEN_UPDATE_AUCTIONABLE_LIST_RESPONSE = 0x281A,
SMSG_XP_GAIN_ABORTED = 0x25DC,
- SMSG_XP_GAIN_ENABLED = 0x27E7,
+ SMSG_XP_GAIN_ENABLED = 0x27EA,
SMSG_ZONE_UNDER_ATTACK = 0x2BBA,
// Opcodes that are not generated automatically
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index de5d96f9894..595855370f6 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4084,7 +4084,9 @@ void Spell::SendSpellGo()
castData.MissileTrajectory.Pitch = m_targets.GetPitch();
}
- m_caster->SendMessageToSet(packet.Write(), true);
+ packet.LogData.Initialize(this);
+
+ m_caster->SendCombatLogMessage(&packet);
}
/// Writes miss and hit targets for a SMSG_SPELL_GO packet
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 5917ed512c3..888e813f29b 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -629,7 +629,7 @@ class TC_GAME_API Spell
Unit* GetCaster() const { return m_caster; }
Unit* GetOriginalCaster() const { return m_originalCaster; }
SpellInfo const* GetSpellInfo() const { return m_spellInfo; }
- std::vector<SpellInfo::CostData> GetPowerCost() const { return m_powerCost; }
+ std::vector<SpellInfo::CostData> const& GetPowerCost() const { return m_powerCost; }
bool UpdatePointers(); // must be used at call Spell code after time delay (non triggered spell cast/update spell call/etc)