Core/GameObject: Fix linked traps not being despawned properly and remove deprecated code

Closes #20159

(cherry picked from commit 8f0af67bcb)
This commit is contained in:
Killyana
2018-03-11 18:07:44 +01:00
committed by Shauren
parent 81182d2114
commit ffae92edd2

View File

@@ -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)