本文整理汇总了C++中SetEscortPaused函数的典型用法代码示例。如果您正苦于以下问题:C++ SetEscortPaused函数的具体用法?C++ SetEscortPaused怎么用?C++ SetEscortPaused使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetEscortPaused函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
return;
if (HasEscortState(STATE_ESCORT_PAUSED))
{
if (m_uiExplodeTimer < uiDiff)
{
if (m_bFirstBarrel)
{
switch (m_uiExplodePhase)
{
case 0:
DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_1);
if (Player* pPlayer = GetPlayerForEscort())
DoScriptText(SAY_HELICE_EXPLODE_1, m_creature, pPlayer);
m_uiExplodeTimer = 2500;
++m_uiExplodePhase;
break;
case 1:
if (Player* pPlayer = GetPlayerForEscort())
DoScriptText(SAY_HELICE_MOVE_ON, m_creature, pPlayer);
m_uiExplodeTimer = 2500;
++m_uiExplodePhase;
break;
case 2:
SetEscortPaused(false);
m_uiExplodePhase = 0;
m_uiExplodeTimer = 5000;
m_bFirstBarrel = false;
break;
}
}
else
{
switch (m_uiExplodePhase)
{
case 0:
DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_2);
if (Player* pPlayer = GetPlayerForEscort())
DoScriptText(SAY_HELICE_EXPLODE_2, m_creature, pPlayer);
m_uiExplodeTimer = 2500;
++m_uiExplodePhase;
break;
case 1:
SetEscortPaused(false);
m_uiExplodePhase = 0;
m_uiExplodeTimer = 5000;
m_bFirstBarrel = true;
break;
}
}
}
else
m_uiExplodeTimer -= uiDiff;
}
return;
}
DoMeleeAttackIfReady();
}
示例2: UpdateAI
void UpdateAI(uint32 uiDiff)
{
if (uiPhase)
{
if (uiTimer <= uiDiff)
{
switch (uiPhase)
{
case 1:
Talk(SAY_QUEST_ACCEPT_ATTACK);
uiTimer = 3000;
uiPhase = 2;
break;
case 2:
if (Creature* pTyrion = me->FindNearestCreature(NPC_TYRION, 10.0f))
pTyrion->AI()->Talk(SAY_TYRION_1);
uiTimer = 3000;
uiPhase = 3;
break;
case 3:
me->UpdateEntry(NPC_PRIESTESS_TYRIONA);
uiTimer = 2000;
uiPhase = 4;
break;
case 4:
SetEscortPaused(false);
uiPhase = 0;
uiTimer = 0;
break;
case 5:
if (Creature* pGuard = me->FindNearestCreature(NPC_STORMWIND_ROYAL, 10.0f, true))
pGuard->AI()->Talk(SAY_GUARD_1);
uiTimer = 3000;
uiPhase = 6;
break;
case 6:
Talk(SAY_SPYBOT_2);
uiTimer = 3000;
uiPhase = 7;
break;
case 7:
SetEscortPaused(false);
uiTimer = 0;
uiPhase = 0;
break;
case 8:
if (Creature* pLescovar = me->FindNearestCreature(NPC_LORD_GREGOR_LESCOVAR, 10.0f))
pLescovar->AI()->Talk(SAY_LESCOVAR_1);
uiTimer = 3000;
uiPhase = 9;
break;
case 9:
Talk(SAY_SPYBOT_4);
uiTimer = 3000;
uiPhase = 10;
break;
case 10:
if (Creature* pLescovar = me->FindNearestCreature(NPC_LORD_GREGOR_LESCOVAR, 10.0f))
{
if (Player* player = GetPlayerForEscort())
{
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, false, player->GetGUID());
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f);
}
}
me->DisappearAndDie();
uiTimer = 0;
uiPhase = 0;
break;
}
} else uiTimer -= uiDiff;
}
npc_escortAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
}
示例3: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff) override
{
if (m_uiEventTimer)
{
if (m_uiEventTimer <= uiDiff)
{
switch (m_uiPoint)
{
// Corner stop -> raptors
case 7:
switch (m_uiSubeventPhase)
{
case 0:
// Summon raptors at first stop
DoSpawnMob(NPC_DEVIATE_RAPTOR, aSummonPositions[0][0], aSummonPositions[0][1]);
DoSpawnMob(NPC_DEVIATE_RAPTOR, aSummonPositions[1][0], aSummonPositions[1][1]);
m_uiEventTimer = 0;
++m_uiSubeventPhase;
break;
case 1:
// After the summoned mobs are killed continue
DoScriptText(SAY_CONTINUE, m_creature);
SetEscortPaused(false);
m_uiEventTimer = 0;
break;
}
break;
// Circle stop -> vipers
case 15:
switch (m_uiSubeventPhase)
{
case 0:
DoScriptText(SAY_CIRCLE_BANISH, m_creature);
m_uiEventTimer = 2000;
++m_uiSubeventPhase;
break;
case 1:
DoCastSpellIfCan(m_creature, SPELL_CLEANSING);
m_uiEventTimer = 20000;
++m_uiSubeventPhase;
break;
case 2:
// Summon vipers at the first circle
for (uint8 i = 0; i < 3; ++i)
DoSpawnMob(NPC_DEVIATE_VIPER, aSummonPositions[2][0], aSummonPositions[2][1] + 2 * M_PI_F / 3 * i);
m_uiEventTimer = 0;
++m_uiSubeventPhase;
break;
case 3:
// Wait for casting to be complete - TODO, this might have to be done better
++m_uiSubeventPhase;
m_uiEventTimer = 10000;
break;
case 4:
DoScriptText(SAY_PURIFIED, m_creature);
m_uiEventTimer = 0;
++m_uiPoint; // Increment this in order to avoid the special case evade
SetEscortPaused(false);
break;
}
break;
// Chamber stop -> ritual and final boss
case 32:
switch (m_uiSubeventPhase)
{
case 0:
DoScriptText(SAY_BEGIN_RITUAL, m_creature);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
m_uiEventTimer = 2000;
++m_uiSubeventPhase;
break;
case 1:
DoCastSpellIfCan(m_creature, SPELL_AWAKENING);
DoScriptText(EMOTE_RITUAL_BEGIN, m_creature);
m_uiEventTimer = 4000;
++m_uiSubeventPhase;
break;
case 2:
if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX))
DoScriptText(EMOTE_NARALEX_AWAKE, pNaralex);
m_uiEventTimer = 5000;
++m_uiSubeventPhase;
break;
case 3:
// First set of mobs
for (uint8 i = 0; i < 3; ++i)
DoSpawnMob(NPC_DEVIATE_MOCCASIN, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F / 3 * i);
m_uiEventTimer = 20000;
++m_uiSubeventPhase;
break;
case 4:
// Second set of mobs
for (uint8 i = 0; i < 7; ++i)
DoSpawnMob(NPC_NIGHTMARE_ECTOPLASM, aSummonPositions[3][0], aSummonPositions[3][1] + M_PI_F / 7 * i);
m_uiEventTimer = 0;
++m_uiSubeventPhase;
break;
case 5:
// Advance only when all mobs are dead
if (Creature* pNaralex = m_pInstance->GetSingleCreatureFromStorage(NPC_NARALEX))
//.........这里部分代码省略.........
示例4: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff)
{
if (uiPhase)
{
if (uiTimer <= uiDiff)
{
switch (uiPhase)
{
case 1:
Talk(SAY_BLASTMASTER_1);
NextStep(2000, true);
break;
case 2:
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 3:
Talk(SAY_BLASTMASTER_2);
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 4:
Talk(SAY_BLASTMASTER_3);
NextStep(3000, true);
break;
case 5:
Talk(SAY_BLASTMASTER_4);
NextStep(3000, true);
break;
case 6:
SetInFace(true);
Talk(SAY_BLASTMASTER_5);
Summon(1);
if (instance)
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
instance->HandleGameObject(0, true, go);
NextStep(3000, true);
break;
case 7:
Talk(SAY_BLASTMASTER_6);
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 8:
me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING);
NextStep(25000, true);
break;
case 9:
Summon(2);
NextStep(0, false);
break;
case 10:
Summon(4);
Talk(SAY_BLASTMASTER_8);
NextStep(0, false);
break;
case 11:
Talk(SAY_BLASTMASTER_9);
NextStep(5000, true);
break;
case 12:
Talk(SAY_BLASTMASTER_10);
NextStep(5000, true);
break;
case 13:
Talk(SAY_BLASTMASTER_11);
CaveDestruction(true);
NextStep(8000, true);
break;
case 14:
Talk(SAY_BLASTMASTER_12);
NextStep(8500, true);
break;
case 15:
Talk(SAY_BLASTMASTER_13);
NextStep(2000, true);
break;
case 16:
Talk(SAY_BLASTMASTER_14);
SetInFace(false);
if (instance)
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
instance->HandleGameObject(0, true, go);
NextStep(2000, true);
break;
case 17:
SetEscortPaused(false);
Talk(SAY_BLASTMASTER_15);
Summon(5);
NextStep(0, false);
break;
case 18:
Summon(6);
NextStep(0, false);
break;
case 19:
SetInFace(false);
Summon(7);
Talk(SAY_BLASTMASTER_16);
NextStep(0, false);
//.........这里部分代码省略.........
示例5: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff)
{
if (uiPhaseTimer <= uiDiff)
{
switch (uiStep)
{
case 1:
if (instance)
{
if (instance->GetData(DATA_BRANN_EVENT) != NOT_STARTED)
return;
instance->SetData(DATA_BRANN_EVENT, IN_PROGRESS);
}
bIsBattle = false;
Talk(SAY_ESCORT_START);
SetRun(true);
JumpToNextStep(0);
break;
case 3:
SetEscortPaused(false);
JumpToNextStep(0);
break;
case 5:
if (instance)
if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))))
temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED);
JumpToNextStep(8500);
break;
case 6:
Talk(SAY_EVENT_A_1);
JumpToNextStep(6500);
break;
case 7:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK)))
temp->AI()->Talk(SAY_EVENT_A_2_KADD);
JumpToNextStep(12500);
break;
case 8:
Talk(SAY_EVENT_A_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bKaddrakActivated = true;
JumpToNextStep(5000);
break;
case 9:
me->SetReactState(REACT_PASSIVE);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 10:
Talk(SAY_EVENT_B_1);
JumpToNextStep(6000);
break;
case 11:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK)))
temp->AI()->Talk(SAY_EVENT_B_2_MARN);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 12:
Talk(SAY_EVENT_B_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bMarnakActivated = true;
JumpToNextStep(10000);
break;
case 13:
SpawnDwarf(1);
JumpToNextStep(10000);
break;
case 14:
SpawnDwarf(2);
JumpToNextStep(20000);
break;
case 15:
Talk(SAY_EVENT_C_1);
SpawnDwarf(1);
JumpToNextStep(10000);
break;
case 16:
SpawnDwarf(2);
JumpToNextStep(20000);
break;
case 17:
if (instance)
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))
temp->AI()->Talk(SAY_EVENT_C_2_ABED);
SpawnDwarf(1);
JumpToNextStep(20000);
break;
case 18:
Talk(SAY_EVENT_C_3);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true);
if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID))
CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bAbedneumActivated = true;
//.........这里部分代码省略.........
示例6: StartWP
void StartWP()
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetEscortPaused(false);
}
示例7: UpdateAI
void UpdateAI(const uint32 Diff)
{
if (Phase)
{
if (Timer <= Diff)
{
switch (Phase)
{
case 1:
if (Creature* guard = me->FindNearestCreature(NPC_STORMWIND_ROYAL, 8.0f, true))
DoScriptText(SAY_GUARD_2, guard);
Timer = 3000;
Phase = 2;
break;
case 2:
DoGuardsDisappearAndDie();
Timer = 2000;
Phase = 3;
break;
case 3:
SetEscortPaused(false);
Timer = 0;
Phase = 0;
break;
case 4:
DoScriptText(SAY_LESCOVAR_3, me);
Timer = 0;
Phase = 0;
break;
case 5:
if (Creature* marzon = Unit::GetCreature(*me, MarzonGUID))
DoScriptText(SAY_MARZON_1, marzon);
Timer = 3000;
Phase = 6;
break;
case 6:
DoScriptText(SAY_LESCOVAR_4, me);
if (Player* player = GetPlayerForEscort())
player->AreaExploredOrEventHappens(QUEST_THE_ATTACK);
Timer = 2000;
Phase = 7;
break;
case 7:
if (Creature* tyrion = me->FindNearestCreature(NPC_TYRION, 20.0f, true))
DoScriptText(SAY_TYRION_2, tyrion);
if (Creature* marzon = Unit::GetCreature(*me, MarzonGUID))
marzon->setFaction(14);
me->setFaction(14);
Timer = 0;
Phase = 0;
break;
}
}
else Timer -= Diff;
}
npc_escortAI::UpdateAI(Diff);
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
}
示例8: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff)
{
if (!m_pInstance)
return;
if (m_pInstance->GetData(TYPE_RING_OF_LAW) == FAIL)
{
// Reset Doors
if (m_uiEventPhase >= 9) // North Gate is opened
{
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_2));
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4));
}
else if (m_uiEventPhase >= 4) // East Gate is opened
{
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1));
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4));
}
// Despawn Summoned Mobs
for (std::list<uint64>::const_iterator itr = m_lSummonedGUIDList.begin(); itr != m_lSummonedGUIDList.end(); ++itr)
if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr))
pSummoned->ForcedDespawn();
m_lSummonedGUIDList.clear();
// Despawn NPC
m_creature->ForcedDespawn();
return;
}
if (m_uiEventTimer)
{
if (m_uiEventTimer <= uiDiff)
{
switch(m_uiEventPhase)
{
case 0:
// Shortly after spawn, start walking
//DoScriptText(-1000000, m_creature); // no more text on spawn
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_4));
Start(false);
SetEscortPaused(false);
m_uiEventTimer = 0;
break;
case 1:
// Start walking towards wall
SetEscortPaused(false);
m_uiEventTimer = 0;
break;
case 2:
m_uiEventTimer = 2000;
break;
case 3:
// Open East Gate
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1));
m_uiEventTimer = 3000;
break;
case 4:
SetEscortPaused(false);
m_creature->SetVisibility(VISIBILITY_OFF);
// Summon Ring Mob(s)
SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST);
m_uiEventTimer = 8000;
break;
case 5:
// Summon Ring Mob(s)
SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST);
SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST);
m_uiEventTimer = 8000;
break;
case 6:
// Summon Ring Mob(s)
SummonRingMob(aRingMob[m_uiMobSpawnId], POS_EAST);
m_uiEventTimer = 0;
break;
case 7:
// Summoned Mobs are dead, continue event
m_creature->SetVisibility(VISIBILITY_ON);
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_1));
//DoScriptText(-1000000, m_creature); // after killed the mobs, no say here
SetEscortPaused(false);
m_uiEventTimer = 0;
break;
case 8:
// Open North Gate
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_ARENA_2));
m_uiEventTimer = 5000;
break;
case 9:
// Summon Boss
m_creature->SetVisibility(VISIBILITY_OFF);
// If banner summoned after start, then summon Thelden after the creatures are dead
if (m_pInstance->GetData(TYPE_RING_OF_LAW) == SPECIAL && m_uiPhase == PHASE_MOBS)
{
m_uiPhase = PHASE_GLADIATORS;
SummonRingMob(NPC_THELDREN, POS_NORTH);
for (uint8 i = 0; i < MAX_THELDREN_ADDS; ++i)
SummonRingMob(m_uiGladiatorId[i], POS_NORTH);
}
else
//.........这里部分代码省略.........
示例9: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff) override
{
DialogueUpdate(uiDiff);
if (m_uiOutroTimer)
{
if (m_uiOutroTimer <= uiDiff)
{
switch (m_uiOutroPhase)
{
case 0:
DoScriptText(SAY_REMULOS_OUTRO_1, m_creature);
m_uiOutroTimer = 3000;
break;
case 1:
// Despawn Remulos after the outro is finished - he will respawn automatically at his home position after a few min
DoScriptText(SAY_REMULOS_OUTRO_2, m_creature);
m_creature->SetRespawnDelay(1 * MINUTE);
m_creature->ForcedDespawn(3000);
m_uiOutroTimer = 0;
break;
}
++m_uiOutroPhase;
}
else
{
m_uiOutroTimer -= uiDiff;
}
}
// during the battle
if (m_uiShadesummonTimer)
{
if (m_uiShadesummonTimer <= uiDiff)
{
// do this yell only first time
if (m_bIsFirstWave)
{
// summon 3 shades inside the house
for (uint8 i = 0; i < MAX_SHADOWS; ++i)
{
m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, aShadowsLocations[i].m_fX, aShadowsLocations[i].m_fY, aShadowsLocations[i].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
}
if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid))
{
DoScriptText(SAY_ERANIKUS_ATTACK_1, pEranikus);
}
++m_uiSummonCount;
SetEscortPaused(false);
m_bIsFirstWave = false;
}
// Summon 3 shades per turn until the maximum summon turns are reached
float fX, fY, fZ;
// Randomize the summon point
uint8 uiSummonPoint = roll_chance_i(70) ? uint32(MAX_SHADOWS) : urand(MAX_SHADOWS + 1, MAX_SHADOWS + 2);
if (m_uiSummonCount < MAX_SUMMON_TURNS)
{
for (uint8 i = 0; i < MAX_SHADOWS; ++i)
{
m_creature->GetRandomPoint(aShadowsLocations[uiSummonPoint].m_fX, aShadowsLocations[uiSummonPoint].m_fY, aShadowsLocations[uiSummonPoint].m_fZ, 10.0f, fX, fY, fZ);
m_creature->SummonCreature(NPC_NIGHTMARE_PHANTASM, fX, fY, fZ, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
++m_uiSummonCount;
}
// If all the shades were summoned then set Eranikus in combat
// We don't count the dead shades, because the boss is usually set in combat before all shades are dead
if (m_uiSummonCount == MAX_SUMMON_TURNS)
{
m_uiShadesummonTimer = 0;
if (Creature* pEranikus = m_creature->GetMap()->GetCreature(m_eranikusGuid))
{
pEranikus->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0);
pEranikus->SetLevitate(false);
pEranikus->GetMotionMaster()->MovePoint(POINT_ID_ERANIKUS_COMBAT, aEranikusLocations[2].m_fX, aEranikusLocations[2].m_fY, aEranikusLocations[2].m_fZ);
}
}
else
{
m_uiShadesummonTimer = urand(20000, 30000);
}
}
else
{
m_uiShadesummonTimer -= uiDiff;
}
}
// Combat spells
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
return;
}
//.........这里部分代码省略.........
示例10: UpdateEscortAI
void UpdateEscortAI(const uint32 diff)
{
if (!m_pInstance)
return;
Unit* pPlayer = GetPlayerForEscort();
if (!pPlayer)
return;
EventStarter = pPlayer;
Unit* Naralex = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_NARALEX));
if (!Naralex)
return;
if (Event_Timer && Event_Timer <= diff)
{
switch (Point)
{
case 0:
{
Debug(Point);
Map *map = m_creature->GetMap();
if (map && map->IsDungeon())
{
Map::PlayerList const &PlayerList = map->GetPlayers();
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource()->isAlive() && (i->getSource()->GetDistance(m_creature)<30))
m_creature->CastSpell(i->getSource(),SPELL_MARK,false);
}
}
}
SetEscortPaused(false);
Event_Timer = 0;
break;
}
case 1:
Debug(Point);
SetEscortPaused(false);
Event_Timer = 0;
break;
case 15:
Debug(Point);
switch (Subevent_Phase)
{
case 0:
DoScriptText(SAY_BEFORE_CIRCLE,m_creature);
Subevent_Phase = 1;
Event_Timer = 2000;
break;
case 1:
m_creature->CastSpell(m_creature,SPELL_CLEANSING,false);
Subevent_Phase = 2;
Event_Timer = 30000;
break;
case 2:
for (int i=0; i <3; ++i)
{
SummonAttacker(MOB_DEVIATE_VIPER,Position[i][0],Position[i][1],Position[i][2]);
}
Subevent_Phase = 3;
Event_Timer = 2000;
break;
case 3:
if (!m_creature->isInCombat() && !pPlayer->isInCombat())
{
DoScriptText(SAY_AFTER_CIRCLE,m_creature);
Point = 16;
Event_Timer = 2000;
SetEscortPaused(false);
break;
}
else
{
Event_Timer = 2000;
Subevent_Phase = 3;
break;
}
}
break;
case 30:
Debug(Point);
SetEscortPaused(true);
switch (Subevent_Phase)
{
case 0:
DoScriptText(SAY_BEFORE_RITUAL,m_creature);
Subevent_Phase = 1;
Event_Timer = 2000;
break;
case 1:
m_creature->CastSpell(m_creature,SPELL_AWAKENING,false);
DoScriptText(EMOTE_DISCIPLE_1,m_creature);
Subevent_Phase = 2;
Event_Timer = 4000;
break;
//.........这里部分代码省略.........
示例11: DoAction
void DoAction(const int32 param)
{
SetEscortPaused(false);
}
示例12: UpdateAI
void UpdateAI(uint32 diff) override
{
_events.Update(diff);
if (UpdateVictim())
{
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_FROST_SHOCK:
DoCastVictim(SPELL_FROST_SHOCK);
_events.DelayEvents(1 * IN_MILLISECONDS);
_events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10, 15) * IN_MILLISECONDS);
break;
case EVENT_SEARING_TOTEM:
DoCast(me, SPELL_SEARING_TOTEM);
_events.DelayEvents(1 * IN_MILLISECONDS);
_events.ScheduleEvent(EVENT_SEARING_TOTEM, urand(110, 130) * IN_MILLISECONDS);
break;
case EVENT_STRENGTH_OF_EARTH_TOTEM:
DoCast(me, SPELL_STRENGTH_OF_EARTH_TOTEM);
_events.DelayEvents(1 * IN_MILLISECONDS);
_events.ScheduleEvent(EVENT_STRENGTH_OF_EARTH_TOTEM, urand(110, 130) * IN_MILLISECONDS);
break;
case EVENT_HEALING_SURGE:
{
Unit* target = NULL;
if (me->GetHealthPct() < 85)
target = me;
else if (Player* player = GetPlayerForEscort())
if (player->GetHealthPct() < 85)
target = player;
if (target)
{
DoCast(target, SPELL_HEALING_SURGE);
_events.ScheduleEvent(EVENT_HEALING_SURGE, 10 * IN_MILLISECONDS);
}
else
_events.ScheduleEvent(EVENT_HEALING_SURGE, 2 * IN_MILLISECONDS);
break;
}
default:
break;
}
}
DoMeleeAttackIfReady();
}
if (HasEscortState(STATE_ESCORT_NONE))
return;
npc_escortAI::UpdateAI(diff);
if (_phase)
{
if (_moveTimer <= diff)
{
switch (_phase)
{
case PHASE_WP_26: //debug skip path to point 26, buggy path calculation
me->GetMotionMaster()->MovePoint(WP_DEBUG_2, -2021.77f, -10648.8f, 129.903f, false);
_moveTimer = 2 * IN_MILLISECONDS;
_phase = PHASE_CONTINUE;
break;
case PHASE_CONTINUE: // continue escort
SetEscortPaused(false);
_moveTimer = 0 * IN_MILLISECONDS;
_phase = PHASE_NONE;
break;
case PHASE_WP_22: //debug skip path to point 22, buggy path calculation
me->GetMotionMaster()->MovePoint(WP_EXPLOSIVES_FIRST_PLANT, -1958.026f, -10660.465f, 111.547f, false);
Talk(SAY_LEGOSO_3);
_moveTimer = 2 * IN_MILLISECONDS;
_phase = PHASE_PLANT_FIRST_KNEEL;
break;
case PHASE_PLANT_FIRST_KNEEL: // plant first explosives stage 1 kneel
me->SetStandState(UNIT_STAND_STATE_KNEEL);
_moveTimer = 10 * IN_MILLISECONDS;
_phase = PHASE_PLANT_FIRST_STAND;
break;
case PHASE_PLANT_FIRST_STAND: // plant first explosives stage 1 stand
me->SetStandState(UNIT_STAND_STATE_STAND);
_moveTimer = 0.5* IN_MILLISECONDS;
_phase = PHASE_PLANT_FIRST_WORK;
break;
case PHASE_PLANT_FIRST_WORK: // plant first explosives stage 2 work
Talk(SAY_LEGOSO_4);
_moveTimer = 17.5 * IN_MILLISECONDS;
_phase = PHASE_PLANT_FIRST_FINISH;
break;
case PHASE_PLANT_FIRST_FINISH: // plant first explosives finish
_explosivesGuids.clear();
for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
{
if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i].m_positionX, ExplosivesPos[0][i].m_positionY, ExplosivesPos[0][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
_explosivesGuids.push_back(explosive->GetGUID());
}
me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); // reset anim state
//.........这里部分代码省略.........
示例13: WaypointReached
void WaypointReached(uint32 i)
{
Player *player = GetPlayerForEscort();
if (!player)
return;
switch(i)
{
case 0:
me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, player->GetGUID());
break;
case 1:
me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, player->GetGUID());
break;
case 7:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, player->GetGUID());
if (pInstance)
{
if (Creature* jaz = Unit::GetCreature(*me, pInstance->GetData64(DATA_JAZ)))
{
if (!jaz->isAlive())
jaz->Respawn();
jaz->SetVisibility(VISIBILITY_ON);
jaz->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
SetEscortPaused(true);
break;
case 8:
me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, player->GetGUID());
break;
case 11:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, player->GetGUID());
if (pInstance)
{
if (Creature* shill = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHILL)))
{
if (!shill->isAlive())
shill->Respawn();
shill->SetVisibility(VISIBILITY_ON);
shill->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
SetEscortPaused(true);
break;
case 12:
me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, player->GetGUID());
break;
case 13:
me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, player->GetGUID());
break;
case 20:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, player->GetGUID());
if (pInstance)
{
if (Creature* crest = Unit::GetCreature(*me, pInstance->GetData64(DATA_CREST)))
{
if (!crest->isAlive())
crest->Respawn();
crest->SetVisibility(VISIBILITY_ON);
crest->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
SetEscortPaused(true);
break;
case 21:
me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, player->GetGUID());
break;
case 23:
me->HandleEmoteCommand(EMOTE_STATE_POINT);
me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, player->GetGUID());
if (pInstance)
{
if (Creature* tobias = Unit::GetCreature(*me, pInstance->GetData64(DATA_TOBIAS)))
{
if (!tobias->isAlive())
tobias->Respawn();
tobias->SetVisibility(VISIBILITY_ON);
tobias->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
SetEscortPaused(true);
break;
case 24:
me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, player->GetGUID());
break;
case 31:
me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, player->GetGUID());
break;
case 32:
me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, player->GetGUID());
if (pInstance)
{
if (Unit *qstarter = Unit::GetUnit(*me, pInstance->GetData64(Q_STARTER)))
((Player*)qstarter)->GroupEventHappens(QUEST_JAIL_BREAK, me);
//.........这里部分代码省略.........
示例14: WaypointReached
void WaypointReached(uint32 waypointId) override
{
Player* player = GetPlayerForEscort();
if (!player)
return;
switch (waypointId)
{
case WP_START:
SetEscortPaused(true);
me->SetFacingToObject(player);
Talk(SAY_LEGOSO_1);
_moveTimer = 2.5 * IN_MILLISECONDS;
_phase = PHASE_CONTINUE;
break;
case WP_EXPLOSIVES_FIRST_POINT:
SetEscortPaused(true);
Talk(SAY_LEGOSO_2);
_moveTimer = 8 * IN_MILLISECONDS;
_phase = PHASE_WP_22;
break;
case WP_EXPLOSIVES_FIRST_PLANT:
me->SetFacingTo(1.46f);
break;
case WP_EXPLOSIVES_FIRST_DETONATE:
SetEscortPaused(true);
me->SetFacingTo(1.05f);
_moveTimer = 1 * IN_MILLISECONDS;
_phase = PHASE_PLANT_FIRST_TIMER_1;
break;
case WP_DEBUG_1:
SetEscortPaused(true);
_moveTimer = 0.5 * IN_MILLISECONDS;
_phase = PHASE_WP_26;
break;
case WP_SIRONAS_HILL:
{
SetEscortPaused(true);
//Find Sironas and make it respawn if needed
Creature* sironas = NULL;
Trinity::AllCreaturesOfEntryInRange check(me, NPC_SIRONAS, SIZE_OF_GRIDS);
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, sironas, check);
me->VisitNearbyObject(SIZE_OF_GRIDS, searcher);
if (sironas)
{
if (!sironas->IsAlive())
sironas->Respawn(true);
sironas->AI()->DoAction(ACTION_SIRONAS_CHANNEL_START);
me->SetFacingToObject(sironas);
}
_moveTimer = 1 * IN_MILLISECONDS;
_phase = PHASE_FEEL_SIRONAS_1;
break;
}
case WP_EXPLOSIVES_SECOND_BATTLEROAR:
SetEscortPaused(true);
_moveTimer = 0.2 * IN_MILLISECONDS;
_phase = PHASE_MEET_SIRONAS_ROAR;
break;
case WP_EXPLOSIVES_SECOND_PLANT:
SetEscortPaused(true);
_moveTimer = 0.5 * IN_MILLISECONDS;
_phase = PHASE_PLANT_SECOND_KNEEL;
break;
case WP_EXPLOSIVES_SECOND_DETONATE:
SetEscortPaused(true);
me->SetFacingTo(5.7f);
_moveTimer = 2 * IN_MILLISECONDS;
_phase = PHASE_PLANT_SECOND_TIMER_1;
break;
default:
break;
}
}
示例15: WaypointReached
void WaypointReached(uint32 i)
{
if (!pInstance)
return;
switch(i)
{
case 8:
SetRun(false);
me->SummonCreature(18764, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 9:
DoScriptText(SAY_TH_ARMORY, me);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_MODEL);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, THRALL_SHIELD_MODEL);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, THRALL_SHIELD_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038);
break;
case 10:
me->SetDisplayId(THRALL_MODEL_EQUIPPED);
break;
case 11:
SetRun();
break;
case 15:
me->SummonCreature(MOB_ENTRY_RIFLE, 2200.28f, 137.37f, 87.93f, 5.07f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_WARDEN, 2197.44f, 131.83f, 87.93f, 0.78f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2203.62f, 135.40f, 87.93f, 3.70f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2200.75f, 130.13f, 87.93f, 1.48f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 21:
me->SummonCreature(MOB_ENTRY_RIFLE, 2135.80f, 154.01f, 67.45f, 4.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_WARDEN, 2144.36f, 151.87f, 67.74f, 4.46f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2142.12f, 154.41f, 67.12f, 4.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2138.08f, 155.38f, 67.24f, 4.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 25:
me->SummonCreature(MOB_ENTRY_RIFLE, 2102.98f, 192.17f, 65.24f, 6.02f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_WARDEN, 2108.48f, 198.75f, 65.18f, 5.15f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2106.11f, 197.29f, 65.18f, 5.63f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 29:
DoScriptText(SAY_TH_SKARLOC_MEET, me);
me->SummonCreature(ENTRY_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
//temporary, skarloc should rather be triggered to walk up to thrall
break;
case 30:
SetEscortPaused(true);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
SetRun(false);
break;
case 31:
DoScriptText(SAY_TH_MOUNTS_UP, me);
DoMount();
SetRun();
break;
case 37:
//possibly regular patrollers? If so, remove this and let database handle them
me->SummonCreature(MOB_ENTRY_WATCHMAN, 2124.26f, 522.16f, 56.87f, 3.99f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_WATCHMAN, 2121.69f, 525.37f, 57.11f, 4.01f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_SENTRY, 2124.65f, 524.55f, 56.63f, 3.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 59:
me->SummonCreature(SKARLOC_MOUNT, 2488.64f, 625.77f, 58.26f, 4.71f, TEMPSUMMON_TIMED_DESPAWN, 10000);
DoUnmount();
HadMount = false;
SetRun(false);
break;
case 60:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
//make horsie run off
SetEscortPaused(true);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
pInstance->SetData(TYPE_THRALL_PART2, DONE);
SetRun();
break;
case 64:
SetRun(false);
break;
case 68:
me->SummonCreature(MOB_ENTRY_BARN_PROTECTOR, 2500.22f, 692.60f, 55.50f, 2.84f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_BARN_LOOKOUT, 2500.13f, 696.55f, 55.51f, 3.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
me->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 71:
SetRun();
break;
case 81:
SetRun(false);
break;
case 83:
me->SummonCreature(MOB_ENTRY_CHURCH_PROTECTOR, 2627.33f, 646.82f, 56.03f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
me->SummonCreature(MOB_ENTRY_CHURCH_LOOKOUT, 2624.14f, 648.03f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2625.32f, 649.60f, 56.03f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
break;
//.........这里部分代码省略.........