boss_kuai_the_brute_AI(Creature* creature) : BossAI(creature, BOSS_KUAI_THE_BRUTE) { TempSummon* sum = me->SummonCreature(CREATURE_MU_SHIBA, me->GetPositionX() + 3 * cos(M_PI / 4), me->GetPositionY() + 3 * sin(M_PI / 4), me->GetPositionZ(), me->GetOrientation()); if (sum) { pet_guid = sum->GetGUID(); sum->setFaction(me->getFaction()); } }
void UpdateAI(const uint32 diff) { events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_TALK_LOREWALKER_DESPAWN: me->ForcedDespawn(); break; // This is the first speech when Lorewalker stonestep sees you for the first time. case EVENT_INTRO_0: Talk(EVENT_TALK_INTRO_0); //419621722 events.ScheduleEvent(EVENT_INTRO_1, 8019); break; case EVENT_INTRO_1: Talk(EVENT_TALK_INTRO_1); //419629741 events.ScheduleEvent(EVENT_INTRO_2, 16162); break; case EVENT_INTRO_2: Talk(EVENT_TALK_INTRO_2); //419645903 events.ScheduleEvent(EVENT_INTRO_3, 9578); break; case EVENT_INTRO_3: Talk(EVENT_TALK_INTRO_3); //419655481 break; // End of the first speech. // TRIAL: Speech when the scroll is destroyed. case EVENT_SUN_0: me->RemoveAura(SPELL_ROOT_SELF); Talk(EVENT_TALK_ZAO_APPEARS_0); //419667540 events.ScheduleEvent(EVENT_SUN_1, 9641); break; case EVENT_SUN_1: Talk(EVENT_TALK_ZAO_APPEARS_1); //419677181 me->GetMotionMaster()->MovePoint(0, 838.033f, -2480.518f, 176.744f); events.ScheduleEvent(EVENT_SUN_2, 811); break; case EVENT_SUN_2: Talk(EVENT_TALK_ZAO_APPEARS_2); //419677992 me->GetMotionMaster()->MovePoint(0, 834.643f, -2490.361f, 179.897f); events.ScheduleEvent(EVENT_SUN_3, 2792); break; case EVENT_SUN_3: Talk(EVENT_TALK_ZAO_APPEARS_3); //419680784 me->SetFacingTo(1.239f); instance->SetData(TYPE_SET_SUNS_SELECTABLE, 0); events.ScheduleEvent(EVENT_SUN_4, 4214); break; case EVENT_SUN_4: me->CastSpell(me, SPELL_MEDITATION, false); Talk(EVENT_TALK_ZAO_APPEARS_4); //419722998 break; // TRIAL: End of speech for destroyed scroll. // ZAO: Speech when the scroll is destroyed. case EVENT_STRIFE_0: me->RemoveAura(SPELL_ROOT_SELF); Talk(EVENT_TALK_STRIFE_0); //419667540 events.ScheduleEvent(EVENT_STRIFE_1, 9641); break; case EVENT_STRIFE_1: Talk(EVENT_TALK_STRIFE_1); //419677181 me->GetMotionMaster()->MovePoint(0, 838.033f, -2480.518f, 176.744f); events.ScheduleEvent(EVENT_STRIFE_2, 8011); break; case EVENT_STRIFE_2: Talk(EVENT_TALK_STRIFE_2); //419677992 me->GetMotionMaster()->MovePoint(0, 834.643f, -2490.361f, 179.897f); events.ScheduleEvent(EVENT_STRIFE_3, 5092); break; case EVENT_STRIFE_3: { Talk(EVENT_TALK_STRIFE_3); //419680784 me->SetFacingTo(1.239f); events.ScheduleEvent(EVENT_STRIFE_4, 6014); TempSummon* temp = me->SummonCreature(CREATURE_OSONG, 842.752f, -2468.911f, 174.959f); if (!temp) break; temp->setFaction(14); temp->Attack(SelectTarget(SELECT_TARGET_RANDOM), true); temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); temp->SetFacingTo(1.239f); sCreatureTextMgr->SendChat(temp, 0, 0); } break; case EVENT_STRIFE_4: me->CastSpell(me, SPELL_MEDITATION, false); Talk(EVENT_TALK_STRIFE_4); //419722998 events.ScheduleEvent(EVENT_TALK_LOREWALKER_DESPAWN, 3000); break; // ZAO: End of speech for destroyed scroll. } } }