void JustReachedHome() override { if (!m_pInstance) return; if (m_bEventFinished) { if (m_pInstance->GetData(TYPE_ALGALON) == DONE) { // complete the achiev and start outro dialogue DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED); StartNextDialogueText(NPC_ALGALON); } else StartNextDialogueText(SAY_DESPAWN_1); } else m_pInstance->SetData(TYPE_ALGALON, FAIL); // despawn everything for (GuidList::const_iterator itr = m_lSummonedGuids.begin(); itr != m_lSummonedGuids.end(); ++itr) { if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) pSummoned->ForcedDespawn(); } }
void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { case 0: if (Player* pPlayer = GetPlayerForEscort()) { DoScriptText(SAY_REMULOS_INTRO_1, m_creature, pPlayer); } break; case 1: DoScriptText(SAY_REMULOS_INTRO_2, m_creature); break; case 13: StartNextDialogueText(NPC_REMULOS); SetEscortPaused(true); break; case 17: StartNextDialogueText(SAY_REMULOS_DEFEND_2); SetEscortPaused(true); break; case 18: SetEscortPaused(true); break; } }
void WaypointReached(uint32 uiPointId) override { if (!m_pInstance) return; switch (uiPointId) { case 0: DoCastSpellIfCan(m_creature, SPELL_TUXEDO); m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); break; case 4: switch (m_pInstance->GetData(TYPE_OPERA_PERFORMANCE)) { case OPERA_EVENT_WIZARD_OZ: StartNextDialogueText(SAY_BARNES_OZ_1); break; case OPERA_EVENT_RED_RIDING_HOOD: StartNextDialogueText(SAY_BARNES_HOOD_1); break; case OPERA_EVENT_ROMULO_AND_JUL: StartNextDialogueText(SAY_BARNES_RAJ_1); break; } SetEscortPaused(true); m_creature->SummonCreature(NPC_SPOTLIGHT, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0); break; case 8: m_pInstance->DoUseDoorOrButton(GO_STAGE_DOOR_LEFT); break; case 9: m_pInstance->DoPrepareOperaStage(m_creature); break; } }
void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { case 0: if (!m_pScriptedMap) break; // Prepare Jonathan for the first event if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) { // Summon 3 guards on each side and move Jonathan in the middle for (uint8 i = 0; i < MAX_ROYAL_GUARDS; ++i) { if (Creature* pTemp = m_creature->SummonCreature(NPC_GUARD_ROYAL, aGuardLocations[i][0], aGuardLocations[i][1], aGuardLocations[i][2], aGuardLocations[i][3], TEMPSUMMON_TIMED_DESPAWN, 180000)) m_guardsGuid[i] = pTemp->GetObjectGuid(); } pJonathan->SetWalk(false); pJonathan->Unmount(); pJonathan->GetMotionMaster()->MovePoint(0, aMoveLocations[0][0], aMoveLocations[0][1], aMoveLocations[0][2]); } break; case 1: StartNextDialogueText(SAY_JON_DIALOGUE_1); SetEscortPaused(true); break; case 3: m_bCanGuardSalute = true; break; case 11: if (!m_pScriptedMap) break; // We can reset Jonathan now if (Creature* pJonathan = m_pScriptedMap->GetSingleCreatureFromStorage(NPC_JONATHAN)) { pJonathan->SetWalk(true); pJonathan->SetStandState(UNIT_STAND_STATE_STAND); pJonathan->GetMotionMaster()->MoveTargetedHome(); } break; case 22: SetEscortPaused(true); m_creature->SetFacingTo(5.41f); StartNextDialogueText(NPC_GUARD_ROYAL); break; case 24: m_bCanGuardSalute = false; break; case 25: StartNextDialogueText(NPC_WRYNN); SetEscortPaused(true); m_bCanGuardSalute = false; break; } }
void SummonedMovementInform(Creature* pSummoned, uint32 /*uiMotionType*/, uint32 uiPointId) override { if (pSummoned->GetEntry() != NPC_TIRION_FORDRING) return; if (uiPointId == 100) { StartNextDialogueText(SAY_TIRION_1); if (Creature* pIsillien = m_creature->GetMap()->GetCreature(m_isillenGuid)) pSummoned->SetFacingToObject(pIsillien); } else if (uiPointId == 200) StartNextDialogueText(EMOTE_KNEEL); }
void WaypointReached(uint32 uiPointId) override { switch (uiPointId) { case 25: SetEscortPaused(true); StartNextDialogueText(SAY_EXIT_KEEP); break; case 55: SetEscortPaused(true); StartNextDialogueText(SAY_REACH_TOWER); break; } }
void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override { if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER) { Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue)); DoScriptText(SAY_ESCORT_START, m_creature); m_creature->SetFactionTemporary(FACTION_ESCORT_N_FRIEND_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); } else if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER && uiMiscValue == QUEST_ID_SCARLET_SUBTERFUGE) StartNextDialogueText(NPC_SCARLET_CAVALIER); else if (eventType == AI_EVENT_CUSTOM_B && pInvoker->GetEntry() == NPC_ISILLIEN) { StartNextDialogueText(NPC_TIRION_FORDRING); m_creature->SummonCreature(NPC_TIRION_FORDRING, 2620.273f, -1920.917f, 74.25f, 0, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS); } }
void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; switch (uiPointId) { case POINT_ID_GATE: // Cast time stop when he reaches the gate DoCastSpellIfCan(m_creature, SPELL_TIME_STOP); StartNextDialogueText(SPELL_TIME_STOP); break; case POINT_ID_SCEPTER_1: // Pickup the pieces DoScriptText(EMOTE_ANACHRONOS_PICKUP, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_uiEventTimer = 2000; break; case POINT_ID_SCEPTER_2: // Pickup the pieces DoScriptText(SAY_ANACHRONOS_EPILOGUE_8, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_uiEventTimer = 4000; break; case POINT_ID_EXIT: // Spell was removed, manually change the display // DoCastSpellIfCan(m_creature, SPELL_BRONZE_DRAGON_TRANSFORM); m_creature->SetDisplayId(DISPLAY_ID_BRONZE_DRAGON); m_uiEventTimer = 4000; break; } }
void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != WAYPOINT_MOTION_TYPE) return; switch (uiPointId) { case 3: // pause wp and resume dialogue m_creature->addUnitState(UNIT_STAT_WAYPOINT_PAUSED); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_bEventInProgress = true; if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) { m_creature->SetFacingToObject(pColonel); pColonel->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } StartNextDialogueText(SAY_EXORCISM_3); break; case 6: // event completed - wait for player to get quest credit by gossip if (Creature* pColonel = m_creature->GetMap()->GetCreature(m_colonelGuid)) m_creature->SetFacingToObject(pColonel); m_creature->GetMotionMaster()->Clear(); m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); m_bEventComplete = true; break; } }
void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 /*uiMiscValue*/) override { if (pInvoker->GetTypeId() == TYPEID_PLAYER) { switch (eventType) { case AI_EVENT_START_EVENT: // start the actuall exorcism if (Creature* pColonel = GetClosestCreatureWithEntry(m_creature, NPC_COLONEL_JULES, 15.0f)) m_colonelGuid = pColonel->GetObjectGuid(); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); StartNextDialogueText(SAY_EXORCISM_1); break; case AI_EVENT_CUSTOM_A: // event complete - give credit and reset, TODO rethink code distribution between this and the caller if (IsExorcismComplete()) { // kill credit ((Player*)pInvoker)->RewardPlayerAndGroupAtEvent(pSender->GetEntry(), pSender); // reset Anchorite and Colonel pSender->AI()->EnterEvadeMode(); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); ((Player*)pInvoker)->SEND_GOSSIP_MENU(TEXT_ID_CLEANSED, pSender->GetObjectGuid()); EnterEvadeMode(); } break; default: break; } } }
void MovementInform(uint32 uiMoveType, uint32 uiPointId) override { if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) return; switch (uiPointId) { case PHASE_CHANNEL: if (DoCastSpellIfCan(m_creature, SPELL_AKAMA_SOUL_CHANNEL) == CAST_OK) { m_uiPhase = PHASE_CHANNEL; GuidList m_lChannelersList; m_pInstance->GetChannelersGuidList(m_lChannelersList); for (GuidList::const_iterator itr = m_lChannelersList.begin(); itr != m_lChannelersList.end(); ++itr) { if (Creature* pChanneler = m_creature->GetMap()->GetCreature(*itr)) pChanneler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } break; case PHASE_EPILOGUE: // Start epilogue here if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA)) m_creature->SetFacingToObject(pShade); StartNextDialogueText(SPELL_AKAMA_SOUL_RETRIEVE); break; } }
void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE) return; switch (uiPointId) { case 0: case 1: case 3: ++m_uiPointId; m_creature->GetMotionMaster()->MovePoint(m_uiPointId, aAndorovMoveLocs[m_uiPointId].m_fX, aAndorovMoveLocs[m_uiPointId].m_fY, aAndorovMoveLocs[m_uiPointId].m_fZ); break; case POINT_ID_MOVE_INTRO: m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); m_creature->SetFacingTo(aAndorovMoveLocs[3].m_fO); ++m_uiPointId; break; case POINT_ID_MOVE_ATTACK: // Start dialogue only the first time it reaches the point if (m_uiPointId == 4) { StartNextDialogueText(SAY_ANDOROV_INTRO_3); ++m_uiPointId; } break; } }
void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); // Check if all Onyxia guards are dead if (m_uiGuardCheckTimer) { if (m_uiGuardCheckTimer <= uiDiff) { uint8 uiDeadGuardsCount = 0; for (GuidList::const_iterator itr = m_lRoyalGuardsGuidList.begin(); itr != m_lRoyalGuardsGuidList.end(); ++itr) { if (Creature* pGuard = m_creature->GetMap()->GetCreature(*itr)) { if (!pGuard->isAlive() && pGuard->GetEntry() == NPC_GUARD_ONYXIA) ++uiDeadGuardsCount; } } if (uiDeadGuardsCount == m_lRoyalGuardsGuidList.size()) { StartNextDialogueText(NPC_GUARD_ONYXIA); m_uiGuardCheckTimer = 0; } else m_uiGuardCheckTimer = 1000; } else m_uiGuardCheckTimer -= uiDiff; } }
// Boss has an interesting speech before killed, so we need to fake death (without stand state) and allow him to finish his theatre void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override { if (uiDamage < m_creature->GetHealth()) return; // Make sure it won't die by accident if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) { uiDamage = 0; return; } uiDamage = 0; RemoveGravityLapse(); StartNextDialogueText(SAY_DEATH); m_creature->HandleEmote(EMOTE_STATE_TALK); m_creature->InterruptNonMeleeSpells(true); m_creature->SetHealth(1); m_creature->StopMoving(); m_creature->ClearComboPointHolders(); m_creature->RemoveAllAurasOnDeath(); m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->ClearAllReactives(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); }
void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { case NPC_DRAKKISATH: // Just open the doors, don't save anything because it's the last boss DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1); DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2); break; case NPC_CHROMATIC_WHELP: case NPC_CHROMATIC_DRAGON: case NPC_BLACKHAND_HANDLER: // check if it's summoned - some npcs with the same entry are already spawned in the instance if (!pCreature->IsTemporarySummon()) break; --m_uiStadiumMobsAlive; if (m_uiStadiumMobsAlive == 0) DoSendNextStadiumWave(); break; case NPC_GYTH: case NPC_REND_BLACKHAND: --m_uiStadiumMobsAlive; if (m_uiStadiumMobsAlive == 0) StartNextDialogueText(SAY_NEFARIUS_VICTORY); break; } }
void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_bTaelanDead) return; // If Taelan is in fight with Isillien and drops below 50% make him "dead" if (!m_bTaelanDead && m_bFightStarted && m_creature->GetHealthPercent() < 50.0f) { StartNextDialogueText(SAY_KILL_TAELAN_1); m_bTaelanDead = true; } if (m_uiHolyCleaveTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_CLEAVE) == CAST_OK) m_uiHolyCleaveTimer = urand(11000, 13000); } else m_uiHolyCleaveTimer -= uiDiff; if (m_uiHolyStrikeTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HOLY_STRIKE) == CAST_OK) m_uiHolyStrikeTimer = urand(9000, 14000); } else m_uiHolyStrikeTimer -= uiDiff; if (m_uiCrusaderStrike < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CRUSADER_STRIKE) == CAST_OK) m_uiCrusaderStrike = urand(7000, 12000); } else m_uiCrusaderStrike -= uiDiff; if (m_creature->GetHealthPercent() < 75.0f) { if (m_uiHolyLightTimer < uiDiff) { if (Unit* pTarget = DoSelectLowestHpFriendly(50.0f)) { if (DoCastSpellIfCan(pTarget, SPELL_HOLY_LIGHT) == CAST_OK) m_uiHolyLightTimer = urand(10000, 15000); } } else m_uiHolyLightTimer -= uiDiff; } if (!m_bFightStarted && m_creature->GetHealthPercent() < 15.0f) DoCastSpellIfCan(m_creature, SPELL_LAY_ON_HANDS); DoMeleeAttackIfReady(); }
void instance_blackrock_spire::DoSendNextStadiumWave() { if (m_uiStadiumWaves < MAX_STADIUM_WAVES) { // Send current wave mobs if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) { float fX, fY, fZ; for (uint8 i = 0; i < MAX_STADIUM_MOBS_PER_WAVE; ++i) { if (aStadiumEventNpcs[m_uiStadiumWaves][i] == 0) continue; pNefarius->GetRandomPoint(aStadiumLocs[0].m_fX, aStadiumLocs[0].m_fY, aStadiumLocs[0].m_fZ, 7.0f, fX, fY, fZ); fX = std::min(aStadiumLocs[0].m_fX, fX); // Halfcircle - suits better the rectangular form if (Creature* pTemp = pNefarius->SummonCreature(aStadiumEventNpcs[m_uiStadiumWaves][i], fX, fY, fZ, 0.0f, TEMPSPAWN_DEAD_DESPAWN, 0)) { // Get some point in the center of the stadium pTemp->GetRandomPoint(aStadiumLocs[2].m_fX, aStadiumLocs[2].m_fY, aStadiumLocs[2].m_fZ, 5.0f, fX, fY, fZ); fX = std::min(aStadiumLocs[2].m_fX, fX);// Halfcircle - suits better the rectangular form pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); ++m_uiStadiumMobsAlive; } } } DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); } // All waves are cleared - start Gyth intro else if (m_uiStadiumWaves == MAX_STADIUM_WAVES) StartNextDialogueText(SAY_NEFARIUS_LOSE1); else { // Send Gyth if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS)) { // Stop Lord Nefarius from moving and put him back in place pNefarius->GetMotionMaster()->MoveIdle(); pNefarius->GetMotionMaster()->MovePoint(0, aStadiumLocs[5].m_fX, aStadiumLocs[5].m_fY, aStadiumLocs[5].m_fZ); if (Creature* pTemp = pNefarius->SummonCreature(NPC_GYTH, aStadiumLocs[1].m_fX, aStadiumLocs[1].m_fY, aStadiumLocs[1].m_fZ, 0.0f, TEMPSPAWN_DEAD_DESPAWN, 0)) pTemp->GetMotionMaster()->MovePoint(0, aStadiumLocs[2].m_fX, aStadiumLocs[2].m_fY, aStadiumLocs[2].m_fZ); } // Set this to 2, because Rend will be summoned later during the fight m_uiStadiumMobsAlive = 2; DoUseDoorOrButton(GO_GYTH_COMBAT_DOOR); } ++m_uiStadiumWaves; // Stop the timer when all the waves have been sent if (m_uiStadiumWaves >= MAX_STADIUM_WAVES) m_uiStadiumEventTimer = 0; else m_uiStadiumEventTimer = 60000; }
void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) { if (uiType != POINT_MOTION_TYPE || pSummoned->GetEntry() != NPC_PRIESTESS_ELUNE || uiPointId != 1) return; // Start the dialogue when the priestess reach the altar (they should both reach the point in the same time) StartNextDialogueText(SAY_PRIESTESS_ALTAR_3); }
void SummonedCreatureJustDied(Creature* pSummoned) override { // Start outro dialogue when Kil'jaeden is killed if (pSummoned->GetEntry() == NPC_KILJAEDEN) { StartNextDialogueText(NPC_KALECGOS); } }
void JustReachedHome() override { if (m_bScarletComplete) { StartNextDialogueText(SPELL_DEVOTION_AURA); m_bScarletComplete = false; } }
void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override { if (pSpell->Id == SPELL_FIREBALL_REFLECT && pCaster->GetEntry() == NPC_IMAGE_OF_ARCANAGOS) { StartNextDialogueText(SPELL_MANA_SHIELD); DoCastSpellIfCan(m_creature, SPELL_MANA_SHIELD); } }
void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 /*uiMiscValue*/) override { // start intro dialogue if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER) { StartNextDialogueText(NPC_EXPEDITION_ENGINEER); m_playerGuid = pInvoker->GetObjectGuid(); } }
void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId || pSummoned->GetEntry() != NPC_WINDSOR) return; // Summoned npc has escort and this can trigger twice if escort state is not checked if (uiPointId && HasEscortState(STATE_ESCORT_PAUSED)) StartNextDialogueText(NPC_WINDSOR); }
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override { // switch to phase 2 as soon as it's hit by any damage if (m_uiPhase == PHASE_ARENA && uiDamage > 0) { StartNextDialogueText(SAY_JUMP); m_uiPhase = PHASE_TRANSITION; // prepare the hard mode if necessary if (m_pInstance && m_pInstance->GetData(TYPE_THORIM_HARD) != FAIL) { if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF)) pSif->InterruptNonMeleeSpells(false); m_pInstance->SetData(TYPE_THORIM_HARD, DONE); } return; } // handle outro if (uiDamage >= m_creature->GetHealth()) { uiDamage = 0; if (!m_bEventFinished) { if (m_pInstance) { m_pInstance->SetData(TYPE_THORIM, DONE); // start a different outro version for hard mode if (m_pInstance->GetData(TYPE_THORIM_HARD) == DONE) StartNextDialogueText(SPELL_STORMHAMMER_OUTRO); else StartNextDialogueText(SAY_DEFEATED); } m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true); m_creature->setFaction(FACTION_ID_FRIENDLY); m_bEventFinished = true; EnterEvadeMode(); } } }
void MoveInLineOfSight(Unit* pWho) override { if (!m_bEventInProgress && pWho->GetTypeId() == TYPEID_PLAYER) { if (pWho->isAlive() && m_creature->IsWithinDistInMap(pWho, 15.0) && pWho->HasAura(SPELL_ECHO_OF_YMIRON)) { m_pHeldPlayer = pWho->GetObjectGuid(); m_bEventInProgress = true; DoCastSpellIfCan(pWho, SPELL_MAGNETIC_PULL, CAST_TRIGGERED); DoCastSpellIfCan(pWho, SPELL_GRASP_OF_THE_LICH_KING, CAST_TRIGGERED); if (((Player*)pWho)->GetQuestStatus(QUEST_ID_LK_FLAG) == QUEST_STATUS_COMPLETE) StartNextDialogueText(SAY_PERSISTANCE); else StartNextDialogueText(EMOTE_LICH_KING_FACE); } } }
void SummonedCreatureJustDied(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_IRONTREE_STOMPER || pSummoned->GetEntry() == NPC_IRONTREE_WANDERER) { m_lSummonsGuids.remove(pSummoned->GetObjectGuid()); if (m_lSummonsGuids.empty()) StartNextDialogueText(SAY_CLEAR_PATH); } }
void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasYelledIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f) && m_creature->IsWithinLOSInMap(pWho)) { StartNextDialogueText(SAY_SOCCOTHRATES_INTRO_1); m_bHasYelledIntro = true; } ScriptedAI::MoveInLineOfSight(pWho); }
void MoveInLineOfSight(Unit* pWho) override { // The range distance is not sure if (!m_bEventStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && pWho->IsWithinDistInMap(m_creature, 100.0f) && pWho->IsWithinLOSInMap(m_creature)) { StartNextDialogueText(SAY_COUNCIL_INTRO_1); m_bEventStarted = true; } }
void MoveInLineOfSight(Unit* pWho) override { if (!m_bHasDoneIntro && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->IsWithinDistInMap(pWho, 110.0f)) { StartNextDialogueText(SAY_INTRO_1); m_bHasDoneIntro = true; } ScriptedAI::MoveInLineOfSight(pWho); }
void JustReachedHome() override { // after the npc is defeated, start the dialog right after it reaches the evade point if (m_bEventComplete) { if (Player* pPlayer = GetPlayerForEscort()) m_creature->SetFacingToObject(pPlayer); StartNextDialogueText(SAY_SLIM_DEFEAT); } }