*Base script for Maiden of Grief in Halls of Stone by Elron
--HG-- branch : trunk
This commit is contained in:
+82
-18
@@ -13,55 +13,119 @@ update creature_template set scriptname = 'boss_maiden_of_grief' where entry = '
|
||||
|
||||
//Spell
|
||||
#define SPELL_PARTING_SORROW 59723
|
||||
#define SPELL_STORM_OF_GRIEF 50752
|
||||
#define SPELL_STORM_OF_GRIEF_2 59772
|
||||
#define SPELL_SHOCK_OF_SORROW 50760
|
||||
#define SPELL_SHOCK_OF_SORROW_2 59726
|
||||
#define SPELL_PILLAR_OF_WOE 50761
|
||||
#define SPELL_PILLAR_OF_WOE_2 59727
|
||||
#define SPELL_STORM_OF_GRIEF_N 50752
|
||||
#define SPELL_STORM_OF_GRIEF_H 59772
|
||||
#define SPELL_SHOCK_OF_SORROW_N 50760
|
||||
#define SPELL_SHOCK_OF_SORROW_H 59726
|
||||
#define SPELL_PILLAR_OF_WOE_N 50761
|
||||
#define SPELL_PILLAR_OF_WOE_H 59727
|
||||
|
||||
//not in db
|
||||
//Yell
|
||||
#define SAY_AGGRO -1599004
|
||||
#define SAY_SLAY_1 -1599005
|
||||
#define SAY_SLAY_2 -1599006
|
||||
#define SAY_SLAY_3 -1599007
|
||||
#define SAY_SLAY_4 -1599008
|
||||
#define SAY_DEATH -1599009
|
||||
#define SAY_STUN -1599010
|
||||
#define SAY_AGGRO -1603000
|
||||
#define SAY_SLAY_1 -1603001
|
||||
#define SAY_SLAY_2 -1603002
|
||||
#define SAY_SLAY_3 -1603003
|
||||
#define SAY_SLAY_4 -1603004
|
||||
#define SAY_DEATH -1603005
|
||||
#define SAY_STUN -1603006
|
||||
|
||||
struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI
|
||||
{
|
||||
boss_maiden_of_griefAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_maiden_of_griefAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = m_creature->GetInstanceData();
|
||||
IsHeroic = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
bool IsHeroic;
|
||||
|
||||
uint32 PartingSorrowTimer;
|
||||
uint32 StormOfGriefTimer;
|
||||
uint32 ShockOfSorrowTimer;
|
||||
uint32 PillarOfWoeTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
PartingSorrowTimer = 25000 + rand()%5000;
|
||||
StormOfGriefTimer = 10000;
|
||||
ShockOfSorrowTimer = 20000+rand()%5000;
|
||||
PillarOfWoeTimer = 5000 + rand()%10000;
|
||||
|
||||
//Missing support for instance data (and door?)
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
//Missing support for instance data (and door?)
|
||||
}
|
||||
void AttackStart(Unit* who) {}
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(IsHeroic)
|
||||
{
|
||||
if (PartingSorrowTimer < diff)
|
||||
{
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if(target)
|
||||
DoCast(target,SPELL_PARTING_SORROW);
|
||||
|
||||
PartingSorrowTimer = 30000 + rand()%10000;
|
||||
}else PartingSorrowTimer -= diff;
|
||||
}
|
||||
|
||||
if (StormOfGriefTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),IsHeroic ? SPELL_STORM_OF_GRIEF_H : SPELL_STORM_OF_GRIEF_N, true);
|
||||
StormOfGriefTimer = 15000 + rand()%5000;
|
||||
}else StormOfGriefTimer -= diff;
|
||||
|
||||
if (ShockOfSorrowTimer < diff)
|
||||
{
|
||||
DoResetThreat();
|
||||
DoScriptText(SAY_STUN, m_creature);
|
||||
DoCast(m_creature,IsHeroic ? SPELL_SHOCK_OF_SORROW_H : SPELL_SHOCK_OF_SORROW_N);
|
||||
ShockOfSorrowTimer = 20000 + rand()%10000;
|
||||
}else ShockOfSorrowTimer -= diff;
|
||||
|
||||
if (PillarOfWoeTimer < diff)
|
||||
{
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if(target)
|
||||
DoCast(target,IsHeroic ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE_N);
|
||||
else
|
||||
DoCast(m_creature->getVictim(),IsHeroic ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE_N);
|
||||
|
||||
PillarOfWoeTimer = 5000 + rand()%20000;
|
||||
}else PillarOfWoeTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
//Missing support for instance data (and door?)
|
||||
}
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
switch(rand()%3)
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY_1, m_creature);break;
|
||||
case 1: DoScriptText(SAY_SLAY_2, m_creature);break;
|
||||
case 2: DoScriptText(SAY_SLAY_3, m_creature);break;
|
||||
case 3: DoScriptText(SAY_SLAY_4, m_creature);break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -288,6 +288,7 @@ extern void AddSC_boss_loken();
|
||||
extern void AddSC_boss_ionar();
|
||||
extern void AddSC_boss_volkhan();
|
||||
extern void AddSC_instance_halls_of_lightning();
|
||||
extern void AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone
|
||||
extern void AddSC_boss_auriaya(); //Ulduar Ulduar
|
||||
extern void AddSC_boss_flame_leviathan();
|
||||
extern void AddSC_boss_ignis();
|
||||
@@ -683,6 +684,7 @@ void AddScripts()
|
||||
AddSC_boss_ionar();
|
||||
AddSC_boss_volkhan();
|
||||
AddSC_instance_halls_of_lightning();
|
||||
AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone
|
||||
AddSC_boss_auriaya(); //Ulduar Ulduar
|
||||
AddSC_boss_flame_leviathan();
|
||||
AddSC_boss_ignis();
|
||||
|
||||
Reference in New Issue
Block a user