Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. void Reset()
  2. {
  3. events.Reset();
  4. DoCast(me, SPELL_WIKKET_BOND, true);
  5. DoCast(me, SPELL_SHARED_HEALTH, true);
  6.  
  7. if (!intro)
  8. {
  9. SetFlyMode(true);
  10. me->SetReactState(REACT_PASSIVE);
  11. me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_ATTACKABLE_1);
  12. DoCast(me, SPELL_MAGIC_MAGNIFICENT, true);
  13.  
  14. events.ScheduleEvent(EVENT_1, 500);
  15. events.ScheduleEvent(EVENT_2, 12000);
  16. }
  17. }
  18.  
  19. void MovementInform(uint32 type, uint32 id)
  20. {
  21. if (type == POINT_MOTION_TYPE)
  22. {
  23. if (id == 1)
  24. events.ScheduleEvent(EVENT_3, 6000);
  25. }
  26. }
  27.  
  28. void UpdateAI(uint32 diff)
  29. {
  30. if (!UpdateVictim() && intro)
  31. return;
  32.  
  33. events.Update(diff);
  34.  
  35. if (me->HasUnitState(UNIT_STATE_CASTING))
  36. return;
  37.  
  38. while (uint32 eventId = events.ExecuteEvent())
  39. {
  40. switch (eventId)
  41. {
  42. case EVENT_1:
  43. DoCast(me, SPELL_NAUGHTY_INTRO_CONVERS, true);
  44. break;
  45. case EVENT_2:
  46. me->GetMotionMaster()->MovePoint(1, -10891.55f, -1761.89f, 91.1f, false);
  47. me->SetHomePosition(-10891.54f, -1761.89f, 90.47f);
  48. break;
  49. case EVENT_3:
  50. SetFlyMode(false);
  51. me->RemoveAurasDueToSpell(SPELL_MAGIC_MAGNIFICENT);
  52. break;
  53. }
  54. }
  55. DoMeleeAttackIfReady();
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement