aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
index 01ba351ff99..1a3d4f39937 100644
--- a/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
+++ b/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
@@ -255,9 +255,9 @@ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI
void FetchDragons()
{
- Unit* pTene = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_TENEBRON));
- Unit* pShad = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_SHADRON));
- Unit* pVesp = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_VESPERON));
+ Unit* pTene = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON));
+ Unit* pShad = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON));
+ Unit* pVesp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON));
//if at least one of the dragons are alive and are being called
bool bCanUseWill = false;
@@ -355,11 +355,15 @@ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI
if (!UpdateVictim())
return;
+ Unit* pTene = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON));
+ Unit* pShad = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON));
+ Unit* pVesp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON));
+
//spell will target dragons, if they are still alive at 35%
- if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35)
+ if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35 && (pTene->isAlive() || pShad->isAlive() || pVesp->isAlive()))
{
- DoScriptText(SAY_SARTHARION_BERSERK,m_creature);
- DoCast(m_creature,SPELL_BERSERK);
+ DoScriptText(SAY_SARTHARION_BERSERK, m_creature);
+ DoCast(m_creature, SPELL_BERSERK);
m_bIsBerserk = true;
}