aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2018-03-11 18:07:44 +0100
committerKillyana <morphone1@gmail.com>2018-03-11 18:07:44 +0100
commit8f0af67bcb56712d4c333f36a1c2030443c10fb7 (patch)
tree690da9ee250b8c1e2143ee8c4b68d5bb3c995733 /src
parent2fe91a000f419bd32e3a229ad9be788ea5a9c2ec (diff)
Core/GameObject: Fix linked traps not being despawned properly and remove deprecated code
Closes #20159
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index fbc8c260cdc..b85e352c12f 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -529,10 +529,6 @@ void GameObject::Update(uint32 diff)
m_SkillupList.clear();
m_usetimes = 0;
- // If nearby linked trap exists, respawn it
- if (GameObject* linkedTrap = GetLinkedTrap())
- linkedTrap->SetLootState(GO_READY);
-
switch (GetGoType())
{
case GAMEOBJECT_TYPE_FISHINGNODE: // can't fish now
@@ -727,7 +723,7 @@ void GameObject::Update(uint32 diff)
{
// If nearby linked trap exists, despawn it
if (GameObject* linkedTrap = GetLinkedTrap())
- linkedTrap->SetLootState(GO_JUST_DEACTIVATED);
+ linkedTrap->DespawnOrUnsummon();
//if Gameobject should cast spell, then this, but some GOs (type = 10) should be destroyed
if (GetGoType() == GAMEOBJECT_TYPE_GOOBER)