npc_announcer_toc5AI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); uiSummonTimes = 0; uiPosition = 0; uiLesserChampions = 0; uiFirstBoss = 0; uiSecondBoss = 0; uiThirdBoss = 0; uiArgentChampion = 0; uiPhase = 0; uiTimer = 0; uiVehicle1GUID = 0; uiVehicle2GUID = 0; uiVehicle3GUID = 0; Champion1List.clear(); Champion2List.clear(); Champion3List.clear(); me->SetReactState(REACT_PASSIVE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetGrandChampionsForEncounter(); SetArgentChampion(); }
TW_npc_herald_toc5AI(Creature *creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); uiSummonTimes = 0; uiPosition = 0; uiLesserChampions = 0; uiFirstBoss = 0; uiSecondBoss = 0; uiThirdBoss = 0; ArgentChampion = 0; uiVehicle1GUID = 0; uiVehicle2GUID = 0; uiVehicle3GUID = 0; uiGrandChampionBoss1 = 0; uiGrandChampionBoss2 = 0; uiGrandChampionBoss3 = 0; Champion1List.clear(); Champion2List.clear(); Champion3List.clear(); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetGrandChampionsForEncounter(); SetArgentChampion(); }
npc_announcer_toc5AI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); summonTimes = 0; lesserChampions = 0; defeatedGrandChampions = 0; firstBoss = 0; secondBoss = 0; thirdBoss = 0; argentChampion = 0; phase = 0; timer = 0; Champion1List.clear(); Champion2List.clear(); Champion3List.clear(); me->SetReactState(REACT_PASSIVE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetGrandChampionsForEncounter(); SetArgentChampion(); }
void SetData(uint32 uiType, uint32 uiData) { switch (uiType) { case DATA_START: if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE))) pInstance->HandleGameObject(pGO->GetGUID(),true); if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1))) pInstance->HandleGameObject(pGO->GetGUID(),false); DoScriptText(SAY_START, me); DoSummonGrandChampion(uiFirstBoss); NextStep(10000,false,1); break; case DATA_IN_POSITION: //movement done. me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING); me->GetMotionMaster()->MovePoint(1, 735.898f, 651.961f, 411.93f); DoScriptText(SAY_START2, me); if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE))) pInstance->HandleGameObject(pGO->GetGUID(),false); NextStep(20000,false,3); break; case DATA_RESET: me->GetMotionMaster()->MovePoint(2, 746.626f, 618.54f, 411.09f); uiSummonTimes = 0; uiPosition = 0; uiLesserChampions = 0; uiFirstBoss = 0; uiSecondBoss = 0; uiThirdBoss = 0; uiArgentChampion = 0; uiPhase = 0; uiTimer = 0; uiVehicle1GUID = 0; uiVehicle2GUID = 0; uiVehicle3GUID = 0; Champion1List.clear(); Champion2List.clear(); Champion3List.clear(); me->SetReactState(REACT_PASSIVE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetGrandChampionsForEncounter(); SetArgentChampion(); break; case DATA_LESSER_CHAMPIONS_DEFEATED: { ++uiLesserChampions; std::list<uint64> TempList; if (uiLesserChampions == 3 || uiLesserChampions == 6) { switch(uiLesserChampions) { case 3: TempList = Champion2List; break; case 6: TempList = Champion3List; break; } for(std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr) if (Creature* pSummon = Unit::GetCreature(*me, *itr)) AggroAllPlayers(pSummon); }else if (uiLesserChampions == 9) StartGrandChampionsAttack(); break; } } }