void instance_stratholme::DoScarletBastionDefense(uint8 uiStep, Creature* pCreature) { if (!pCreature) return; switch (uiStep) { case BARRICADE: case STAIRS: DoMoveBackDefenders(uiStep, pCreature); return; case TIMMY: pCreature->SummonCreature(NPC_TIMMY_THE_CRUEL, aScourgeInvaders[0].m_fX, aScourgeInvaders[0].m_fY, aScourgeInvaders[0].m_fZ, aScourgeInvaders[0].m_fO, TEMPSPAWN_DEAD_DESPAWN, 0); return; // Scarlet guards spawned case HALL_OF_LIGHTS: case INNER_BASTION_2: DoScriptText(ScarletEventYells[uiStep], pCreature); if (Player* pPlayer = GetPlayerInMap()) DoSpawnScarletGuards(uiStep, pPlayer); return; // Scourge invading case ENTRANCE: case INNER_BASTION_1: DoScriptText(ScarletEventYells[uiStep], pCreature); case CRIMSON_THRONE: if (Player* pPlayer = GetPlayerInMap()) DoSpawnScourgeInvaders(uiStep, pPlayer); } }
void instance_trial_of_the_crusader::JustDidDialogueStep(int32 iEntry) { switch (iEntry) { case NPC_RAMSEY_1: case NPC_RAMSEY_2: case NPC_RAMSEY_3: case NPC_RAMSEY_4: case NPC_RAMSEY_5: DoSummonRamsey(iEntry); break; case SAY_VARIAN_BEAST_1: if (Player* pPlayer = GetPlayerInMap()) { if (Creature* pBeasts = pPlayer->SummonCreature(NPC_BEAST_COMBAT_STALKER, aSpawnPositions[0][0], aSpawnPositions[0][1], aSpawnPositions[0][2], aSpawnPositions[0][3], TEMPSUMMON_DEAD_DESPAWN, 0)) pBeasts->SummonCreature(NPC_GORMOK, aSpawnPositions[1][0], aSpawnPositions[1][1], aSpawnPositions[1][2], aSpawnPositions[1][3], TEMPSUMMON_DEAD_DESPAWN, 0); } break; case NPC_FIZZLEBANG: if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_FIZZLEBANG, aSpawnPositions[5][0], aSpawnPositions[5][1], aSpawnPositions[5][2], aSpawnPositions[5][3], TEMPSUMMON_DEAD_DESPAWN, 0); break; case SAY_WILFRED_JARAXXUS_INTRO_3: if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_JARAXXUS, aSpawnPositions[6][0], aSpawnPositions[6][1], aSpawnPositions[6][2], aSpawnPositions[6][3], TEMPSUMMON_DEAD_DESPAWN, 0); break; case NPC_FJOLA: if (Player* pPlayer = GetPlayerInMap()) { pPlayer->SummonCreature(NPC_FJOLA, aSpawnPositions[7][0], aSpawnPositions[7][1], aSpawnPositions[7][2], aSpawnPositions[7][3], TEMPSUMMON_DEAD_DESPAWN, 0); pPlayer->SummonCreature(NPC_EYDIS, aSpawnPositions[8][0], aSpawnPositions[8][1], aSpawnPositions[8][2], aSpawnPositions[8][3], TEMPSUMMON_DEAD_DESPAWN, 0); } break; } }
void instance_naxxramas::Update(uint32 uiDiff) { if (m_uiTauntTimer) { if (m_uiTauntTimer <= uiDiff) { DoTaunt(); m_uiTauntTimer = 0; } else m_uiTauntTimer -= uiDiff; } if (m_uiSapphSpawnTimer) { if (m_uiSapphSpawnTimer <= uiDiff) { if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_SAPPHIRON, aSapphPositions[0], aSapphPositions[1], aSapphPositions[2], aSapphPositions[3], TEMPSUMMON_DEAD_DESPAWN, 0); m_uiSapphSpawnTimer = 0; } else m_uiSapphSpawnTimer -= uiDiff; } m_dialogueHelper.DialogueUpdate(uiDiff); }
uint64 GetData64(uint32 id) { switch (id) { case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon; case DATA_KALECGOS_HUMAN: return Kalecgos_Human; case DATA_SATHROVARR: return Sathrovarr; case DATA_GO_FORCEFIELD: return ForceField; case DATA_BRUTALLUS: return Brutallus; case DATA_MADRIGOSA: return Madrigosa; case DATA_FELMYST: return Felmyst; case DATA_ALYTHESS: return Alythess; case DATA_SACROLASH: return Sacrolash; case DATA_MURU: return Muru; case DATA_KILJAEDEN: return KilJaeden; case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; case DATA_ANVEENA: return Anveena; case DATA_KALECGOS_KJ: return KalecgosKJ; case DATA_PLAYER_GUID: Player* Target = GetPlayerInMap(); return Target->GetGUID(); } switch(id) { case DATA_GO_FORECEFIELD_COLL_1: return ForceField_Collision[0]; break; case DATA_GO_FORECEFIELD_COLL_2: return ForceField_Collision[1]; break; } return 0; }
void instance_mechanar::DoSpawnBridgeWave() { if (Player* pPlayer = GetPlayerInMap(true, false)) { for (uint8 i = 0; i < MAX_BRIDGE_TRASH; ++i) { // Skip the blank entries if (aBridgeEventLocs[m_uiBridgeEventPhase][i].m_uiSpawnEntry == 0) break; if (Creature* pTemp = pPlayer->SummonCreature(aBridgeEventLocs[m_uiBridgeEventPhase][i].m_uiSpawnEntry, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fX, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fY, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fZ, aBridgeEventLocs[m_uiBridgeEventPhase][i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) { pTemp->CastSpell(pTemp, SPELL_ETHEREAL_TELEPORT, false); switch (m_uiBridgeEventPhase) { case 1: // These waves should attack the player directly case 2: case 4: case 5: pTemp->AI()->AttackStart(pPlayer); break; case 6: // Pathaleon DoScriptText(SAY_PATHALEON_INTRO, pTemp); break; } } } } ++m_uiBridgeEventPhase; }
void Update(uint32 diff) { if (BaronRun_Timer) { if (BaronRun_Timer <= diff) { if (GetData(TYPE_BARON_RUN) != DONE) SetData(TYPE_BARON_RUN, FAIL); BaronRun_Timer = 0; debug_log("TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN)); }else BaronRun_Timer -= diff; } if (SlaugtherSquare_Timer) { if (SlaugtherSquare_Timer <= diff) { if (Player *p = GetPlayerInMap()) { for(uint8 i = 0; i < 4; i++) p->SummonCreature(C_BLACK_GUARD,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); UpdateGoState(ziggurat4GUID,0,false); UpdateGoState(ziggurat5GUID,0,false); debug_log("TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron."); } SlaugtherSquare_Timer = 0; }else SlaugtherSquare_Timer -= diff; } }
//what other conditions to check? bool CanProgressEvent() { if (!GetPlayerInMap()) return false; return true; }
void instance_sunken_temple::DoSpawnAtalarionIfCan() { // Return if already summoned if (GetSingleCreatureFromStorage(NPC_ATALARION)) { return; } Player* pPlayer = GetPlayerInMap(); if (!pPlayer) { return; } pPlayer->SummonCreature(NPC_ATALARION, aSunkenTempleLocation[0].m_fX, aSunkenTempleLocation[0].m_fY, aSunkenTempleLocation[0].m_fZ, aSunkenTempleLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); // Spawn the idol of Hakkar DoRespawnGameObject(GO_IDOL_OF_HAKKAR, 30 * MINUTE); // Spawn the big green lights for (GuidList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) { DoRespawnGameObject(*itr, 30 * MINUTE); } }
void instance_temple_of_ahnqiraj::Update(uint32 uiDiff) { m_dialogueHelper.DialogueUpdate(uiDiff); if (GetData(TYPE_CTHUN) == IN_PROGRESS || GetData(TYPE_CTHUN) == DONE) return; if (m_uiCthunWhisperTimer < uiDiff) { if (Player* pPlayer = GetPlayerInMap()) { if (Creature* pCthun = GetSingleCreatureFromStorage(NPC_CTHUN)) { // ToDo: also cast the C'thun Whispering charm spell - requires additional research switch (urand(0, 7)) { case 0: DoScriptText(SAY_CTHUN_WHISPER_1, pCthun, pPlayer); break; case 1: DoScriptText(SAY_CTHUN_WHISPER_2, pCthun, pPlayer); break; case 2: DoScriptText(SAY_CTHUN_WHISPER_3, pCthun, pPlayer); break; case 3: DoScriptText(SAY_CTHUN_WHISPER_4, pCthun, pPlayer); break; case 4: DoScriptText(SAY_CTHUN_WHISPER_5, pCthun, pPlayer); break; case 5: DoScriptText(SAY_CTHUN_WHISPER_6, pCthun, pPlayer); break; case 6: DoScriptText(SAY_CTHUN_WHISPER_7, pCthun, pPlayer); break; case 7: DoScriptText(SAY_CTHUN_WHISPER_8, pCthun, pPlayer); break; } } } m_uiCthunWhisperTimer = urand(1.5 * MINUTE * IN_MILLISECONDS, 5 * MINUTE * IN_MILLISECONDS); } else m_uiCthunWhisperTimer -= uiDiff; }
void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) { // Do not summon, if event finished if (m_auiEncounter[TYPE_GANDLING] == DONE) return; // Summon only once if (GetSingleCreatureFromStorage(NPC_DARKMASTER_GANDLING)) return; Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; // Check if all the six bosses are done first if (m_auiEncounter[TYPE_MALICIA] == DONE && m_auiEncounter[TYPE_THEOLEN] == DONE && m_auiEncounter[TYPE_POLKELT] == DONE && m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) { if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, aGandlingSpawnLocs[0].m_fX, aGandlingSpawnLocs[0].m_fY, aGandlingSpawnLocs[0].m_fZ, aGandlingSpawnLocs[0].m_fO, TEMPSPAWN_DEAD_DESPAWN, 0)) { // Switch model to Christmas Gandling if Winter Veil event is active if (IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL)) pGandling->CastSpell(pGandling, SPELL_XMAS_GANDLING, TRIGGERED_NONE); if (!bByPlayerEnter) DoScriptText(SAY_GANDLING_SPAWN, pGandling); } } }
void instance_trial_of_the_crusader::DoHandleEventEpilogue() { Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; // Spawn Tirion and the mage if (Creature* pTirion = pPlayer->SummonCreature(NPC_TIRION_B, aSpawnPositions[12][0], aSpawnPositions[12][1], aSpawnPositions[12][2], aSpawnPositions[12][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) DoScriptText(SAY_TIRION_EPILOGUE, pTirion); pPlayer->SummonCreature(NPC_ARGENT_MAGE, aSpawnPositions[13][0], aSpawnPositions[13][1], aSpawnPositions[13][2], aSpawnPositions[13][3], TEMPSUMMON_CORPSE_DESPAWN, 0); DoRespawnGameObject(GO_PORTAL_DALARAN, 60 * MINUTE); // Spawn the chest for heroic difficulty if (IsHeroicDifficulty()) { if (GetData(TYPE_WIPE_COUNT) == 0) DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_50 : GO_TRIBUTE_CHEST_10H_50, 60 * MINUTE); else if (GetData(TYPE_WIPE_COUNT) < 5) DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_45 : GO_TRIBUTE_CHEST_10H_45, 60 * MINUTE); else if (GetData(TYPE_WIPE_COUNT) < 25) DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_25 : GO_TRIBUTE_CHEST_10H_25, 60 * MINUTE); else DoRespawnGameObject(Is25ManDifficulty() ? GO_TRIBUTE_CHEST_25H_01 : GO_TRIBUTE_CHEST_10H_01, 60 * MINUTE); } }
void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) { // Do not summon, if event finished if (m_auiEncounter[TYPE_GANDLING] == DONE) return; // Summon only once if (GetSingleCreatureFromStorage(NPC_DARKMASTER_GANDLING)) return; Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; // Check if all the six bosses are done first if (m_auiEncounter[TYPE_MALICIA] == DONE && m_auiEncounter[TYPE_THEOLEN] == DONE && m_auiEncounter[TYPE_POLKELT] == DONE && m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) { if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, aGandlingSpawnLocs[0].m_fX, aGandlingSpawnLocs[0].m_fY, aGandlingSpawnLocs[0].m_fZ, aGandlingSpawnLocs[0].m_fO, TEMPSPAWN_DEAD_DESPAWN, 0)) { if (!bByPlayerEnter) DoScriptText(SAY_GANDLING_SPAWN, pGandling); } } }
CCharacter* CMap::GetCharInMap( unsigned int id ) { CMonster* monster = GetMonsterInMap( id ); if(monster!=NULL) return (CCharacter*) monster; CPlayer* player = GetPlayerInMap( id ); if(player!=NULL) return (CCharacter*) player; return NULL; }
void HandleGameObject(uint64 guid, uint32 state) { Player *player = GetPlayerInMap(); if (!player || !guid) return; if (GameObject *go = GameObject::GetGameObject(*player,guid)) go->SetGoState(GOState(state)); }
void SetData(uint32 type, uint32 data) { Player* player = GetPlayerInMap(); if (!player) { debug_log("BSCR: Instance Steamvault: SetData (Type: %u Data %u) cannot find any player.", type, data); return; } switch (type) { case TYPE_HYDROMANCER_THESPIA: if (data == SPECIAL) { if (GameObject* _go = GameObject::GetGameObject(*player,AccessPanelHydro)) _go->SetGoState(GO_STATE_ACTIVE); if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) { if (GameObject* _go = GameObject::GetGameObject(*player,MainChambersDoor)) _go->SetGoState(GO_STATE_ACTIVE); } debug_log("BSCR: Instance Steamvault: Access panel used."); } Encounter[0] = data; break; case TYPE_MEKGINEER_STEAMRIGGER: if (data == SPECIAL) { if (GameObject* _go = GameObject::GetGameObject(*player,AccessPanelMek)) _go->SetGoState(GO_STATE_ACTIVE); if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) { if (GameObject* _go = GameObject::GetGameObject(*player,MainChambersDoor)) _go->SetGoState(GO_STATE_ACTIVE); } debug_log("BSCR: Instance Steamvault: Access panel used."); } Encounter[1] = data; break; case TYPE_WARLORD_KALITHRESH: Encounter[2] = data; break; case TYPE_DISTILLER: Encounter[3] = data; break; } if (data == DONE || data == SPECIAL) SaveToDB(); }
void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() { if (GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) return; Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; for (uint8 i = 0; i < MAX_HELPERS; ++i) pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); }
void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() { if (GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) return; Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; for (const auto& aAndorovSpawnLoc : aAndorovSpawnLocs) pPlayer->SummonCreature(aAndorovSpawnLoc.m_uiEntry, aAndorovSpawnLoc.m_fX, aAndorovSpawnLoc.m_fY, aAndorovSpawnLoc.m_fZ, aAndorovSpawnLoc.m_fO, TEMPSPAWN_DEAD_DESPAWN, 0); }
void HandleGameObject(uint64 guid, uint32 state) { Player *player = GetPlayerInMap(); if (!player || !guid) { debug_log("SD2: Instance Razorfen Kraul: HandleGameObject fail"); return; } if (GameObject *go = GameObject::GetGameObject(*player,guid)) go->SetGoState(GOState(state)); }
void instance_culling_of_stratholme::DoSpawnArthasIfNeeded() { Creature* pArthas = instance->GetCreature(m_uiArthasGUID); if (pArthas && pArthas->isAlive()) return; uint8 uiPosition = GetInstancePosition(); if (uiPosition && uiPosition <= MAX_ARTHAS_SPAWN_POS) { if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_ARTHAS, m_aArthasSpawnLocs[uiPosition-1].m_fX, m_aArthasSpawnLocs[uiPosition-1].m_fY, m_aArthasSpawnLocs[uiPosition-1].m_fZ, m_aArthasSpawnLocs[uiPosition-1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); } }
void HandleGameObject(uint64 guid, uint32 state) { Player *player = GetPlayerInMap(); if (!player || !guid) { debug_log("TSCR: Shadow Labyrinth: HandleGameObject fail"); return; } if (GameObject *go = GameObject::GetGameObject(*player,guid)) go->SetGoState(state); }
void instance_black_temple::DoSpawnAkamaIfCan() { if (GetData(TYPE_ILLIDAN) == DONE || GetData(TYPE_COUNCIL) != DONE) return; // If already spawned return if (GetSingleCreatureFromStorage(NPC_AKAMA, true)) return; // Summon Akama after the council has been defeated if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_AKAMA, 617.754f, 307.768f, 271.735f, 6.197f, TEMPSUMMON_DEAD_DESPAWN, 0); }
void HandleGameObjectSetFlag(uint64 guid, uint64 flag) { Player *player = GetPlayerInMap(); if (!player || !guid) { debug_log("SD2: Hellfire Ramparts: HandleGameObject fail"); return; } if (GameObject *go = GameObject::GetGameObject(*player,guid)) go->SetUInt32Value (GAMEOBJECT_FLAGS, flag); }
void instance_blackrock_depths::DoCallNextDwarf() { if (Creature* pDwarf = GetSingleCreatureFromStorage(aTombDwarfes[m_uiDwarfRound])) { if (Player* pPlayer = GetPlayerInMap()) { pDwarf->SetFactionTemporary(FACTION_DWARF_HOSTILE, TEMPFACTION_RESTORE_RESPAWN | TEMPFACTION_RESTORE_REACH_HOME); pDwarf->AI()->AttackStart(pPlayer); } } m_uiDwarfFightTimer = 30000; ++m_uiDwarfRound; }
void worldmap_eastern_kingdoms::DoSummonFlightMasterIfCan() { Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; // return if already summoned if (m_uiFlightMasterGUID) return; // summon the flightmaster if (Creature* pFlightMaster = pPlayer->SummonCreature(NPC_SPECTRAL_FLIGHTMASTER, m_aPlaguelandFlightmasterSpawnLocs[0].m_fX, m_aPlaguelandFlightmasterSpawnLocs[0].m_fY, m_aPlaguelandFlightmasterSpawnLocs[0].m_fZ, m_aPlaguelandFlightmasterSpawnLocs[0].m_fO, TEMPSUMMON_MANUAL_DESPAWN, 0)) m_uiFlightMasterGUID = pFlightMaster->GetGUID(); }
// Spawn the friendly keepers in the central chamber void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) { Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; switch (uiWho) { case NPC_KEEPER_MIMIRON: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[1].fX, m_aKeepersSpawnLocs[1].fY, m_aKeepersSpawnLocs[1].fZ, m_aKeepersSpawnLocs[1].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; case NPC_KEEPER_HODIR: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[2].fX, m_aKeepersSpawnLocs[2].fY, m_aKeepersSpawnLocs[2].fZ, m_aKeepersSpawnLocs[2].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; case NPC_KEEPER_THORIM: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[3].fX, m_aKeepersSpawnLocs[3].fY, m_aKeepersSpawnLocs[3].fZ, m_aKeepersSpawnLocs[3].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; case NPC_KEEPER_FREYA: pPlayer->SummonCreature(uiWho, m_aKeepersSpawnLocs[0].fX, m_aKeepersSpawnLocs[0].fY, m_aKeepersSpawnLocs[0].fZ, m_aKeepersSpawnLocs[0].fO, TEMPSUMMON_CORPSE_DESPAWN, 0, true); break; } }
// Spawn the friendly keepers in the central chamber void instance_ulduar::SpawnFriendlyKeeper(uint32 uiWho) { Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; switch(uiWho) { case NPC_MIMIRON_IMAGE: pPlayer->SummonCreature(NPC_MIMIRON_IMAGE, m_aKeepersSpawnLocs[1].m_fX, m_aKeepersSpawnLocs[1].m_fY, m_aKeepersSpawnLocs[1].m_fZ, m_aKeepersSpawnLocs[1].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; case NPC_HODIR_IMAGE: pPlayer->SummonCreature(NPC_HODIR_IMAGE, m_aKeepersSpawnLocs[2].m_fX, m_aKeepersSpawnLocs[2].m_fY, m_aKeepersSpawnLocs[2].m_fZ, m_aKeepersSpawnLocs[2].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; case NPC_THORIM_IMAGE: pPlayer->SummonCreature(NPC_THORIM_IMAGE, m_aKeepersSpawnLocs[3].m_fX, m_aKeepersSpawnLocs[3].m_fY, m_aKeepersSpawnLocs[3].m_fZ, m_aKeepersSpawnLocs[3].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; case NPC_FREYA_IMAGE: pPlayer->SummonCreature(NPC_FREYA_IMAGE, m_aKeepersSpawnLocs[0].m_fX, m_aKeepersSpawnLocs[0].m_fY, m_aKeepersSpawnLocs[0].m_fZ, m_aKeepersSpawnLocs[0].m_fO, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); break; } }
void instance_mount_hyjal::DoSpawnArchimonde() { // Don't spawn if already killed if (GetData(TYPE_ARCHIMONDE) == DONE) return; // Don't spawn him twice if (GetSingleCreatureFromStorage(NPC_ARCHIMONDE, true)) return; // Summon Archimonde if (Player* pPlayer = GetPlayerInMap()) pPlayer->SummonCreature(NPC_ARCHIMONDE, aArchimondeSpawnLoc[0], aArchimondeSpawnLoc[1], aArchimondeSpawnLoc[2], aArchimondeSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0); }
ObjectGuid GetGuidData(uint32 id) const override { switch (id) { case DATA_PLAYER_GUID: { Player const* target = GetPlayerInMap(); return target ? target->GetGUID() : ObjectGuid::Empty; } default: break; } return ObjectGuid::Empty; }
uint64 GetData64(uint32 id) { switch (id) { case DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1: return DragonOrb[0]; case DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2: return DragonOrb[1]; case DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3: return DragonOrb[2]; case DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4: return DragonOrb[3]; case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon; case DATA_KALECGOS_HUMAN: return Kalecgos_Human; case DATA_SATHROVARR: return Sathrovarr; case DATA_GO_FORCEFIELD: return ForceField; case DATA_BRUTALLUS: return Brutallus; case DATA_MADRIGOSA: return Madrigosa; case DATA_FELMYST: return Felmyst; case DATA_ALYTHESS: return Alythess; case DATA_SACROLASH: return Sacrolash; case DATA_MURU: return Muru; case DATA_KILJAEDEN: return KilJaeden; case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; case DATA_ANVEENA: return Anveena; case DATA_KALECGOS_KJ: return KalecgosKJ; case DATA_PLAYER_GUID: if (Player* Target = GetPlayerInMap()) return Target->GetGUID(); else return 0; } return 0; }
void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() { // The npc is also a vendor so always spawn after kurinnaxx if (m_auiEncounter[TYPE_KURINNAXX] != DONE) return; if (GetSingleCreatureFromStorage(NPC_GENERAL_ANDOROV)) return; Player* pPlayer = GetPlayerInMap(); if (!pPlayer) return; for (uint8 i = 0; i < MAX_HELPERS; i++) pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); }