void UpdateAI(const uint32 diff) { if(!pInstance) return; ScriptedAI::UpdateAI(diff); UpdateTimer = pInstance->GetData(SPECHIAL_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(PHASE_SPECHIAL)) { case 5: DoScriptText(SAY_INTRO_GOMROK_START_1, me); pInstance->SetData(PHASE_SPECHIAL, 6); pInstance->SetData(SPECHIAL_TIMER, 5000); break; case 33: if(pInstance->GetData(PHASE_4)==DONE) { DoScriptText(SAY_JARAXXUS_OUTRO_2, me); pInstance->SetData(PHASE_SPECHIAL, 34); pInstance->SetData(SPECHIAL_TIMER, 30500); } break; } } else { UpdateTimer -= diff; pInstance->SetData(SPECHIAL_TIMER, UpdateTimer); } }
void JustDied(Unit* Killer) { if (pInstance->GetData(DATA_SACROLASH) == DONE) { DoScriptText(YELL_ALY_DEAD, me); pInstance->SetData(DATA_EREDAR_TWINS_EVENT, DONE); } else me->SetLootRecipient(NULL); pInstance->SetData(DATA_ALYTHESS, DONE); }
bool GOHello_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) { InstanceData* pInstance = pGo->GetInstanceData(); if (!pInstance) return false; if (pGo->GetEntry() == ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE) pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL); if (pGo->GetEntry() == ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL); return true; }
void JustDied(Unit*) { if(pHalion->isAlive()) pHalion->DealDamage(pHalion, pHalion->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); pInstance->SetData(DATA_HALION_EVENT, DONE); DoScriptText(SAY_DEATH, me); }
void EnterCombat(Unit*) { pInstance->SetData(DATA_HALION_EVENT, IN_PROGRESS); DoCast(me, SPELL_TWILIGHT_PRECISION); pHalionTwilight->SetInCombatWithZone(); DoScriptText(SAY_AGGRO, me); }
void SetData(uint32 a, uint32 b) { if(a == 1 && b == 1 && pInstance->GetData(DATA_EREDAR_TWINS_INTRO) == NOT_STARTED) { IntroStepCounter = 0; pInstance->SetData(DATA_EREDAR_TWINS_INTRO, IN_PROGRESS); } }
void Reset() { ShadowbladesTimer = 10000; SpecialTimer = 30000; ConfoundingblowTimer = 25000; ShadowimageTimer = 14000; EnrageTimer = 360000; DoCast(me, SPELL_SHADOWFORM); DoCast(me, SPELL_DUAL_WIELD); if (pInstance->GetData(DATA_EREDAR_TWINS_INTRO) == DONE) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); else me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pInstance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED); pInstance->SetData(DATA_SACROLASH, NOT_STARTED); }
void JustReachedHome() { if(pInstance) pInstance->SetData(DATA_HALION_EVENT, FAIL); GameObject *pGOTemp = GetClosestGameObjectWithEntry(me, 7999000, 100.0f); if(pGOTemp) pGOTemp->RemoveFromWorld(); }
void EnterCombat(Unit*) { me->SummonGameObject(7999000, 3154.56, 535.418, 72.8889, 4.47206, 0, 0, 0.786772, -0.617243, 0); if (pInstance) { pInstance->SetData(DATA_HALION_EVENT, IN_PROGRESS); DoScriptText(SAY_AGGRO, me); } }
void EnterEvadeMode() { if (pInstance->GetData(DATA_SACROLASH) == DONE) { if(Unit* Sacrolash = me->GetUnit(pInstance->GetData64(DATA_SACROLASH))) Sacrolash->ToCreature()->Respawn(); pInstance->SetData(DATA_SACROLASH, NOT_STARTED); } ScriptedAI::EnterEvadeMode(); }
void EnterEvadeMode() { if (pInstance->GetData(DATA_ALYTHESS) == DONE) { if(Unit* Alythess = me->GetUnit(pInstance->GetData64(DATA_ALYTHESS))) Alythess->ToCreature()->Respawn(); pInstance->SetData(DATA_ALYTHESS, NOT_STARTED); } ScriptedAI::EnterEvadeMode(); }
void Reset() { SpecialTimer = urand(15000, 19000); PyrogenicsTimer = 15000; EnrageTimer = 360000; FlamesearTimer = urand(10000, 15000); IntroYellTimer = 500; IntroStepCounter = 10; IntroDone = false; TrashWaveDone = false; DoCast(me, SPELL_FIREFORM); if (pInstance->GetData(DATA_EREDAR_TWINS_INTRO) == DONE) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); else me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pInstance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED); pInstance->SetData(DATA_ALYTHESS, NOT_STARTED); SetAutocast(SPELL_BLAZE, 2700, true); }
void JustDied(Unit*) { GameObject *pGOTemp = GetClosestGameObjectWithEntry(me, 7999000, 100.0f); if(pGOTemp) pGOTemp->RemoveFromWorld(); if (pInstance) { pInstance->SetData(DATA_HALION_EVENT, DONE); DoScriptText(SAY_DEATH, me); } }
void JustDied(Unit*) { if(!pInstance) return; if(Trigger1) { Trigger1->DisappearAndDie(); } if(Trigger2) { Trigger2->DisappearAndDie(); } DoScriptText(SAY_DEATH, me); pInstance->SetData(DATA_ZARITHRIAN_EVENT, DONE); }
bool OnUse(Player* /*pPlayer*/, GameObject* pGo) override { InstanceData* pInstance = pGo->GetInstanceData(); if (!pInstance) { return false; } if (pInstance->GetData(TYPE_AVATAR) != IN_PROGRESS) { return false; } // Set data to special when flame is used pInstance->SetData(TYPE_AVATAR, SPECIAL); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); return true; }
bool GossipSelect_npc_tcrus_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { InstanceData* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if(!pInstance) return false; if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->CLOSE_GOSSIP_MENU(); pInstance->SetData(PHASE_SPECHIAL, 1); } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) { pPlayer->CLOSE_GOSSIP_MENU(); CAST_AI(npc_tcrus_announcerAI, pCreature->AI())->StartEvent(); } return true; }
void UpdateAI(const uint32 diff) { if(!pInstance) return; ScriptedAI::UpdateAI(diff); UpdateTimer = pInstance->GetData(SPECHIAL_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(PHASE_SPECHIAL)) { case 34: if(pInstance->GetData(PHASE_4)==DONE) { DoScriptText(SAY_JARAXXUS_OUTRO_3, me); pInstance->SetData(PHASE_SPECHIAL, 35); pInstance->SetData(SPECHIAL_TIMER, 27500); } break; case 51: if(pInstance->GetData(PHASE_5)==IN_PROGRESS) { DoScriptText(SAY_INTRO_FACTION_HORDE_2, me); pInstance->SetData(PHASE_SPECHIAL, 52); pInstance->SetData(SPECHIAL_TIMER, 25000); } break; case 53: DoScriptText(SAY_INTRO_FACTION_HORDE_4, me); pInstance->SetData(PHASE_SPECHIAL, 54); pInstance->SetData(SPECHIAL_TIMER, 25000); break; } } else { UpdateTimer -= diff; pInstance->SetData(SPECHIAL_TIMER, UpdateTimer); } }
uint32 IntroStep(uint32 step) { Creature* pSacrolash = me->GetCreature(pInstance->GetData64(DATA_SACROLASH)); if (!pSacrolash) return 0; switch (step) { case 0: return 0; case 1: DoScriptText(YELL_INTRO_SAC_1, pSacrolash); return 1000; case 2: DoScriptText(YELL_INTRO_ALY_2, me); return 1000; case 3: DoScriptText(YELL_INTRO_SAC_3, pSacrolash); return 2000; case 4: DoScriptText(YELL_INTRO_ALY_4, me); return 1000; case 5: DoScriptText(YELL_INTRO_SAC_5, pSacrolash); return 2000; case 6: DoScriptText(YELL_INTRO_ALY_6, me); return 1000; case 7: DoScriptText(YELL_INTRO_SAC_7, pSacrolash); return 3000; case 8: DoScriptText(YELL_INTRO_ALY_8, me); return 3000; case 9: pInstance->SetData(DATA_EREDAR_TWINS_INTRO, DONE); return 900000; default: return 10000; } }
bool OnUse(Player* /*pPlayer*/, GameObject* pGo) override { InstanceData* pInstance = pGo->GetInstanceData(); if (!pInstance) { return true; } if (pInstance->GetData(TYPE_SHRINE) == DONE) { return true; } if (pInstance->GetData(TYPE_KELRIS) == DONE) { pInstance->SetData(TYPE_SHRINE, IN_PROGRESS); return false; } return true; }
void Reset() { m_uiFieryCombustionTimer = 15000; m_uiMeteorStrikeTimer = 30000; m_uiFlameBreathTimer = 15000; m_uiBerserkTimer = 6000000; m_uiTailLashTimer = 10000; if (pInstance->instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) isMode25 = false; else isMode25 = true; bIntro = false; if (pInstance) pInstance->SetData(DATA_HALION_EVENT, NOT_STARTED); GameObject *pGOTemp = GetClosestGameObjectWithEntry(me, 7999000, 100.0f); if(pGOTemp) pGOTemp->RemoveFromWorld(); }
void Reset() { pInstance->SetData(SPECHIAL_TIMER, 2000); }
void EnterEvadeMode() { pInstance->SetData(DATA_HALION, NOT_STARTED); }
void EnterCombat(Unit*) { pInstance->SetData(DATA_ZARITHRIAN_EVENT, IN_PROGRESS); DoScriptText(SAY_AGGRO, me); }
void EnterCombat(Unit *who) { DoZoneInCombat(); pInstance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS); }
void StartEvent() { pInstance = (ScriptedInstance*)me->GetInstanceData(); if(pInstance && pInstance->GetData(PHASE_1) == NOT_STARTED && pInstance->GetData(PHASE_2) == NOT_STARTED && pInstance->GetData(PHASE_3) == NOT_STARTED && pInstance->GetData(PHASE_4) == NOT_STARTED && pInstance->GetData(PHASE_5) == NOT_STARTED && pInstance->GetData(PHASE_6) == NOT_STARTED && pInstance->GetData(PHASE_7) == NOT_STARTED) { pInstance->SetData(PHASE_1, IN_PROGRESS); } if(pInstance && pInstance->GetData(PHASE_1) == DONE && pInstance->GetData(PHASE_2) == DONE && pInstance->GetData(PHASE_3) == DONE && pInstance->GetData(PHASE_4) == NOT_STARTED && pInstance->GetData(PHASE_5) == NOT_STARTED && pInstance->GetData(PHASE_6) == NOT_STARTED && pInstance->GetData(PHASE_7) == NOT_STARTED) { pInstance->SetData(PHASE_4, IN_PROGRESS); } if(pInstance && pInstance->GetData(PHASE_1) == DONE && pInstance->GetData(PHASE_2) == DONE && pInstance->GetData(PHASE_3) == DONE && pInstance->GetData(PHASE_4) == DONE && pInstance->GetData(PHASE_5) == NOT_STARTED && pInstance->GetData(PHASE_6) == NOT_STARTED && pInstance->GetData(PHASE_7) == NOT_STARTED) { pInstance->SetData(PHASE_5, IN_PROGRESS); SummonChampions(); } if(pInstance && pInstance->GetData(PHASE_1) == DONE && pInstance->GetData(PHASE_2) == DONE && pInstance->GetData(PHASE_3) == DONE && pInstance->GetData(PHASE_4) == DONE && pInstance->GetData(PHASE_5) == DONE && pInstance->GetData(PHASE_6) == NOT_STARTED && pInstance->GetData(PHASE_7) == NOT_STARTED) { Fjola = me->SummonCreature(NPC_FJOLA, 565.11, 260.0, 397.09+4, 4.72, TEMPSUMMON_MANUAL_DESPAWN, 0); Fjola->SetFlying(true); Fjola->GetMotionMaster()->MovePoint(0, 579.90f, 172.35f, 394.68f); Eydis = me->SummonCreature(NPC_EYDIS, 563.11, 260.0, 397.09+4, 4.72, TEMPSUMMON_MANUAL_DESPAWN, 0); Eydis->SetFlying(true); Eydis->GetMotionMaster()->MovePoint(0, 548.57f, 172.59f, 394.68f); pInstance->SetData(PHASE_6, IN_PROGRESS); } if(pInstance && pInstance->GetData(PHASE_1) == DONE && pInstance->GetData(PHASE_2) == DONE && pInstance->GetData(PHASE_3) == DONE && pInstance->GetData(PHASE_4) == DONE && pInstance->GetData(PHASE_5) == DONE && pInstance->GetData(PHASE_6) == DONE && pInstance->GetData(PHASE_7) == NOT_STARTED) { pInstance->SetData(PHASE_7, IN_PROGRESS); pInstance->HandleGameObject(pInstance->GetData64(20), true); } }
void UpdateAI(const uint32 diff) { if(!pInstance) return; ScriptedAI::UpdateAI(diff); UpdateTimer = pInstance->GetData(SPECHIAL_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(PHASE_SPECHIAL)) { case 1: if(pInstance->GetData(PHASE_1)==0) { DoScriptText(SAY_INTRO_START, me); pInstance->SetData(PHASE_SPECHIAL, 2); pInstance->SetData(SPECHIAL_TIMER, 70000); } break; case 2: if(pInstance->GetData(PHASE_1)==0) { DoScriptText(SAY_INTRO_BEGINN, me); pInstance->SetData(PHASE_SPECHIAL, 3); pInstance->SetData(SPECHIAL_TIMER, 15000); } break; case 3: if(pInstance->GetData(PHASE_1)==0) { DoScriptText(SAY_INTRO_3, me); pInstance->SetData(PHASE_SPECHIAL, 4); pInstance->SetData(SPECHIAL_TIMER, 15000); } break; case 4: if(pInstance->GetData(PHASE_1)==0) { Gormok = me->SummonCreature(NPC_GORMOK_IMPALER, 563.14f, 215.38f, 395.08f, 4.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); Gormok->GetMotionMaster()->MovePoint(0, 563.74f, 173.53f, 394.32f); Gormok->SetReactState(REACT_PASSIVE); Gormok->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pInstance->SetData(PHASE_SPECHIAL, 5); pInstance->SetData(SPECHIAL_TIMER, 15000); } break; case 6: if(pInstance->GetData(PHASE_1)==0) { pInstance->SetData(PHASE_SPECHIAL, 7); pInstance->SetData(SPECHIAL_TIMER, 5000); } break; case 7: if(pInstance->GetData(PHASE_1)==0) { Creature* cre = Unit::GetCreature(*me, pInstance->GetData64(NPC_ANONSER)); CAST_AI(npc_tcrus_announcerAI, cre->AI())->StartEvent(); Gormok->SetReactState(REACT_AGGRESSIVE); Gormok->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pInstance->SetData(PHASE_SPECHIAL, 8); pInstance->SetData(SPECHIAL_TIMER, 6000); } break; case 8: if(pInstance->GetData(PHASE_1)==IN_PROGRESS) { pInstance->SetData(PHASE_SPECHIAL, 9); pInstance->SetData(SPECHIAL_TIMER, 500); } break; case 9: if(pInstance->GetData(PHASE_2)==IN_PROGRESS) { DoScriptText(SAY_INTRO_DREADSCALE, me); Dreadscale = me->SummonCreature(NPC_DREADSCALE,562.354675, 215.781113, 395.087036, 4.725680,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); Dreadscale->SetReactState(REACT_PASSIVE); Dreadscale->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); Dreadscale->GetMotionMaster()->MovePoint(0, 563.74f, 173.53f, 394.32f); Acidmaw = me->SummonCreature(NPC_ACIDMAW,546.526184, 157.534195, 394.320557, 4.725680,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); Acidmaw->SetVisibility(VISIBILITY_OFF); Acidmaw->SetReactState(REACT_PASSIVE); pInstance->SetData(PHASE_SPECHIAL, 10); pInstance->SetData(SPECHIAL_TIMER, 25000); } break; case 10: if(pInstance->GetData(PHASE_2)==IN_PROGRESS) { Acidmaw->SetVisibility(VISIBILITY_ON); Acidmaw->CastSpell(Acidmaw, 35177, false); Acidmaw->SetReactState(REACT_AGGRESSIVE); Dreadscale->SetReactState(REACT_AGGRESSIVE); Dreadscale->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pInstance->SetData(PHASE_SPECHIAL, 11); pInstance->SetData(SPECHIAL_TIMER, 5000); } break; case 11: if(pInstance->GetData(PHASE_3)==IN_PROGRESS) { IceHowl = me->SummonCreature(NPC_ICEHOWL, 563.14f, 215.38f, 395.08f, 4.68f, TEMPSUMMON_DEAD_DESPAWN, 600000); IceHowl->GetMotionMaster()->MovePoint(0, 563.74f, 173.53f, 394.32f); IceHowl->SetReactState(REACT_PASSIVE); IceHowl->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); DoScriptText(SAY_INTRO_EISHEULER, me); pInstance->SetData(PHASE_SPECHIAL, 12); pInstance->SetData(SPECHIAL_TIMER, 20000); } break; case 12: if(pInstance->GetData(PHASE_3)==IN_PROGRESS) { IceHowl->SetReactState(REACT_AGGRESSIVE); IceHowl->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); pInstance->SetData(PHASE_SPECHIAL, 13); pInstance->SetData(SPECHIAL_TIMER, 500); } break; case 13: if(pInstance->GetData(PHASE_3)==DONE) { DoScriptText(-1999930, me); pInstance->SetData(PHASE_SPECHIAL, 14); pInstance->SetData(SPECHIAL_TIMER, 500); } break; case 15: DoScriptText(SAY_JARAXXUS_INTRO_1, me); pInstance->SetData(PHASE_SPECHIAL, 16); Fizzle = me->SummonCreature(NPC_FIZZLEBANG, 564.008057, 176.066330, 394.372772, 4.719572, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); pInstance->SetData(SPECHIAL_TIMER, 500); break; case 29: DoScriptText(SAY_JARAXXUS_INTRO_7, me); pInstance->SetData(PHASE_SPECHIAL, 30); pInstance->SetData(SPECHIAL_TIMER, 10000); break; case 30: if (Creature* pJaraxxus = GetClosestCreatureWithEntry(me, NPC_LORD_JARAXXUS, 100.0f)) Jaraxxus = pJaraxxus; Jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); Jaraxxus->SetReactState(REACT_AGGRESSIVE); pInstance->SetData(PHASE_SPECHIAL, 31); pInstance->SetData(SPECHIAL_TIMER, 5000); break; case 31: if(pInstance->GetData(PHASE_4)==IN_PROGRESS) { pInstance->SetData(PHASE_SPECHIAL, 32); pInstance->SetData(SPECHIAL_TIMER, 5000); } break; case 32: if(pInstance->GetData(PHASE_4)==DONE) { DoScriptText(SAY_JARAXXUS_OUTRO_1, me); pInstance->SetData(PHASE_SPECHIAL, 33); pInstance->SetData(SPECHIAL_TIMER, 45500); } break; case 35: if(pInstance->GetData(PHASE_4)==DONE) { DoScriptText(SAY_JARAXXUS_OUTRO_4, me); pInstance->SetData(PHASE_SPECHIAL, 36); pInstance->SetData(SPECHIAL_TIMER, 15500); } break; case 37: DoScriptText(SAY_INTRO_LICHTKING_1, me); pInstance->SetData(PHASE_SPECHIAL, 38); pInstance->SetData(SPECHIAL_TIMER, 36000); break; case 38: Lichking = me->SummonCreature(NPC_LICH_KING, 564.008057, 176.066330, 394.372772, 4.719572); Lichking->GetMotionMaster()->MovePoint(0, 563.955444f, 140.563583f, 393.836548f); Lichking->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); pInstance->SetData(PHASE_SPECHIAL, 39); pInstance->SetData(SPECHIAL_TIMER, 500); break; case 40: DoScriptText(SAY_INTRO_LICHTKING_3, me); pInstance->SetData(PHASE_SPECHIAL, 41); pInstance->SetData(SPECHIAL_TIMER, 10500); break; case 50: if(pInstance->GetData(PHASE_5)==IN_PROGRESS) { DoScriptText(SAY_INTRO_FACTION_HORDE_1, me); pInstance->SetData(PHASE_SPECHIAL, 51); pInstance->SetData(SPECHIAL_TIMER, 25000); } break; case 52: DoScriptText(SAY_INTRO_FACTION_HORDE_3, me); pInstance->SetData(PHASE_SPECHIAL, 53); pInstance->SetData(SPECHIAL_TIMER, 25000); break; case 54: if(pInstance->GetData(PHASE_5)==DONE) { DoScriptText(SAY_OUTRO_FACTION, me); pInstance->SetData(PHASE_SPECHIAL, 55); pInstance->SetData(SPECHIAL_TIMER, 25000); } break; case 57: DoScriptText(SAY_INTRO_TWINS, me); pInstance->SetData(PHASE_SPECHIAL, 58); pInstance->SetData(SPECHIAL_TIMER, 25000); break; case 58: DoScriptText(SAY_INTRO_BEGINN, me); pInstance->SetData(PHASE_SPECHIAL, 59); pInstance->SetData(SPECHIAL_TIMER, 25000); break; } } else { UpdateTimer -= diff; pInstance->SetData(SPECHIAL_TIMER, UpdateTimer); } }
void UpdateAI(const uint32 diff) { if(!pInstance) return; ScriptedAI::UpdateAI(diff); UpdateTimer = pInstance->GetData(SPECHIAL_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(PHASE_SPECHIAL)) { case 39: DoScriptText(SAY_INTRO_LICHTKING_2, me); pInstance->SetData(PHASE_SPECHIAL, 40); pInstance->SetData(SPECHIAL_TIMER, 24500); break; case 41: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); pInstance->SetData(PHASE_SPECHIAL, 42); pInstance->SetData(SPECHIAL_TIMER, 31500); break; case 42: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); DoScriptText(SAY_INTRO_LICHTKING_4, me); pInstance->SetData(PHASE_SPECHIAL, 43); pInstance->SetData(SPECHIAL_TIMER, 70000); break; case 43: me->CastSpell(me,72262,false); pInstance->SetData(PHASE_SPECHIAL, 44); pInstance->SetData(SPECHIAL_TIMER, 12000); break; case 44: pInstance->SetData(PHASE_SPECHIAL, 45); pInstance->SetData(SPECHIAL_TIMER, 18000); break; case 45: pInstance->HandleGameObject(pInstance->GetData64(20), true); pInstance->SetData(PHASE_SPECHIAL, 46); pInstance->SetData(SPECHIAL_TIMER, 2500); break; case 46: DoScriptText(SAY_INTRO_LICHTKING_5, me); me->ForcedDespawn(); pInstance->SetData(PHASE_SPECHIAL, 47); pInstance->SetData(SPECHIAL_TIMER, 15500); break; } } else { UpdateTimer -= diff; pInstance->SetData(SPECHIAL_TIMER, UpdateTimer); } }
void UpdateAI(const uint32 diff) { if(!pInstance) return; ScriptedAI::UpdateAI(diff); UpdateTimer = pInstance->GetData(SPECHIAL_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(PHASE_SPECHIAL)) { case 16: pInstance->SetData(PHASE_SPECHIAL, 17); pInstance->SetData(SPECHIAL_TIMER, 11000); break; case 17: me->GetMotionMaster()->MovePoint(0, 563.296753,147.057114,394.149200); pInstance->SetData(PHASE_SPECHIAL, 18); pInstance->SetData(SPECHIAL_TIMER, 30000); break; case 18: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 1); DoScriptText(SAY_JARAXXUS_INTRO_2, me); pInstance->SetData(PHASE_SPECHIAL, 19); pInstance->SetData(SPECHIAL_TIMER, 45000); break; case 19: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 27); DoScriptText(SAY_JARAXXUS_INTRO_3, me); pInstance->SetData(PHASE_SPECHIAL, 20); pInstance->SetData(SPECHIAL_TIMER, 16000); break; case 20: me->SummonGameObject(184006, 563.296753,147.057114,394.149200,4.709139, 0, 0, 0, 0, 150); pInstance->SetData(PHASE_SPECHIAL, 21); pInstance->SetData(SPECHIAL_TIMER, 16000); break; case 21: //WilfredPortal = me->SummonCreature(CREATURE_JARAXXUS_PORTAL_TRIGGER, 563.830933, 127.890533, 393.918182,1.579980,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,180000); pInstance->SetData(PHASE_SPECHIAL, 22); pInstance->SetData(SPECHIAL_TIMER, 16000); break; case 22: //me->CastSpell(WilfredPortal, SPELL_WILFRED_CAST_PORTAL, true); pInstance->SetData(PHASE_SPECHIAL, 23); pInstance->SetData(SPECHIAL_TIMER, 16000); break; case 23: //me->CastSpell(WilfredPortal, SPELL_WILFRED_CAST_PORTAL, true); pInstance->SetData(PHASE_SPECHIAL, 24); pInstance->SetData(SPECHIAL_TIMER, 14000); break; case 24: //WilfredPortal->CastSpell(WilfredPortal, SPELL_WILFRED_PORTAL, false); pInstance->SetData(PHASE_SPECHIAL, 25); pInstance->SetData(SPECHIAL_TIMER, 9000); break; case 25: Jaraxxus = me->SummonCreature(NPC_LORD_JARAXXUS,563.830933, 127.890533, 393.918182,1.579980,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,180000); Jaraxxus->RemoveAurasDueToSpell(SPELL_ROOTET_JARAXXUS); Jaraxxus->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); Jaraxxus->GetMotionMaster()->MovePoint(0, 563.780945, 132.052063, 393.918182); Jaraxxus->SetReactState(REACT_PASSIVE); pInstance->SetData(PHASE_SPECHIAL, 26); pInstance->SetData(SPECHIAL_TIMER, 35000); break; case 26: //WilfredPortal->ForcedDespawn(); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 1); DoScriptText(SAY_JARAXXUS_INTRO_4, me); pInstance->SetData(PHASE_SPECHIAL, 27); pInstance->SetData(SPECHIAL_TIMER, 45000); break; case 27: DoScriptText(SAY_JARAXXUS_INTRO_5, Jaraxxus); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); pInstance->SetData(PHASE_SPECHIAL, 28); pInstance->SetData(SPECHIAL_TIMER, 25000); break; case 28: Jaraxxus->CastSpell(me, 67888, true); Jaraxxus->Kill(me); DoScriptText(SAY_JARAXXUS_INTRO_6, me); pInstance->SetData(PHASE_SPECHIAL, 29); pInstance->SetData(SPECHIAL_TIMER, 25000); break; } } else { UpdateTimer -= diff; pInstance->SetData(SPECHIAL_TIMER, UpdateTimer); } }