aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp2
-rw-r--r--src/game/GameObject.cpp6
-rw-r--r--src/game/GameObject.h1
4 files changed, 3 insertions, 8 deletions
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
index 62b90bbb742..8a8e319c294 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
if (Player* pPlayer = Unit::GetPlayer(itr->first))
pPlayer->RemoveAura(SPELL_ICEBOLT);
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
- pGo->DeleteObjectWithOwner();
+ pGo->Delete();
}
iceblocks.clear();
}
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
index 1616333b007..69f41cdf578 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
@@ -200,7 +200,7 @@ bool GOHello_go_najentus_spine(Player* pPlayer, GameObject* pGo)
if (CAST_AI(boss_najentusAI, Najentus->AI())->RemoveImpalingSpine())
{
pPlayer->CastSpell(pPlayer, SPELL_CREATE_NAJENTUS_SPINE, true);
- pGo->DeleteObjectWithOwner();
+ pGo->Delete();
}
return true;
}
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 10ed4af509e..cc0d7f17fb7 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -489,17 +489,13 @@ void GameObject::AddUniqueUse(Player* player)
m_unique_users.insert(player->GetGUIDLow());
}
-void GameObject::DeleteObjectWithOwner()
+void GameObject::Delete()
{
SetLootState(GO_NOT_READY);
if (GetOwnerGUID())
if (Unit * owner = GetOwner(false))
owner->RemoveGameObject(this, false);
- Delete();
-}
-void GameObject::Delete()
-{
assert (!GetOwnerGUID());
SendObjectDeSpawnAnim(GetGUID());
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 20bead449bc..358eb0cbfb7 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -656,7 +656,6 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
uint32 GetRespawnDelay() const { return m_respawnDelayTime; }
void Refresh();
void Delete();
- void DeleteObjectWithOwner();
void getFishLoot(Loot *loot, Player* loot_owner);
GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); }
void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); }