mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core/PacketIO: Removed SMSG_DESTROY_OBJECT from opcodes enum
This commit is contained in:
@@ -284,23 +284,10 @@ void Object::BuildOutOfRangeUpdateBlock(UpdateData* data) const
|
||||
data->AddOutOfRangeGUID(GetGUID());
|
||||
}
|
||||
|
||||
void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
void Object::DestroyForPlayer(Player* target) const
|
||||
{
|
||||
ASSERT(target);
|
||||
|
||||
if (isType(TYPEMASK_UNIT) || isType(TYPEMASK_PLAYER))
|
||||
{
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
{
|
||||
if (bg->isArena())
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8);
|
||||
data << GetGUID();
|
||||
target->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateData updateData(target->GetMapId());
|
||||
BuildOutOfRangeUpdateBlock(&updateData);
|
||||
WorldPacket packet;
|
||||
|
||||
@@ -116,7 +116,7 @@ class Object
|
||||
void BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const;
|
||||
void BuildOutOfRangeUpdateBlock(UpdateData* data) const;
|
||||
|
||||
virtual void DestroyForPlayer(Player* target, bool onDeath = false) const;
|
||||
virtual void DestroyForPlayer(Player* target) const;
|
||||
|
||||
int32 GetInt32Value(uint16 index) const;
|
||||
uint32 GetUInt32Value(uint16 index) const;
|
||||
|
||||
@@ -4270,9 +4270,9 @@ void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
Unit::BuildCreateUpdateBlockForPlayer(data, target);
|
||||
}
|
||||
|
||||
void Player::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
void Player::DestroyForPlayer(Player* target) const
|
||||
{
|
||||
Unit::DestroyForPlayer(target, onDeath);
|
||||
Unit::DestroyForPlayer(target);
|
||||
|
||||
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
{
|
||||
|
||||
@@ -2086,7 +2086,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
WorldSession* GetSession() const { return m_session; }
|
||||
|
||||
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
|
||||
void DestroyForPlayer(Player* target, bool onDeath = false) const override;
|
||||
void DestroyForPlayer(Player* target) const override;
|
||||
void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend = false, float group_rate=1.0f);
|
||||
|
||||
// notifiers
|
||||
|
||||
@@ -16155,7 +16155,6 @@ bool Unit::IsSplineEnabled() const
|
||||
return movespline->Initialized() && !movespline->Finalized();
|
||||
}
|
||||
|
||||
|
||||
void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) const
|
||||
{
|
||||
if (!target)
|
||||
@@ -16334,6 +16333,21 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
||||
data->append(fieldBuffer);
|
||||
}
|
||||
|
||||
void Unit::DestroyForPlayer(Player* target) const
|
||||
{
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
{
|
||||
if (bg->isArena())
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8);
|
||||
data << GetGUID();
|
||||
target->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
WorldObject::DestroyForPlayer(target);
|
||||
}
|
||||
|
||||
void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown)
|
||||
{
|
||||
data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + 4 + 4);
|
||||
|
||||
@@ -2228,6 +2228,7 @@ class Unit : public WorldObject
|
||||
explicit Unit (bool isWorldObject);
|
||||
|
||||
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
|
||||
void DestroyForPlayer(Player* target) const override;
|
||||
|
||||
UnitAI* i_AI, *i_disabledAI;
|
||||
|
||||
|
||||
@@ -882,7 +882,6 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DEATH_RELEASE_LOC, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DEBUG_RUNE_REGEN, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DEFENSE_MESSAGE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DESTROY_OBJECT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DESTRUCTIBLE_BUILDING_DAMAGE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DIFFERENT_INSTANCE_FROM_PARTY, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DISENCHANT_CREDIT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
|
||||
@@ -866,7 +866,6 @@ enum OpcodeServer : uint32
|
||||
SMSG_DEBUG_RUNE_REGEN = 0xBADD,
|
||||
SMSG_DEBUG_SERVER_GEO = 0xBADD,
|
||||
SMSG_DEFENSE_MESSAGE = 0xBADD,
|
||||
SMSG_DESTROY_OBJECT = 0xBADD,
|
||||
SMSG_DESTRUCTIBLE_BUILDING_DAMAGE = 0xBADD,
|
||||
SMSG_DIFFERENT_INSTANCE_FROM_PARTY = 0xBADD,
|
||||
SMSG_DISENCHANT_CREDIT = 0xBADD,
|
||||
|
||||
@@ -28,7 +28,7 @@ class SQLQueryHolder
|
||||
std::vector<SQLResultPair> m_queries;
|
||||
public:
|
||||
SQLQueryHolder() { }
|
||||
~SQLQueryHolder();
|
||||
virtual ~SQLQueryHolder();
|
||||
bool SetQuery(size_t index, const char *sql);
|
||||
bool SetPQuery(size_t index, const char *format, ...) ATTR_PRINTF(3, 4);
|
||||
bool SetPreparedQuery(size_t index, PreparedStatement* stmt);
|
||||
|
||||
Reference in New Issue
Block a user