void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { case 3: DoScriptText(SAY_ENTER_OWL_THICKET, m_creature); break; case 10: // Cavern 1 case 15: // Cavern 2 case 20: // Cavern 3 case 25: // Cavern 4 case 36: // Cavern 5 m_uiCurrentWaypoint = uiPointId; DoChannelTorchSpell(); break; case 39: m_uiCurrentWaypoint = uiPointId; StartNextDialogueText(SAY_REACH_ALTAR_1); SetEscortPaused(true); break; case 41: { // Search for all nearest lights and respawn them std::list<GameObject*> m_lEluneLights; GetGameObjectListWithEntryInGrid(m_lEluneLights, m_creature, GO_ELUNE_LIGHT, 20.0f); for (std::list<GameObject*>::const_iterator itr = m_lEluneLights.begin(); itr != m_lEluneLights.end(); ++itr) { if ((*itr)->isSpawned()) continue; (*itr)->SetRespawnTime(115); (*itr)->Refresh(); } if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) m_creature->SetFacingToObject(pAltar); break; } case 42: // Summon the 2 priestess SetEscortPaused(true); DoSummonPriestess(); DoScriptText(SAY_RANSHALLA_ALTAR_2, m_creature); break; case 44: // Stop the escort and turn towards the altar SetEscortPaused(true); if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) m_creature->SetFacingToObject(pAltar); break; } }
void WaypointReached(uint32 pointId) { switch(pointId) { case 3: Talk(SAY_ENTER_OWL_THICKET); break; case 10: // Cavern 1 case 15: // Cavern 2 case 20: // Cavern 3 case 25: // Cavern 4 case 36: // Cavern 5 DoChannelTorchSpell(); break; case 39: StartNextDialogueText(SAY_REACH_ALTAR_1); SetEscortPaused(true); break; case 41: { // Search for all nearest lights and respawn them std::list<GameObject*> eluneLights; GetGameObjectListWithEntryInGrid(eluneLights, me, GO_ELUNE_LIGHT, 20.0f); for (std::list<GameObject*>::const_iterator itr = eluneLights.begin(); itr != eluneLights.end(); ++itr) { if ((*itr)->isSpawned()) continue; (*itr)->SetRespawnTime(115); (*itr)->Refresh(); } if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID)) me->SetFacingToObject(altar); break; } case 42: // Summon the 2 priestess SetEscortPaused(true); DoSummonPriestess(); Talk(SAY_RANSHALLA_ALTAR_2); events.ScheduleEvent(EVENT_RESUME,2000); break; case 44: // Stop the escort and turn towards the altar SetEscortPaused(true); if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID)) me->SetFacingToObject(altar); break; } }
void JustDidDialogueStep(int32 iEntry) { switch(iEntry) { case NPC_RANSHALLA: // Start the altar channeling DoChannelTorchSpell(true); break; case SAY_RANSHALLA_ALTAR_6: SetEscortPaused(false); break; case SAY_PRIESTESS_ALTAR_8: // make the gem respawn if (GameObject* pGem = GetClosestGameObjectWithEntry(m_creature, GO_ELUNE_GEM, 10.0f)) { if (pGem->isSpawned()) break; pGem->SetRespawnTime(90); pGem->Refresh(); } break; case SAY_PRIESTESS_ALTAR_9: // move near the escort npc if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_firstPriestessGuid)) pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[6].m_fX, aWingThicketLocations[6].m_fY, aWingThicketLocations[6].m_fZ); break; case SAY_PRIESTESS_ALTAR_13: // summon the Guardian of Elune if (Creature* pGuard = m_creature->SummonCreature(NPC_GUARDIAN_ELUNE, aWingThicketLocations[2].m_fX, aWingThicketLocations[2].m_fY, aWingThicketLocations[2].m_fZ, aWingThicketLocations[2].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0)) { pGuard->GetMotionMaster()->MovePoint(0, aWingThicketLocations[5].m_fX, aWingThicketLocations[5].m_fY, aWingThicketLocations[5].m_fZ); m_guardEluneGuid = pGuard->GetObjectGuid(); } // summon the Voice of Elune if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) { if (Creature* pVoice = m_creature->SummonCreature(NPC_VOICE_ELUNE, pAltar->GetPositionX(), pAltar->GetPositionY(), pAltar->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000)) m_voiceEluneGuid = pVoice->GetObjectGuid(); } break; case SAY_VOICE_ALTAR_15: // move near the escort npc and continue dialogue if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_secondPriestessGuid)) { DoScriptText(SAY_PRIESTESS_ALTAR_14, pPriestess); pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[7].m_fX, aWingThicketLocations[7].m_fY, aWingThicketLocations[7].m_fZ); } break; case SAY_PRIESTESS_ALTAR_19: // make the voice of elune leave if (Creature* pGuard = m_creature->GetMap()->GetCreature(m_guardEluneGuid)) { pGuard->GetMotionMaster()->MovePoint(0, aWingThicketLocations[2].m_fX, aWingThicketLocations[2].m_fY, aWingThicketLocations[2].m_fZ); pGuard->ForcedDespawn(4000); } break; case SAY_PRIESTESS_ALTAR_20: // make the first priestess leave if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_firstPriestessGuid)) { pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[0].m_fX, aWingThicketLocations[0].m_fY, aWingThicketLocations[0].m_fZ); pPriestess->ForcedDespawn(4000); } break; case SAY_PRIESTESS_ALTAR_21: // make the second priestess leave if (Creature* pPriestess = m_creature->GetMap()->GetCreature(m_secondPriestessGuid)) { pPriestess->GetMotionMaster()->MovePoint(0, aWingThicketLocations[1].m_fX, aWingThicketLocations[1].m_fY, aWingThicketLocations[1].m_fZ); pPriestess->ForcedDespawn(4000); } break; case DATA_EVENT_END: // Turn towards the player if (Player* pPlayer = GetPlayerForEscort()) { m_creature->SetFacingToObject(pPlayer); DoScriptText(SAY_QUEST_END_1, m_creature, pPlayer); } break; case SAY_QUEST_END_2: // Turn towards the altar and kneel - quest complete if (GameObject* pAltar = m_creature->GetMap()->GetGameObject(m_altarGuid)) m_creature->SetFacingToObject(pAltar); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); if (Player* pPlayer = GetPlayerForEscort()) pPlayer->GroupEventHappens(QUEST_GUARDIANS_ALTAR, m_creature); break; } }
void JustDidDialogueStep(int32 entry) { switch (entry) { case NPC_RANSHALLA: // Start the altar channeling DoChannelTorchSpell(true); break; case SAY_RANSHALLA_ALTAR_6: SetEscortPaused(false); break; case SAY_PRIESTESS_ALTAR_8: // make the gem respawn if (GameObject* gem = GetClosestGameObjectWithEntry(me, GO_ELUNE_GEM, 10.0f)) { if (gem->isSpawned()) break; gem->SetRespawnTime(90); gem->Refresh(); } break; case SAY_PRIESTESS_ALTAR_9: // move near the escort npc if (Creature* priestess = me->GetMap()->GetCreature(_firstPriestessGUID)) priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[6].m_positionX, wingThicketLocations[6].m_positionY, wingThicketLocations[6].m_positionZ); break; case SAY_PRIESTESS_ALTAR_13: // summon the Guardian of Elune if (Creature* guard = me->SummonCreature(NPC_GUARDIAN_ELUNE, wingThicketLocations[2].m_positionX, wingThicketLocations[2].m_positionY, wingThicketLocations[2].m_positionZ, wingThicketLocations[2].m_orientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) { guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[5].m_positionX, wingThicketLocations[5].m_positionY, wingThicketLocations[5].m_positionZ); _guardEluneGUID = guard->GetGUID(); } // summon the Voice of Elune if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID)) { if (Creature* voice = me->SummonCreature(NPC_VOICE_ELUNE, altar->GetPositionX(), altar->GetPositionY(), altar->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000)) _voiceEluneGUID = voice->GetGUID(); } break; case SAY_VOICE_ALTAR_15: // move near the escort npc and continue dialogue if (Creature* priestess = me->GetMap()->GetCreature(_secondPriestessGUID)) { priestess->AI()->Talk(SAY_PRIESTESS_ALTAR_14); priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[7].m_positionX, wingThicketLocations[7].m_positionY, wingThicketLocations[7].m_positionZ); } break; case SAY_PRIESTESS_ALTAR_19: // make the voice of elune leave if (Creature* guard = me->GetMap()->GetCreature(_guardEluneGUID)) { guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[2].m_positionX, wingThicketLocations[2].m_positionY, wingThicketLocations[2].m_positionZ); guard->DespawnOrUnsummon(4000); } break; case SAY_PRIESTESS_ALTAR_20: // make the first priestess leave if (Creature* priestess = me->GetMap()->GetCreature(_firstPriestessGUID)) { priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[0].m_positionX, wingThicketLocations[0].m_positionY, wingThicketLocations[0].m_positionZ); priestess->DespawnOrUnsummon(4000); } break; case SAY_PRIESTESS_ALTAR_21: // make the second priestess leave if (Creature* priestess = me->GetMap()->GetCreature(_secondPriestessGUID)) { priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[1].m_positionX, wingThicketLocations[1].m_positionY, wingThicketLocations[1].m_positionZ); priestess->DespawnOrUnsummon(4000); } break; case DATA_EVENT_END: // Turn towards the player if (Player* player = GetPlayerForEscort()) { me->SetFacingToObject(player); Talk(SAY_RANSHALLA_END_1, player->GetGUID()); } break; case SAY_RANSHALLA_END_2: // Turn towards the altar and kneel - quest complete if (GameObject* altar = me->GetMap()->GetGameObject(_altarGUID)) { me->SetFacingToObject(altar); altar->ResetDoorOrButton(); } me->SetStandState(UNIT_STAND_STATE_KNEEL); if (Player* player = GetPlayerForEscort()) { player->GroupEventHappens(QUEST_GUARDIANS_ALTAR, me); Talk(SAY_RANSHALLA_END_2, player->GetGUID()); } me->DespawnOrUnsummon(4000); break; } }