convert Hellfire Ramparts to new format

--HG--
branch : trunk
This commit is contained in:
Supabad
2010-08-07 22:45:09 +02:00
parent 9e1695a9c5
commit 79b0567a74
4 changed files with 799 additions and 708 deletions
@@ -25,27 +25,42 @@ EndScriptData */
#include "ScriptPCH.h"
#define SAY_AGGRO_1 -1543009
#define SAY_AGGRO_2 -1543010
#define SAY_AGGRO_3 -1543011
#define SAY_SUMMON -1543012
#define SAY_CURSE -1543013
#define SAY_KILL_1 -1543014
#define SAY_DIE -1543015
#define SAY_WIPE -1543016
#define SPELL_ORBITAL_STRIKE 30637
#define SPELL_SHADOW_WHIP 30638
#define SPELL_TREACHEROUS_AURA 30695
#define H_SPELL_BANE_OF_TREACHERY 37566
#define SPELL_DEMONIC_SHIELD 31901
#define SPELL_SHADOW_BOLT 30686
#define H_SPELL_SHADOW_BOLT 39297
#define SPELL_SUMMON_FIENDISH_HOUND 30707
struct boss_omor_the_unscarredAI : public ScriptedAI
enum eSays
{
boss_omor_the_unscarredAI(Creature *c) : ScriptedAI(c)
SAY_AGGRO_1 = -1543009,
SAY_AGGRO_2 = -1543010,
SAY_AGGRO_3 = -1543011,
SAY_SUMMON = -1543012,
SAY_CURSE = -1543013,
SAY_KILL_1 = -1543014,
SAY_DIE = -1543015,
SAY_WIPE = -1543016,
};
enum eSpells
{
SPELL_ORBITAL_STRIKE = 30637,
SPELL_SHADOW_WHIP = 30638,
SPELL_TREACHEROUS_AURA = 30695,
H_SPELL_BANE_OF_TREACHERY = 37566,
SPELL_DEMONIC_SHIELD = 31901,
SPELL_SHADOW_BOLT = 30686,
H_SPELL_SHADOW_BOLT = 39297,
SPELL_SUMMON_FIENDISH_HOUND= 30707,
};
class boss_omor_the_unscarred : public CreatureScript
{
public:
boss_omor_the_unscarred()
: CreatureScript("boss_omor_the_unscarred")
{
}
struct boss_omor_the_unscarredAI : public ScriptedAI
{
boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature)
{
SetCombatMovement(false);
}
@@ -116,7 +131,9 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_SUMMON_FIENDISH_HOUND);
Summon_Timer = 15000+rand()%15000;
} else Summon_Timer -= diff;
}
else
Summon_Timer -= diff;
}
if (CanPullBack)
@@ -135,9 +152,12 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
PlayerGUID = 0;
ShadowWhip_Timer = 2000;
CanPullBack = false;
} else ShadowWhip_Timer -= diff;
}
else if (OrbitalStrike_Timer <= diff)
else
ShadowWhip_Timer -= diff;
}
else
if (OrbitalStrike_Timer <= diff)
{
Unit* temp = NULL;
if (me->IsWithinMeleeRange(me->getVictim()))
@@ -153,7 +173,9 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
if (PlayerGUID)
CanPullBack = true;
}
} else OrbitalStrike_Timer -= diff;
}
else
OrbitalStrike_Timer -= diff;
if ((me->GetHealth()*100) / me->GetMaxHealth() < 20)
{
@@ -161,7 +183,9 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
{
DoCast(me, SPELL_DEMONIC_SHIELD);
DemonicShield_Timer = 15000;
} else DemonicShield_Timer -= diff;
}
else
DemonicShield_Timer -= diff;
}
if (Aura_Timer <= diff)
@@ -173,7 +197,9 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
DoCast(pTarget, SPELL_TREACHEROUS_AURA);
Aura_Timer = 8000+rand()%8000;
}
} else Aura_Timer -= diff;
}
else
Aura_Timer -= diff;
if (Shadowbolt_Timer <= diff)
{
@@ -185,24 +211,22 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
DoCast(pTarget, SPELL_SHADOW_BOLT);
Shadowbolt_Timer = 4000+rand()%2500;
}
} else Shadowbolt_Timer -= diff;
}
else
Shadowbolt_Timer -= diff;
DoMeleeAttackIfReady();
}
};
};
CreatureAI* GetAI_boss_omor_the_unscarredAI(Creature* pCreature)
{
return new boss_omor_the_unscarredAI (pCreature);
}
CreatureAI* GetAI(Creature* Creature) const
{
return new boss_omor_the_unscarredAI (Creature);
}
};
void AddSC_boss_omor_the_unscarred()
{
Script *newscript;
newscript = new Script;
newscript->Name = "boss_omor_the_unscarred";
newscript->GetAI = &GetAI_boss_omor_the_unscarredAI;
newscript->RegisterSelf();
new boss_omor_the_unscarred();
}
@@ -50,6 +50,7 @@ enum eUnits
ENTRY_REINFORCED_FEL_IRON_CHEST = 185168,
ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169,
};
enum eSays
{
SAY_INTRO = -1543017,
@@ -70,8 +71,17 @@ const float VazrudenRing[2][3] =
{-1377, 1760, 112}
};
struct boss_nazanAI : public ScriptedAI
class boss_nazan : public CreatureScript
{
public:
boss_nazan()
: CreatureScript("boss_nazan")
{
}
struct boss_nazanAI : public ScriptedAI
{
boss_nazanAI(Creature* pCreature) : ScriptedAI(pCreature)
{
VazrudenGUID = 0;
@@ -123,7 +133,9 @@ struct boss_nazanAI : public ScriptedAI
if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0))
DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true);
Fireball_Timer = urand(4000,7000);
} else Fireball_Timer -= diff;
}
else
Fireball_Timer -= diff;
if (flight) // phase 1 - the flight
{
@@ -141,7 +153,9 @@ struct boss_nazanAI : public ScriptedAI
DoStartMovement(me->getVictim());
DoScriptText(EMOTE, me);
return;
} else Fly_Timer -= diff;
}
else
Fly_Timer -= diff;
if (Turn_Timer <= diff)
{
@@ -149,7 +163,9 @@ struct boss_nazanAI : public ScriptedAI
if (!me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5))
me->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);
Turn_Timer = 10000;
} else Turn_Timer -= diff;
}
else
Turn_Timer -= diff;
}
else // phase 2 - land fight
{
@@ -158,22 +174,40 @@ struct boss_nazanAI : public ScriptedAI
DoCast(me, DUNGEON_MODE(SPELL_CONE_OF_FIRE, SPELL_CONE_OF_FIRE_H));
ConeOfFire_Timer = 12000;
Fireball_Timer = 4000;
} else ConeOfFire_Timer -= diff;
}
else
ConeOfFire_Timer -= diff;
if (IsHeroic())
if (BellowingRoar_Timer <= diff)
{
DoCast(me, SPELL_BELLOWING_ROAR);
BellowingRoar_Timer = 45000;
} else BellowingRoar_Timer -= diff;
}
else
BellowingRoar_Timer -= diff;
DoMeleeAttackIfReady();
}
}
};
CreatureAI* GetAI(Creature* Creature) const
{
return new boss_nazanAI (Creature);
}
};
struct boss_vazrudenAI : public ScriptedAI
class boss_vazruden : public CreatureScript
{
public:
boss_vazruden()
: CreatureScript("boss_vazruden")
{
}
struct boss_vazrudenAI : public ScriptedAI
{
boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature)
{
}
@@ -218,7 +252,9 @@ struct boss_vazrudenAI : public ScriptedAI
WipeSaid = true;
}
me->DisappearAndDie();
} else UnsummonCheck -= diff;
}
else
UnsummonCheck -= diff;
return;
}
@@ -227,14 +263,30 @@ struct boss_vazrudenAI : public ScriptedAI
if (Unit *victim = me->getVictim())
DoCast(victim, DUNGEON_MODE(SPELL_REVENGE,SPELL_REVENGE_H));
Revenge_Timer = 5000;
} else Revenge_Timer -= diff;
}
else
Revenge_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* Creature) const
{
return new boss_vazrudenAI (Creature);
}
};
struct boss_vazruden_the_heraldAI : public ScriptedAI
class boss_vazruden_the_herald : public CreatureScript
{
public:
boss_vazruden_the_herald()
: CreatureScript("boss_vazruden_the_herald")
{
}
struct boss_vazruden_the_heraldAI : public ScriptedAI
{
boss_vazruden_the_heraldAI(Creature* pCreature) : ScriptedAI(pCreature)
{
summoned = false;
@@ -317,7 +369,7 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
Unit* pVictim = me->getVictim();
if (pSummoned->GetEntry() == ENTRY_NAZAN)
{
CAST_AI(boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID;
CAST_AI(boss_nazan::boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID;
pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
pSummoned->SetSpeed(MOVE_FLIGHT, 2.5);
if (pVictim)
@@ -361,7 +413,9 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
phase = 2;
return;
}
} else check -= diff;
}
else
check -= diff;
break;
default: // adds do the job now
if (check <= diff)
@@ -386,14 +440,30 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
//me->Kill(me);
}
check = 2000;
} else check -= diff;
}
else
check -= diff;
break;
}
}
};
CreatureAI* GetAI(Creature* Creature) const
{
return new boss_vazruden_the_heraldAI (Creature);
}
};
struct mob_hellfire_sentryAI : public ScriptedAI
class mob_hellfire_sentry : public CreatureScript
{
public:
mob_hellfire_sentry()
: CreatureScript("mob_hellfire_sentry")
{
}
struct mob_hellfire_sentryAI : public ScriptedAI
{
mob_hellfire_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 KidneyShot_Timer;
@@ -408,7 +478,7 @@ struct mob_hellfire_sentryAI : public ScriptedAI
void JustDied(Unit* who)
{
if (Creature *herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD,150))
CAST_AI(boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who);
CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who);
}
void UpdateAI(const uint32 diff)
@@ -421,53 +491,23 @@ struct mob_hellfire_sentryAI : public ScriptedAI
if (Unit *victim = me->getVictim())
DoCast(victim, SPELL_KIDNEY_SHOT);
KidneyShot_Timer = 20000;
} else KidneyShot_Timer -= diff;
}
else
KidneyShot_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* Creature) const
{
return new mob_hellfire_sentryAI (Creature);
}
};
CreatureAI* GetAI_boss_vazruden_the_herald(Creature* pCreature)
{
return new boss_vazruden_the_heraldAI (pCreature);
}
CreatureAI* GetAI_boss_vazruden(Creature* pCreature)
{
return new boss_vazrudenAI (pCreature);
}
CreatureAI* GetAI_boss_nazan(Creature* pCreature)
{
return new boss_nazanAI (pCreature);
}
CreatureAI* GetAI_mob_hellfire_sentry(Creature* pCreature)
{
return new mob_hellfire_sentryAI (pCreature);
}
void AddSC_boss_vazruden_the_herald()
{
Script *newscript;
newscript = new Script;
newscript->Name = "boss_vazruden_the_herald";
newscript->GetAI = &GetAI_boss_vazruden_the_herald;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "boss_vazruden";
newscript->GetAI = &GetAI_boss_vazruden;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "boss_nazan";
newscript->GetAI = &GetAI_boss_nazan;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "mob_hellfire_sentry";
newscript->GetAI = &GetAI_mob_hellfire_sentry;
newscript->RegisterSelf();
new boss_vazruden_the_herald();
new boss_vazruden();
new boss_nazan();
new mob_hellfire_sentry();
}
@@ -25,24 +25,39 @@ EndScriptData */
#include "ScriptPCH.h"
#define SAY_TAUNT -1543000
#define SAY_HEAL -1543001
#define SAY_SURGE -1543002
#define SAY_AGGRO_1 -1543003
#define SAY_AGGRO_2 -1543004
#define SAY_AGGRO_3 -1543005
#define SAY_KILL_1 -1543006
#define SAY_KILL_2 -1543007
#define SAY_DIE -1543008
#define SPELL_MORTAL_WOUND 30641
#define H_SPELL_MORTAL_WOUND 36814
#define SPELL_SURGE 34645
#define SPELL_RETALIATION 22857
struct boss_watchkeeper_gargolmarAI : public ScriptedAI
enum eSays
{
boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c)
SAY_TAUNT = -1543000,
SAY_HEAL = -1543001,
SAY_SURGE = -1543002,
SAY_AGGRO_1 = -1543003,
SAY_AGGRO_2 = -1543004,
SAY_AGGRO_3 = -1543005,
SAY_KILL_1 = -1543006,
SAY_KILL_2 = -1543007,
SAY_DIE = -1543008,
};
enum eSpells
{
SPELL_MORTAL_WOUND = 30641,
H_SPELL_MORTAL_WOUND = 36814,
SPELL_SURGE = 34645,
SPELL_RETALIATION = 22857,
};
class boss_watchkeeper_gargolmar : public CreatureScript
{
public:
boss_watchkeeper_gargolmar()
: CreatureScript("boss_watchkeeper_gargolmar")
{
}
struct boss_watchkeeper_gargolmarAI : public ScriptedAI
{
boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature)
{
}
@@ -108,7 +123,9 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
{
DoCast(me->getVictim(), SPELL_MORTAL_WOUND);
MortalWound_Timer = 5000+rand()%8000;
} else MortalWound_Timer -= diff;
}
else
MortalWound_Timer -= diff;
if (Surge_Timer <= diff)
{
@@ -118,7 +135,9 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
DoCast(pTarget, SPELL_SURGE);
Surge_Timer = 5000+rand()%8000;
} else Surge_Timer -= diff;
}
else
Surge_Timer -= diff;
if ((me->GetHealth()*100) / me->GetMaxHealth() < 20)
{
@@ -126,7 +145,9 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
{
DoCast(me, SPELL_RETALIATION);
Retaliation_Timer = 30000;
} else Retaliation_Timer -= diff;
}
else
Retaliation_Timer -= diff;
}
if (!YelledForHeal)
@@ -140,19 +161,16 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
DoMeleeAttackIfReady();
}
};
};
CreatureAI* GetAI_boss_watchkeeper_gargolmarAI(Creature* pCreature)
{
return new boss_watchkeeper_gargolmarAI (pCreature);
}
CreatureAI* GetAI(Creature* Creature) const
{
return new boss_watchkeeper_gargolmarAI (Creature);
}
};
void AddSC_boss_watchkeeper_gargolmar()
{
Script *newscript;
newscript = new Script;
newscript->Name = "boss_watchkeeper_gargolmar";
newscript->GetAI = &GetAI_boss_watchkeeper_gargolmarAI;
newscript->RegisterSelf();
new boss_watchkeeper_gargolmar();
}
@@ -26,9 +26,17 @@ EndScriptData */
#include "ScriptPCH.h"
#include "hellfire_ramparts.h"
struct instance_ramparts : public ScriptedInstance
class instance_ramparts : public InstanceMapScript
{
instance_ramparts(Map* pMap) : ScriptedInstance(pMap) {Initialize();}
public:
instance_ramparts()
: InstanceMapScript("instance_ramparts")
{
}
struct instance_ramparts_InstanceMapScript : public ScriptedInstance
{
instance_ramparts_InstanceMapScript(Map* pMap) : ScriptedInstance(pMap) {Initialize();}
uint32 m_auiEncounter[MAX_ENCOUNTER];
uint64 m_uiChestNGUID;
@@ -46,8 +54,12 @@ struct instance_ramparts : public ScriptedInstance
{
switch(pGo->GetEntry())
{
case 185168: m_uiChestNGUID = pGo->GetGUID(); break;
case 185169: m_uiChestHGUID = pGo->GetGUID(); break;
case 185168:
m_uiChestNGUID = pGo->GetGUID();
break;
case 185169:
m_uiChestHGUID = pGo->GetGUID();
break;
}
}
@@ -69,18 +81,15 @@ struct instance_ramparts : public ScriptedInstance
break;
}
}
};
};
InstanceData* GetInstanceData_instance_ramparts(Map* pMap)
{
return new instance_ramparts(pMap);
}
InstanceData* GetInstanceData(Map* pMap) const
{
return new instance_ramparts_InstanceMapScript(pMap);
}
};
void AddSC_instance_ramparts()
{
Script* pNewScript;
pNewScript = new Script;
pNewScript->Name = "instance_ramparts";
pNewScript->GetInstanceData = &GetInstanceData_instance_ramparts;
pNewScript->RegisterSelf();
new instance_ramparts;
}