Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum BossSpells
- {
- SPELL_IMPALE = 56090,
- SPELL_UNHOLYSHADOW = 57369,
- };
- class boss_wowjp_manual : public CreatureScript
- {
- public:
- boss_wowjp_manual() : CreatureScript("boss_wowjp_manual") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_wowjp_manualAI (creature);
- }
- struct boss_wowjp_manualAI : public ScriptedAI
- {
- boss_wowjp_manualAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
- InstanceScript* instance;
- uint32 ImpaleTimer;
- uint32 UnholyshadowTimer;
- void Reset()
- {
- ImpaleTimer = 30000;
- UnholyshadowTimer = 65000;
- }
- void EnterCombat(Unit* /*who*/)
- {
- me->MonsterYell("Your death will come now!", LANG_UNIVERSAL, NULL);
- }
- void JustDied(Unit* /*pKiller*/)
- {
- me->MonsterYell("You have deceived me! My time will come ...", LANG_UNIVERSAL, NULL);
- }
- void UpdateAI(const uint32 diff)
- {
- if (ImpaleTimer <= diff)
- {
- if (Unit* target = SELECT_TARGET_RANDOM)
- DoCast(target, SPELL_IMPALE);
- ImpaleTimer = 30000;
- } else ImpaleTimer -= diff;
- if (UnholyshadowTimer <= diff)
- {
- if (Unit* target = SELECT_TARGET_RANDOM)
- DoCast(target, SPELL_UNHOLYSHADOW);
- UnholyshadowTimer = 65000;
- } else UnholyshadowTimer -= diff;
- DoMeleeAttackIfReady();
- }
- };
- };
- void AddSC_boss_wowjp_manual()
- {
- new boss_wowjp_manual();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement