Advertisement
Dazzle104

Untitled

Jan 16th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. enum BossSpells
  2. {
  3. SPELL_IMPALE = 56090,
  4. SPELL_UNHOLYSHADOW = 57369,
  5. };
  6.  
  7. class boss_wowjp_manual : public CreatureScript
  8. {
  9. public:
  10. boss_wowjp_manual() : CreatureScript("boss_wowjp_manual") { }
  11.  
  12. CreatureAI* GetAI(Creature* creature) const
  13. {
  14. return new boss_wowjp_manualAI (creature);
  15. }
  16.  
  17. struct boss_wowjp_manualAI : public ScriptedAI
  18. {
  19. boss_wowjp_manualAI(Creature* creature) : ScriptedAI(creature)
  20. {
  21. instance = creature->GetInstanceScript();
  22. }
  23.  
  24. InstanceScript* instance;
  25.  
  26. uint32 ImpaleTimer;
  27. uint32 UnholyshadowTimer;
  28.  
  29. void Reset()
  30. {
  31. ImpaleTimer = 30000;
  32. UnholyshadowTimer = 65000;
  33. }
  34.  
  35. void EnterCombat(Unit* /*who*/)
  36. {
  37. me->MonsterYell("Your death will come now!", LANG_UNIVERSAL, NULL);
  38. }
  39.  
  40. void JustDied(Unit* /*pKiller*/)
  41. {
  42. me->MonsterYell("You have deceived me! My time will come ...", LANG_UNIVERSAL, NULL);
  43. }
  44.  
  45. void UpdateAI(const uint32 diff)
  46. {
  47. if (ImpaleTimer <= diff)
  48. {
  49. if (Unit* target = SELECT_TARGET_RANDOM)
  50. DoCast(target, SPELL_IMPALE);
  51.  
  52. ImpaleTimer = 30000;
  53. } else ImpaleTimer -= diff;
  54.  
  55. if (UnholyshadowTimer <= diff)
  56. {
  57. if (Unit* target = SELECT_TARGET_RANDOM)
  58. DoCast(target, SPELL_UNHOLYSHADOW);
  59.  
  60. UnholyshadowTimer = 65000;
  61. } else UnholyshadowTimer -= diff;
  62.  
  63. DoMeleeAttackIfReady();
  64. }
  65. };
  66. };
  67.  
  68. void AddSC_boss_wowjp_manual()
  69. {
  70. new boss_wowjp_manual();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement