aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 11:28:14 -0500
committermegamage <none@none>2009-05-03 11:28:14 -0500
commit193b0634dfa42fcce9904003f9c0d3f6b5ec54af (patch)
tree2ba8357095e6e46a16dd8246b928fd0901336ac8 /src
parent84f2aa1e2805aced52733125462cc7ecd6a93126 (diff)
*Some fix of sapphiron script.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp33
-rw-r--r--src/game/SpellMgr.cpp4
2 files changed, 15 insertions, 22 deletions
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
index 0e2498dc679..a0cfb77c06c 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
@@ -28,8 +28,8 @@ EndScriptData */
#define SPELL_ICEBOLT 28522
#define SPELL_FROST_BREATH 29318
-#define SPELL_FROST_AURA 28531
-#define SPELL_LIFE_DRAIN 28542
+#define SPELL_FROST_AURA HEROIC(28531,55799)
+#define SPELL_LIFE_DRAIN HEROIC(28542,55665)
//#define SPELL_CHILL 28560
#define SPELL_BLIZZARD 28547
#define SPELL_BESERK 26662
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
Fly_Timer = 45000;
Icebolt_Timer = 4000;
land_Timer = 0;
- Beserk_Timer = 0;
+ Beserk_Timer = 15*60000;
phase = 1;
Icebolt_Count = 0;
IsInFly = false;
@@ -76,6 +76,8 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
void EnterCombat(Unit *who)
{
+ DoZoneInCombat();
+ me->CastSpell(me, SPELL_FROST_AURA, true);
}
void UpdateAI(const uint32 diff)
@@ -85,19 +87,9 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
if(phase == 1)
{
- if(FrostAura_Timer < diff)
- {
- DoCast(m_creature->getVictim(),SPELL_FROST_AURA);
- FrostAura_Timer = 5000;
- }else FrostAura_Timer -= diff;
-
if(LifeDrain_Timer < diff)
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
- DoCast(target,SPELL_LIFE_DRAIN);
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
- DoCast(target,SPELL_LIFE_DRAIN);
-
+ DoCastAOE(SPELL_LIFE_DRAIN);
LifeDrain_Timer = 24000;
}else LifeDrain_Timer -= diff;
@@ -178,15 +170,12 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
}else land_Timer -= diff;
}
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 10)
+ if (Beserk_Timer < diff)
{
- if (Beserk_Timer < diff)
- {
- DoScriptText(EMOTE_ENRAGE, m_creature);
- DoCast(m_creature,SPELL_BESERK);
- Beserk_Timer = 300000;
- }else Beserk_Timer -= diff;
- }
+ DoScriptText(EMOTE_ENRAGE, m_creature);
+ DoCast(m_creature,SPELL_BESERK);
+ Beserk_Timer = 300000;
+ }else Beserk_Timer -= diff;
if (phase!=2)
DoMeleeAttackIfReady();
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 31195f67bca..fde5d63631f 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2427,6 +2427,9 @@ void SpellMgr::LoadSpellCustomAttr()
case 41071: // Raise Dead (HACK)
spellInfo->MaxAffectedTargets = 1;
break;
+ case 28542: // Life Drain - Sapphiron
+ spellInfo->MaxAffectedTargets = 1;
+ break;
case 41376: // Spite
case 39992: // Needle Spine
case 29576: //Multi-Shot
@@ -2447,6 +2450,7 @@ void SpellMgr::LoadSpellCustomAttr()
case 46009: //Negative Energy
case 45641: //Fire Bloom
case 54937: //Glyph of Holy Light
+ case 55665: // Life Drain - Sapphiron
spellInfo->MaxAffectedTargets = 5;
break;
case 40827: //Sinful Beam