aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2018-03-11 18:07:44 +0100
committerShauren <shauren.trinity@gmail.com>2021-09-06 15:26:50 +0200
commitffae92edd23a37d63aeed01544018944716b4a83 (patch)
tree137a0147d1237278d0d2577b3cdca46422aa8cc9
parent81182d2114ab66e3102d9e16b1893075a7f12f41 (diff)
Core/GameObject: Fix linked traps not being despawned properly and remove deprecated code
Closes #20159 (cherry picked from commit 8f0af67bcb56712d4c333f36a1c2030443c10fb7)
-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 6a13100d63d..a18fe4277d8 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -657,10 +657,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
@@ -857,7 +853,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)