aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTartalo <none@none>2010-03-22 22:44:54 +0100
committerTartalo <none@none>2010-03-22 22:44:54 +0100
commitc80b67cebddd9bbc6373860a339be56f0ce4d7e9 (patch)
treede175c67e1cb93776f9031930d110c7e17838513 /src
parent0d1bd05ce7c3e5ff76ceb93504d821af01a1aa0a (diff)
Nexus, Anomalus: Summons rifts only once. Blizzlike 3.3.2 update
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/scripts/northrend/nexus/nexus/boss_anomalus.cpp61
1 files changed, 4 insertions, 57 deletions
diff --git a/src/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/src/scripts/northrend/nexus/nexus/boss_anomalus.cpp
index 7fe83edab7b..f5d5ecede91 100644
--- a/src/scripts/northrend/nexus/nexus/boss_anomalus.cpp
+++ b/src/scripts/northrend/nexus/nexus/boss_anomalus.cpp
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * Copyright (C) 2006 - 2010 TrinityCore <http://www.trinitycore.org>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -14,13 +15,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* ScriptData
-SDName: Boss_Anomalus
-SD%Complete:
-SDComment:
-SDCategory: The Nexus, The Nexus
-EndScriptData */
-
#include "ScriptedPch.h"
#include "nexus.h"
@@ -51,7 +45,7 @@ enum eEnums
SAY_SHIELD = -1576013
};
-float RiftLocation[6][3]=
+const Position RiftLocation[6] =
{
{652.64, -273.70, -8.75},
{634.45, -265.94, -8.44},
@@ -146,32 +140,14 @@ struct boss_anomalusAI : public ScriptedAI
} else
ChaoticRiftGUID = 0;
- if ((Phase == 0) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.75))
+ if ((Phase == 0) && HealthBelowPct(50))
{
Phase = 1;
DoScriptText(SAY_SHIELD, m_creature);
DoCast(m_creature, SPELL_RIFT_SHIELD);
int tmp = rand()%(2);
- Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
- if (Rift)
- {
- //DoCast(Rift, SPELL_CHARGE_RIFT);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- Rift->AI()->AttackStart(pTarget);
- ChaoticRiftGUID = Rift->GetGUID();
- DoScriptText(SAY_RIFT , m_creature);
- }
- }
-
- if ((Phase == 1) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.50))
- {
- Phase = 2;
- DoScriptText(SAY_SHIELD , m_creature);
- DoCast(m_creature, SPELL_RIFT_SHIELD);
-
- int tmp = rand()%(2);
- Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
if (Rift)
{
//DoCast(Rift, SPELL_CHARGE_RIFT);
@@ -182,23 +158,6 @@ struct boss_anomalusAI : public ScriptedAI
}
}
- if ((Phase == 2) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
- {
- Phase = 3;
- DoScriptText(SAY_SHIELD , m_creature);
- DoCast(m_creature, SPELL_RIFT_SHIELD);
-
- int tmp = rand()%(2);
- Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
- if (Rift)
- {
- //DoCast(Rift, SPELL_CHARGE_RIFT);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- Rift->AI()->AttackStart(pTarget);
- ChaoticRiftGUID = Rift->GetGUID();
- DoScriptText(SAY_RIFT , m_creature);
- }
- }
if (SPELL_SPARK_Timer <= diff)
{
@@ -207,18 +166,6 @@ struct boss_anomalusAI : public ScriptedAI
SPELL_SPARK_Timer = 5000;
} else SPELL_SPARK_Timer -=diff;
- if (SPELL_CREATE_RIFT_Timer <= diff)
- {
- DoScriptText(SAY_RIFT , m_creature);
-
- int tmp = rand()%(2);
- Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
- if (Rift)
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- Rift->AI()->AttackStart(pTarget);
- SPELL_CREATE_RIFT_Timer = 25000;
- } else SPELL_CREATE_RIFT_Timer -=diff;
-
DoMeleeAttackIfReady();
}
};