-
-
Save ReluctantX/6259551 to your computer and use it in GitHub Desktop.
sha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ScriptMgr.h" | |
#include "ScriptedCreature.h" | |
#include "SpellScript.h" | |
#include "SpellAuraEffects.h" | |
#include "Player.h" | |
enum Spells | |
{ | |
SPELL_CORRUPTED_FEAR = 160000, | |
SPELL_SHA_VOLLEY = 160001, | |
SPELL_SHA_BOLT = 160003, | |
}; | |
enum Events | |
{ | |
EVENT_CORRUPTED_FEAR = 1, | |
EVENT_SHA_BOLT = 2, | |
EVENT_SHA_VOLLEY = 3, | |
}; | |
enum Bosses | |
{ | |
SHA_OF_ANGER =900500, | |
}; | |
/// SHA OF ANGER TEXT | |
#define SHA_AGGRO_TEXT "You will know fear!" | |
#define SHA_DEATH_TEXT "Narrggh this cannot be..." | |
class boss_sha_of_anger : public CreatureScript | |
{ | |
public: | |
boss_sha_of_anger() : CreatureScript("boss_guru_sha") { } | |
struct boss_sha_of_angerAI : public BossAI | |
{ | |
boss_sha_of_angerAI(Creature* creature) : BossAI(creature, SHA_OF_ANGER) | |
{ | |
} | |
void Reset() | |
{ | |
_Reset(); | |
} | |
void EnterCombat(Unit* /*who*/) | |
{ | |
_EnterCombat(); | |
me->MonsterYell(SHA_AGGRO_TEXT, 0, 0); | |
events.ScheduleEvent(EVENT_SHA_BOLT, urand(2000, 4000)); | |
events.ScheduleEvent(EVENT_SHA_VOLLEY, 7000); | |
events.ScheduleEvent(EVENT_CORRUPTED_FEAR, 30000); | |
} | |
void UpdateAI(uint32 diff) | |
{ | |
if (!UpdateVictim()) | |
return; | |
events.Update(diff); | |
while (uint32 eventId = events.ExecuteEvent()) | |
{ | |
switch (eventId) | |
{ | |
case EVENT_SHA_BOLT: | |
{ | |
DoCast(me, SPELL_SHA_BOLT); | |
events.ScheduleEvent(EVENT_SHA_BOLT, urand(2000, 4000)); | |
break; | |
} | |
case EVENT_CORRUPTED_FEAR: | |
{ | |
if (SelectTarget(SELECT_TARGET_RANDOM, 0)) | |
DoCastVictim(SPELL_CORRUPTED_FEAR); | |
events.ScheduleEvent(EVENT_CORRUPTED_FEAR, 30000); | |
break; | |
} | |
case EVENT_SHA_VOLLEY: | |
{ | |
if (SelectTarget(SELECT_TARGET_RANDOM, 0)) | |
DoCastVictim(SPELL_SHA_VOLLEY); | |
events.ScheduleEvent(EVENT_SHA_VOLLEY, 7000); | |
break; | |
} | |
} | |
DoMeleeAttackIfReady(); | |
} | |
void KilledUnit(Unit* who) | |
{ | |
} | |
void JustDied(Unit* /*killer*/) | |
{ | |
_JustDied(); | |
me->MonsterYell(SHA_DEATH_TEXT, 0, 0); | |
} | |
CreatureAI* GetAI(Creature* creature) const | |
{ | |
return new boss_sha_of_angerAI(creature); | |
} | |
}; | |
void AddSC_boss_guru_sha() | |
{ | |
new boss_sha_of_anger(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment