void WorldPvPNA::DoHandleFactionObjects(uint32 uiFaction) { if (uiFaction == ALLIANCE) { for (uint8 i = 0; i < MAX_NA_ROOSTS; ++i) { DoRespawnObjects(m_HordeWagons[i], false); DoRespawnObjects(m_AllianceBrokenRoost[i], false); DoRespawnObjects(m_AllianceRoost[i], false); DoRespawnObjects(m_AllianceWagons[i], true); DoRespawnObjects(m_HordeBrokenRoost[i], true); m_uiRoostWorldState[i] = aHordeNeutralStates[i]; } } else if (uiFaction == HORDE) { for (uint8 i = 0; i < MAX_NA_ROOSTS; ++i) { DoRespawnObjects(m_AllianceWagons[i], false); DoRespawnObjects(m_HordeBrokenRoost[i], false); DoRespawnObjects(m_HordeRoost[i], false); DoRespawnObjects(m_HordeWagons[i], true); DoRespawnObjects(m_AllianceBrokenRoost[i], true); m_uiRoostWorldState[i] = aAllianceNeutralStates[i]; } } }
bool WorldPvPNA::HandleObjectUse(Player* pPlayer, GameObject* pGo) { bool bReturnStatus = false; UpdateWyvernsWorldState(0); if (pPlayer->GetTeam() == ALLIANCE) { for (uint8 i = 0; i < MAX_NA_ROOSTS; ++i) { if (pGo->GetEntry() == aAllianceWagons[i]) { m_uiRoostWorldState[i] = aHordeNeutralStates[i]; DoRespawnObjects(m_HordeRoost[i], false); DoRespawnObjects(m_HordeBrokenRoost[i], true); bReturnStatus = true; } else if (pGo->GetEntry() == aAllianceBrokenRoosts[i]) { m_uiRoostWorldState[i] = aAllianceRoostStates[i]; DoRespawnObjects(m_AllianceBrokenRoost[i], false); DoRespawnObjects(m_AllianceRoost[i], true); bReturnStatus = true; } else if (pGo->GetEntry() == aAllianceRoosts[i]) { // ###### This is hacked in Gameobject.cpp because of the missing custom spells support ##### // if we can't add any bombs don't do anything if (!AddBombsToInventory(pPlayer)) return false; // makr player as pvp first pPlayer->UpdatePvP(true, true); pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP); // Send taxi bReturnStatus = HandlePlayerTaxiDrive(pPlayer, i); } } } else if (pPlayer->GetTeam() == HORDE) { for (uint8 i = 0; i < MAX_NA_ROOSTS; ++i) { if (pGo->GetEntry() == aHordeWagons[i]) { m_uiRoostWorldState[i] = aAllianceNeutralStates[i]; DoRespawnObjects(m_AllianceRoost[i], false); DoRespawnObjects(m_AllianceBrokenRoost[i], true); bReturnStatus = true; } else if (pGo->GetEntry() == aHordeBrokenRoosts[i]) { m_uiRoostWorldState[i] = aHordeRoostStates[i]; DoRespawnObjects(m_HordeBrokenRoost[i], false); DoRespawnObjects(m_HordeRoost[i], true); bReturnStatus = true; } else if (pGo->GetEntry() == aHordeRoosts[i]) { // ###### This is hacked in Gameobject.cpp because of the missing custom spells support ##### // if we can't add any bombs don't do anything if (!AddBombsToInventory(pPlayer)) return false; // makr player as pvp first pPlayer->UpdatePvP(true, true); pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP); // Send taxi bReturnStatus = HandlePlayerTaxiDrive(pPlayer, i); } } } UpdateWyvernsWorldState(1); return bReturnStatus; }
void JustDidDialogueStep(int32 iEntry) override { switch (iEntry) { case POINT_ID_TEXT_1: if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_ESCORT_LEGOSO_3, m_creature, pPlayer); break; case POINT_ID_TEXT_2: if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_ESCORT_LEGOSO_6, m_creature, pPlayer); break; case POINT_ID_TEXT_3: if (Player* pPlayer = GetPlayerForEscort()) DoScriptText(SAY_ESCORT_LEGOSO_10, m_creature, pPlayer); break; case SAY_ESCORT_LEGOSO_4: // first event SetEscortPaused(false); m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->HandleEmote(EMOTE_STATE_NONE); DoRespawnObjects(GO_EXPLOSIVES_1, 10.0f); break; case POINT_ID_COUNT_FINISHED: // different actions depending on the event if (m_bFirstExplosives) { StartNextDialogueText(POINT_ID_EXPLOSIVES_2); m_bFirstExplosives = false; } break; case POINT_ID_EXPLOSIVES_2: DoUseExplosiveTraps(); break; case POINT_ID_EXPLOSIVES_3: m_creature->HandleEmote(EMOTE_ONESHOT_CHEER_NOSHEATHE); break; case POINT_ID_EXPLOSIVES_4: DoRespawnFires(true); SetEscortPaused(false); break; case POINT_ID_EXPLOSIVES_6: // second event SetEscortPaused(false); m_creature->SetStandState(UNIT_STAND_STATE_STAND); DoRespawnObjects(GO_EXPLOSIVES_2, 10.0f); break; case SAY_LEGOSO_AGGRO: // explode traps and start combat event DoUseExplosiveTraps(); if (Creature* pSironas = GetClosestCreatureWithEntry(m_creature, NPC_SIRONAS, 40.0f)) { m_creature->SetFacingToObject(pSironas); pSironas->InterruptNonMeleeSpells(false); pSironas->RemoveAllAurasOnEvade(); // ToDo: find the proper spell to scale up Sironas } break; case POINT_ID_EXPLOSIVES_7: DoRespawnFires(false); if (Creature* pSironas = GetClosestCreatureWithEntry(m_creature, NPC_SIRONAS, 40.0f)) { pSironas->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PLAYER); pSironas->AI()->AttackStart(m_creature); } break; case QUEST_ENDING_THEIR_WORLD: m_creature->HandleEmote(EMOTE_ONESHOT_CHEER_NOSHEATHE); // complete quest if (Player* pPlayer = GetPlayerForEscort()) pPlayer->RewardPlayerAndGroupAtEventExplored(QUEST_ENDING_THEIR_WORLD, m_creature); break; case POINT_ID_EXPLOSIVES_9: // event complete SetEscortPaused(false); break; } }