Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. enum Spells
  4. {
  5. FROST_BLAST = 27808,
  6. GREATER_HEALING_WAVE = 77472
  7. };
  8.  
  9. class Test : public CreatureScript
  10. {
  11. public:
  12. Test() : CreatureScript("Test"){}
  13.  
  14. CreatureAI*GetAI(Creature*pCreature) const
  15. {
  16. return new TestAI (pCreature);
  17. }
  18.  
  19. struct TestAI : public ScriptAI
  20. {
  21. TestAI(Creature* c) : ScriptAI(c, TEST){}
  22.  
  23. uint32 phase;
  24.  
  25. void EnterCombat (Unit * /*Who*/)
  26. {
  27. _EnterCombat();
  28. me->MonsterSay("It's simply! You gona DIE! ",LANG_UNIVERSAL,NULL);
  29. }
  30.  
  31. void UpdateAI(const uint32 uiDiff)
  32. {
  33. switch(phase)
  34. {
  35. case 1 :
  36. if(me->HealthBelowPct(30))
  37. {break} else {DoCast(me->getVictim(), FROST_BLAST);}
  38. case 2 :
  39. Docast(me, GREATER_HEALING_WAVE);
  40.  
  41. }
  42. }
  43. };
  44. };
  45.  
  46. void AddSC_Test()
  47. {
  48. new Test();
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement