Horde Boss
Horde Boss
h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
#include "Player.h"
enum eNums
{
SPELL_FROSTSHOCK = 23115,
SPELL_CHILL = 21098,
SPELL_ICEBLOCK = 41590,
};
uint32 Frostshock_Timer;
uint32 Chill_Timer;
int phase;
int percentPassed;
void Reset()
{
me->SetHealth(me->GetMaxHealth());
phase = 1;
percentPassed = 0;
Frostshock_Timer = 8000;
Chill_Timer = 3000;
}
void EnterCombat(Unit * /*who*/)
{
percentPassed = 1;
}
void JustDied(Unit* pPlayer)
{
char msg[250];
snprintf(msg, 250, "|cffff0000[Event System]|r The |cff00ccff
Alliance|r have won the Horde vs Alliance event! ", pPlayer->GetName()); // The
message
sWorld->SendGlobalText(msg, NULL);
}
void UpdateAI(const uint32 uiDiff)
{
ScriptedAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;
if (Chill_Timer<= uiDiff)
{
DoCast(me->getVictim(), SPELL_CHILL);
Chill_Timer = 3000;
}
else
Chill_Timer -= uiDiff;
DoMeleeAttackIfReady();
switch (phase)
{
case 1:
if (percentPassed == 2)
{
phase = 2;
}
break;
}
}
};
};
void AddSC_hordeboss()
{
new horde_boss();
}