aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-11-21 19:33:00 -0800
committermaximius <none@none>2009-11-21 19:33:00 -0800
commit1c9de5df48d7c3d50f640b86f9159cc670b338dc (patch)
tree611a419b1ee443d05d2428906b998c458e8c26a2 /src
parent946a32a6ba2a5d5b7de0bec2642885501c8db97e (diff)
*Fix a possible crash in boss_razorscale, and a minor aesthetic glitch. Thanks tali, closes #354
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
index 0008a23a022..8ee4d48aad0 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
@@ -120,8 +120,12 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
m_creature->GetMotionMaster()->MoveTargetedHome();
}
- if(!m_creature->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()) // Victim is not controlled by a player (should never happen)
- m_creature->getVictim()->CombatStop(); // Forcibly stop combat with this victim
+ // Victim is not controlled by a player (should never happen)
+ if(m_creature->getVictim() && !m_creature->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ m_creature->getVictim()->CombatStop(false); // Force the unit to exit combat..
+ m_creature->getVictim()->GetMotionMaster()->MoveTargetedHome(); // and return home, so they don't just stand there.
+ }
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 99 && Phase == 1) // TODO: Only land (exit Phase 1) if brought down with harpoon guns! This is important!
{