mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
Core/Entities: GameObjectDespawn packet is only sent for GameObjects
This commit is contained in:
@@ -697,7 +697,7 @@ void GameObject::Update(uint32 diff)
|
||||
//burning flags in some battlegrounds, if you find better condition, just add it
|
||||
if (GetGOInfo()->IsDespawnAtAction() || GetGoAnimProgress() > 0)
|
||||
{
|
||||
SendObjectDeSpawnAnim(GetGUID());
|
||||
SendGameObjectDespawn();
|
||||
//reset flags
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
@@ -748,7 +748,7 @@ void GameObject::Delete()
|
||||
SetLootState(GO_NOT_READY);
|
||||
RemoveFromOwner();
|
||||
|
||||
SendObjectDeSpawnAnim(GetGUID());
|
||||
SendGameObjectDespawn();
|
||||
|
||||
SetGoState(GO_STATE_READY);
|
||||
|
||||
@@ -762,6 +762,13 @@ void GameObject::Delete()
|
||||
AddObjectToRemoveList();
|
||||
}
|
||||
|
||||
void GameObject::SendGameObjectDespawn()
|
||||
{
|
||||
WorldPackets::GameObject::GameObjectDespawn packet;
|
||||
packet.ObjectGUID = GetGUID();
|
||||
SendMessageToSet(packet.Write(), true);
|
||||
}
|
||||
|
||||
void GameObject::getFishLoot(Loot* fishloot, Player* loot_owner)
|
||||
{
|
||||
fishloot->clear();
|
||||
|
||||
Reference in New Issue
Block a user