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

Closes #20159
This commit is contained in:
Killyana
2018-03-11 18:07:44 +01:00
committed by Ovahlord
parent 44f89c7dae
commit 5677d65eed

View File

@@ -522,10 +522,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
@@ -726,7 +722,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)