Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Reset()
- {
- events.Reset();
- DoCast(me, SPELL_WIKKET_BOND, true);
- DoCast(me, SPELL_SHARED_HEALTH, true);
- if (!intro)
- {
- SetFlyMode(true);
- me->SetReactState(REACT_PASSIVE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_ATTACKABLE_1);
- DoCast(me, SPELL_MAGIC_MAGNIFICENT, true);
- events.ScheduleEvent(EVENT_1, 500);
- events.ScheduleEvent(EVENT_2, 12000);
- }
- }
- void MovementInform(uint32 type, uint32 id)
- {
- if (type == POINT_MOTION_TYPE)
- {
- if (id == 1)
- events.ScheduleEvent(EVENT_3, 6000);
- }
- }
- void UpdateAI(uint32 diff)
- {
- if (!UpdateVictim() && intro)
- return;
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_1:
- DoCast(me, SPELL_NAUGHTY_INTRO_CONVERS, true);
- break;
- case EVENT_2:
- me->GetMotionMaster()->MovePoint(1, -10891.55f, -1761.89f, 91.1f, false);
- me->SetHomePosition(-10891.54f, -1761.89f, 90.47f);
- break;
- case EVENT_3:
- SetFlyMode(false);
- me->RemoveAurasDueToSpell(SPELL_MAGIC_MAGNIFICENT);
- break;
- }
- }
- DoMeleeAttackIfReady();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement