本文整理匯總了C++中AggroAllPlayers函數的典型用法代碼示例。如果您正苦於以下問題:C++ AggroAllPlayers函數的具體用法?C++ AggroAllPlayers怎麽用?C++ AggroAllPlayers使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AggroAllPlayers函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: StartGrandChampionsAttack
void StartGrandChampionsAttack()
{
Creature* pGrandChampion1 = Unit::GetCreature(*me, uiVehicle1GUID);
Creature* pGrandChampion2 = Unit::GetCreature(*me, uiVehicle2GUID);
Creature* pGrandChampion3 = Unit::GetCreature(*me, uiVehicle3GUID);
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
{
AggroAllPlayers(pGrandChampion1);
AggroAllPlayers(pGrandChampion2);
AggroAllPlayers(pGrandChampion3);
}
}
示例2: UpdateAI
void UpdateAI(uint32 uiDiff)
{
ScriptedAI::UpdateAI(uiDiff);
if (uiTimer <= uiDiff)
{
switch (uiPhase)
{
case 1:
DoSummonGrandChampion(uiSecondBoss);
NextStep(10000, true);
break;
case 2:
DoSummonGrandChampion(uiThirdBoss);
NextStep(0, false);
break;
case 3:
if (!Champion1List.empty())
{
for (std::list<uint64>::const_iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
if (Creature* summon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(summon);
NextStep(0, false);
}
break;
}
} else uiTimer -= uiDiff;
if (!UpdateVictim())
return;
}
示例3: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!bDone && GrandChampionsOutVehicle(me))
{
bDone = true;
if (pInstance && me->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
me->SetHomePosition(739.678f, 662.541f, 412.393f, 4.49f);
else if (pInstance && me->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
me->SetHomePosition(746.71f, 661.02f, 411.69f, 4.6f);
else if (pInstance && me->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
if (pInstance)
pInstance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
EnterEvadeMode();
bHome = true;
}
if (uiPhaseTimer <= uiDiff)
{
if (uiPhase == 1)
{
AggroAllPlayers(me);
uiPhase = 0;
}
} else uiPhaseTimer -= uiDiff;
if (!UpdateVictim() || me->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return;
if (uiEviscerateTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_EVISCERATE);
uiEviscerateTimer = 22000;
} else uiEviscerateTimer -= uiDiff;
if (uiFanKivesTimer <= uiDiff)
{
DoCastAOE(SPELL_FAN_OF_KNIVES, false);
uiFanKivesTimer = 20000;
} else uiFanKivesTimer -= uiDiff;
if (uiPosionBottleTimer <= uiDiff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_POISON_BOTTLE);
uiPosionBottleTimer = 19000;
} else uiPosionBottleTimer -= uiDiff;
DoMeleeAttackIfReady();
}
示例4: SetData
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_WALK_MODE);
me->GetMotionMaster()->MovePoint(1,735.898, 651.961, 411.93);
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_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;
}
}
}
示例5: SetData
void SetData(uint32 uiType, uint32 /*uiData*/)
{
switch (uiType)
{
case DATA_START:
DoSummonGrandChampion(uiFirstBoss);
NextStep(10000, false, 1);
break;
case DATA_IN_POSITION: //movement done.
me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
instance->HandleGameObject(go->GetGUID(), false);
NextStep(10000, false, 3);
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* summon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(summon);
}else if (uiLesserChampions == 9)
StartGrandChampionsAttack();
break;
}
}
}
示例6: SetData
void SetData(uint32 uiType, uint32 /*uiData*/) override
{
switch (uiType)
{
case DATA_START:
if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
instance->HandleGameObject(gate->GetGUID(),true);
if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE1)))
instance->HandleGameObject(gate->GetGUID(),false);
DoSummonGrandChampion(uiFirstBoss);
events.ScheduleEvent(EVENT_SUMMON_FACTION_2, 10000, 0, PHASE_INPROGRESS);
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* summon = ObjectAccessor::GetCreature(*me, *itr))
AggroAllPlayers(summon);
} else if (uiLesserChampions == 9)
StartGrandChampionsAttack();
break;
}
}
}
示例7: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!bDone && GrandChampionsOutVehicle(me))
{
bDone = true;
if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_1))
me->SetHomePosition(739.678f, 662.541f, 412.393f, 4.49f);
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_2))
me->SetHomePosition(746.71f, 661.02f, 411.69f, 4.6f);
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3))
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
if (instance)
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
EnterEvadeMode();
bHome = true;
}
if (uiPhaseTimer <= uiDiff)
{
if (uiPhase == 1)
{
AggroAllPlayers(me);
uiPhase = 0;
}
}else uiPhaseTimer -= uiDiff;
if (!UpdateVictim() || me->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return;
if (uiLightningArrowsTimer <= uiDiff)
{
DoCastAOE(SPELL_LIGHTNING_ARROWS, false);
uiLightningArrowsTimer = 7000;
} else uiLightningArrowsTimer -= uiDiff;
if (uiShootTimer <= uiDiff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 30.0f))
{
uiTargetGUID = target->GetGUID();
DoCast(target, SPELL_SHOOT);
}
uiShootTimer = 12000;
uiMultiShotTimer = 3000;
bShoot = true;
} else uiShootTimer -= uiDiff;
if (bShoot && uiMultiShotTimer <= uiDiff)
{
me->InterruptNonMeleeSpells(true);
Unit* target = Unit::GetUnit(*me, uiTargetGUID);
if (target && me->IsInRange(target, 5.0f, 30.0f, false))
{
DoCast(target, SPELL_MULTI_SHOT);
}
else
{
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (me->GetMap()->IsDungeon() && !players.isEmpty())
{
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* player = itr->getSource();
if (player && !player->isGameMaster() && me->IsInRange(player, 5.0f, 30.0f, false))
{
DoCast(player, SPELL_MULTI_SHOT);
break;
}
}
}
}
bShoot = false;
} else uiMultiShotTimer -= uiDiff;
DoMeleeAttackIfReady();
}
示例8: JustSummoned
void JustSummoned(Creature* summon) override
{
SummonList.push_back(summon->GetGUID());
AggroAllPlayers(summon);
}
示例9: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!(thrallGUID || garroshGUID || varianGUID || proudmooreGUID || tirionGUID))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_INTRO_1:
instance->DoCastSpellOnPlayers(SPELL_HERALD_ARGENT);
Talk(SAY_INTRO_HERALD_1);
events.ScheduleEvent(EVENT_INTRO_2, 5000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_2:
if (Creature* tirion = ObjectAccessor::GetCreature(*me, tirionGUID))
tirion->AI()->Talk(SAY_INTRO_HERALD_2);
events.ScheduleEvent(EVENT_INTRO_3, 13000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_3:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
{
if (Creature* thrall = ObjectAccessor::GetCreature(*me, thrallGUID))
thrall->AI()->Talk(H_SAY_INTRO_HERALD_3);
}
else
if (Creature* varian = ObjectAccessor::GetCreature(*me, varianGUID))
varian->AI()->Talk(A_SAY_INTRO_HERALD_3);
events.ScheduleEvent(EVENT_INTRO_4, 4000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_4:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
{
if (Creature* garrosh = ObjectAccessor::GetCreature(*me, garroshGUID))
garrosh->AI()->Talk(H_SAY_INTRO_HERALD_4);
}
else
if (Creature* proudmoore = ObjectAccessor::GetCreature(*me, proudmooreGUID))
proudmoore->AI()->Talk(A_SAY_INTRO_HERALD_4);
events.ScheduleEvent(EVENT_INTRO_5, 4000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_5:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
{
if (Creature* varian = ObjectAccessor::GetCreature(*me, varianGUID))
varian->AI()->Talk(SAY_INTRO_HERALD_5);
}
else
if (Creature* garrosh = ObjectAccessor::GetCreature(*me, garroshGUID))
garrosh->AI()->Talk(SAY_INTRO_HERALD_5);
events.ScheduleEvent(EVENT_INTRO_6, 6000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_6:
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
{
if (Creature* proudmoore = ObjectAccessor::GetCreature(*me, proudmooreGUID))
proudmoore->AI()->Talk(H_SAY_INTRO_HERALD_6);
}
else
if (Creature* thrall = ObjectAccessor::GetCreature(*me, thrallGUID))
thrall->AI()->Talk(A_SAY_INTRO_HERALD_6);
events.ScheduleEvent(EVENT_INTRO_7, 6000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_7:
if (Creature* tirion = ObjectAccessor::GetCreature(*me, tirionGUID))
tirion->AI()->Talk(SAY_INTRO_HERALD_7);
events.ScheduleEvent(EVENT_INTRO_8, 1000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_8:
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
events.SetPhase(PHASE_INPROGRESS);
break;
case EVENT_SUMMON_FACTION_2:
DoSummonGrandChampion(uiSecondBoss);
events.ScheduleEvent(EVENT_SUMMON_FACTION_3, 10000, 0, PHASE_INPROGRESS);
break;
case EVENT_SUMMON_FACTION_3:
DoSummonGrandChampion(uiThirdBoss);
break;
case EVENT_AGGRO_FACTION:
if (!Champion1List.empty())
{
for(std::list<uint64>::const_iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
AggroAllPlayers(summon);
}
break;
case EVENT_PALETRESS_1:
Talk(SAY_PALETRESS_INTRO_1);
Talk(SAY_PALETRESS_INTRO_2);
events.ScheduleEvent(EVENT_PALETRESS_2, 5000, 0, PHASE_INPROGRESS);
break;
case EVENT_PALETRESS_2:
if (Creature* argentchamp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ARGENT_CHAMPION)))
argentchamp->AI()->Talk(SAY_PALETRESS_INTRO_3);
events.ScheduleEvent(EVENT_PALETRESS_3, 5000);
case EVENT_PALETRESS_3:
if (Creature* argentchamp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ARGENT_CHAMPION)))
//.........這裏部分代碼省略.........
示例10: SetData
void SetData(uint32 type, uint32 data)
{
switch(type)
{
case BOSS_GRAND_CHAMPIONS:
m_auiEncounter[0] = data;
if (data == SPECIAL)
{
for (std::list<uint64>::const_iterator itr = VehicleList.begin(); itr != VehicleList.end(); ++itr)
if (Creature* summon = instance->GetCreature(*itr))
summon->RemoveFromWorld();
} else if (data == IN_PROGRESS)
{
for (uint8 i=0; i<3; i++)
if (Creature* boss = instance->GetCreature(grandChampionGUID[i]))
AggroAllPlayers(boss);
} else if (data == DONE)
{
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_CHAMPIONS);
if (Creature* announcer = instance->GetCreature(uiAnnouncerGUID))
{
announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
announcer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
}
}
break;
case BOSS_ARGENT_CHALLENGE_E:
m_auiEncounter[1] = data;
if (data == DONE)
{
if (Creature* announcer = instance->GetCreature(uiAnnouncerGUID))
{
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_EADRIC);
announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
announcer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
}
}
break;
case BOSS_ARGENT_CHALLENGE_P:
m_auiEncounter[2] = data;
if (data == DONE)
{
if (Creature* announcer = instance->GetCreature(uiAnnouncerGUID))
{
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_PALETRESS);
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_MEMORIES);
announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
announcer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
}
}
break;
case BOSS_BLACK_KNIGHT:
m_auiEncounter[3] = data;
if (data == DONE)
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_BLACK_KNIGHT);
break;
case DATA_GRAND_CHAMPION_ENTRY:
for (uint8 i=0; i<3; i++)
{
if (grandChampionEntry[i] == 0)
{
grandChampionEntry[i] = data;
return;
}
}
break;
case DATA_MEMORY_ENTRY:
memoryEntry = data;
break;
case DATA_I_VE_HAD_WORSE:
achievementHadWorse = (bool)data;
break;
}
if (type != DATA_I_VE_HAD_WORSE)
{
if (data == DONE || data == FAIL)
HandleGameObject(GetData64(DATA_PORTCULLIS), true);
else if (data == IN_PROGRESS)
HandleGameObject(GetData64(DATA_PORTCULLIS), false);
if (data == DONE)
SaveToDB();
}
}
示例11: SetData
void SetData(uint32 uiType, uint32 uiData)
{
switch(uiType)
{
case DATA_BLACK_KNIGHT:
uiBlackKnightEvent = uiData;
if (uiData == NOT_STARTED)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
pBlackKnight->setFaction(35);
pBlackKnight->SetReactState(REACT_DEFENSIVE);
pBlackKnight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
}
}else if (uiData == IN_PROGRESS)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
DoScriptText(SAY_BLACK_KNIGHT_1, pBlackKnight);
}
}else if (uiData == DONE)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
{
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
pBlackKnight->CastSpell(pAnnouncer,SPELL_DEATH_RESPITE,true);
}
}
}
break;
case DATA_KNIGHT:
uiBlackKnightEvent2 = uiData;
if (uiData == NOT_STARTED)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
pBlackKnight->SetOrientation(4.714f);
pBlackKnight->SetReactState(REACT_PASSIVE);
pBlackKnight->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
}
}else if (uiData == IN_PROGRESS)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
DoScriptText(SAY_BLACK_KNIGHT_2, pBlackKnight);
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
{
pAnnouncer->setDeathState(JUST_DIED);
}
}
}else if (uiData == DONE)
{
if (Creature* pBlackKnight = instance->GetCreature(uiBlackKnightGUID))
{
pBlackKnight->setFaction(14);
pBlackKnight->SetReactState(REACT_AGGRESSIVE);
pBlackKnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
AggroAllPlayers(pBlackKnight);
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
{
pAnnouncer->DisappearAndDie();
if (Creature* pGhoul = pAnnouncer->SummonCreature(NPC_RISEN_JAEREN,pAnnouncer->GetPositionX(),pAnnouncer->GetPositionY(),pAnnouncer->GetPositionZ(),pAnnouncer->GetOrientation()))
{
pGhoul->setFaction(14);
AggroAllPlayers(pGhoul);
}
}
}
}
break;
case DATA_MOVEMENT_DONE:
uiMovementDone = uiData;
if (uiMovementDone == 3)
{
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
pAnnouncer->AI()->SetData(DATA_IN_POSITION, 0);
}
break;
case BOSS_GRAND_CHAMPIONS:
m_auiEncounter[0] = uiData;
if (uiData == IN_PROGRESS)
{
for (std::list<uint64>::const_iterator itr = VehicleList.begin(); itr != VehicleList.end(); ++itr)
if (Creature* summon = instance->GetCreature(*itr))
summon->RemoveFromWorld();
}else if (uiData == DONE)
{
++uiGrandChampionsDeaths;
if (uiGrandChampionsDeaths >= 3)
{
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
{
DoScriptText(SAY_START_1, pAnnouncer);
pAnnouncer->GetMotionMaster()->MovePoint(0,748.309f,619.487f,411.171f);
pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT,746.59f,618.49f,411.09f,1.42f,0, 0, 0, 0,90000000);
}
//.........這裏部分代碼省略.........
示例12: JustSummoned
void JustSummoned(Creature* pSummon)
{
SummonList.push_back(pSummon->GetGUID());
AggroAllPlayers(pSummon);
}
示例13: SetData
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;
}
}
}