Last active
December 14, 2015 07:09
-
-
Save Dominent/5048287 to your computer and use it in GitHub Desktop.
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
/***********************************************, | |
* Creator: Dominent for ac - web | |
* Creature: Taragaman the Hungerer | |
* Made because: Eductional purposes. | |
* A big thanks for: QQrofl, Rochet2, Jameyboor and all other ac webers who helped me and are helping me atm. * | |
************************************************' | |
*/ | |
#include "ScriptPCH.h" | |
enum spells | |
{ | |
SPELL_FIRE_NOVA = 11970, | |
SPELL_UPPERCUT = 18072 | |
}; | |
class boss_taragaman_the_hungerer: public CreatureScript | |
{ | |
public: | |
boss_taragaman_the_hungerer() : CreatureScript("boss_taragaman_the_hungerer"){} | |
CreatureAI* GetAI_example(Creature* pCreature) const | |
{ | |
return new boss_taragaman_the_hungererAI(pCreature); | |
} | |
struct boss_taragaman_the_hungererAI : public ScriptedAI | |
{ | |
boss_taragaman_the_hungererAI(Creature *c) : ScriptedAI(c) {} | |
uint32 Fire_Nova_Timer; | |
uint32 Uppercut_Timer; | |
void Reset() | |
{ | |
if(!me-> isInCombat() | |
} | |
{ | |
Fire_Nova_Timer = urand(8000, 25000); | |
Uppercut_Timer = urand(5000, 20000); | |
} | |
void UpdateAI(const uint32 uiDiff) | |
{ | |
if (!UpdateVictim()) | |
return; | |
if (Fire_Nova_Timer <= diff) | |
{ | |
DoCast(me->getVictim(), SPELL_Fire_Nova); | |
} | |
else | |
Fire_Nova_Timer -= diff; | |
if (Uppercut_Timer <= diff) | |
{ | |
DoCast(me->getVictim(), SPELL_Uppercut); | |
} | |
else | |
Uppercut_Timer -= diff; | |
DoMeleeAttackIfReady(); | |
} | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment