aboutsummaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-27 11:32:46 -0500
committermegamage <none@none>2009-08-27 11:32:46 -0500
commit56bdb0fc6b61afb495793868c58514a516ffe4b0 (patch)
tree5080d1795b59ac31ac8602f661478559874e1b85 /src/bindings
parent71860b5024744bb80364e1ce9d21f0f600cb231d (diff)
*Fix a crash caused by possess pet. Thanks to nanouniko
--HG-- branch : trunk
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
index 508823658f6..96c455d424e 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
@@ -147,17 +147,9 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
for(int i=0; i<3; ++i)
{
if(Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[i]))
- {
- portal->SetVisibility(VISIBILITY_OFF);
- portal->DealDamage(portal, portal->GetMaxHealth());
- portal->RemoveFromWorld();
- }
+ portal->DisappearAndDie();
if(Creature *portal = Unit::GetCreature(*m_creature, BeamerGUID[i]))
- {
- portal->SetVisibility(VISIBILITY_OFF);
- portal->DealDamage(portal, portal->GetMaxHealth());
- portal->RemoveFromWorld();
- }
+ portal->DisappearAndDie();
PortalGUID[i] = 0;
BeamTarget[i] = 0;
}
@@ -204,9 +196,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
if(Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
{
beamer->CastSpell(target, PortalBeam[j], false);
- beamer->SetVisibility(VISIBILITY_OFF);
- beamer->DealDamage(beamer, beamer->GetMaxHealth());
- beamer->RemoveFromWorld();
+ beamer->DisappearAndDie();
BeamerGUID[j] = 0;
}
// create new one and start beaming on the target