From 1c9de5df48d7c3d50f640b86f9159cc670b338dc Mon Sep 17 00:00:00 2001 From: maximius Date: Sat, 21 Nov 2009 19:33:00 -0800 Subject: *Fix a possible crash in boss_razorscale, and a minor aesthetic glitch. Thanks tali, closes #354 --HG-- branch : trunk --- .../scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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! { -- cgit v1.2.3