void OPvPCapturePointGH::FactionTakeOver(uint32 team) { _ControllingFaction = team; DeSpawnNPCs(); SpawnNPCsForTeam(team); _capturable = true; }
void OPvPCapturePointNA::FactionTakeOver(uint32 team) { if (m_ControllingFaction) sObjectMgr->RemoveGraveYardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_ControllingFaction, false); if (m_ControllingFaction == ALLIANCE) sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetTrinityStringForDBCLocale(LANG_OPVP_NA_LOSE_A)); else if (m_ControllingFaction == HORDE) sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetTrinityStringForDBCLocale(LANG_OPVP_NA_LOSE_H)); m_ControllingFaction = team; if (m_ControllingFaction) sObjectMgr->AddGraveYardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_ControllingFaction, false); DeSpawnGOs(); DeSpawnNPCs(); SpawnGOsForTeam(team); SpawnNPCsForTeam(team); m_GuardsAlive = NA_GUARDS_MAX; m_capturable = false; this->UpdateHalaaWorldState(); if (team == ALLIANCE) { m_WyvernStateSouth = WYVERN_NEU_HORDE; m_WyvernStateNorth = WYVERN_NEU_HORDE; m_WyvernStateEast = WYVERN_NEU_HORDE; m_WyvernStateWest = WYVERN_NEU_HORDE; m_PvP->TeamApplyBuff(TEAM_ALLIANCE, NA_CAPTURE_BUFF); m_PvP->SendUpdateWorldState(NA_UI_HORDE_GUARDS_SHOW, 0); m_PvP->SendUpdateWorldState(NA_UI_ALLIANCE_GUARDS_SHOW, 1); m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive); sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetTrinityStringForDBCLocale(LANG_OPVP_NA_CAPTURE_A)); } else { m_WyvernStateSouth = WYVERN_NEU_ALLIANCE; m_WyvernStateNorth = WYVERN_NEU_ALLIANCE; m_WyvernStateEast = WYVERN_NEU_ALLIANCE; m_WyvernStateWest = WYVERN_NEU_ALLIANCE; m_PvP->TeamApplyBuff(TEAM_HORDE, NA_CAPTURE_BUFF); m_PvP->SendUpdateWorldState(NA_UI_HORDE_GUARDS_SHOW, 1); m_PvP->SendUpdateWorldState(NA_UI_ALLIANCE_GUARDS_SHOW, 0); m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive); sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetTrinityStringForDBCLocale(LANG_OPVP_NA_CAPTURE_H)); } UpdateWyvernRoostWorldState(NA_ROOST_S); UpdateWyvernRoostWorldState(NA_ROOST_N); UpdateWyvernRoostWorldState(NA_ROOST_W); UpdateWyvernRoostWorldState(NA_ROOST_E); }
void OutdoorPvPObjectiveNA::FactionTakeOver(uint32 team) { if(m_ControllingFaction) objmgr.RemoveGraveYardLink(NA_HALAA_GRAVEYARD,NA_HALAA_GRAVEYARD_ZONE,m_ControllingFaction,false); if(m_ControllingFaction == ALLIANCE) sWorld.SendZoneText(NA_HALAA_GRAVEYARD_ZONE,objmgr.GetMangosString(LANG_OPVP_NA_LOOSE_A,-1)); else if(m_ControllingFaction == HORDE) sWorld.SendZoneText(NA_HALAA_GRAVEYARD_ZONE,objmgr.GetMangosString(LANG_OPVP_NA_LOOSE_H,-1)); m_ControllingFaction = team; if(m_ControllingFaction) objmgr.AddGraveYardLink(NA_HALAA_GRAVEYARD,NA_HALAA_GRAVEYARD_ZONE,m_ControllingFaction,false); DeSpawnGOs(); DeSpawnNPCs(); SpawnGOsForTeam(team); SpawnNPCsForTeam(team); m_GuardsAlive = NA_GUARDS_MAX; m_capturable = false; this->UpdateHalaaWorldState(); if(team == ALLIANCE) { m_WyvernStateSouth = WYVERN_NEU_HORDE; m_WyvernStateNorth = WYVERN_NEU_HORDE; m_WyvernStateEast = WYVERN_NEU_HORDE; m_WyvernStateWest = WYVERN_NEU_HORDE; m_PvP->SendUpdateWorldState(NA_UI_HORDE_GUARDS_SHOW, 0); m_PvP->SendUpdateWorldState(NA_UI_ALLIANCE_GUARDS_SHOW, 1); m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive); sWorld.SendZoneText(NA_HALAA_GRAVEYARD_ZONE,objmgr.GetMangosString(LANG_OPVP_NA_CAPTURE_A,-1)); } else { m_WyvernStateSouth = WYVERN_NEU_ALLIANCE; m_WyvernStateNorth = WYVERN_NEU_ALLIANCE; m_WyvernStateEast = WYVERN_NEU_ALLIANCE; m_WyvernStateWest = WYVERN_NEU_ALLIANCE; m_PvP->SendUpdateWorldState(NA_UI_HORDE_GUARDS_SHOW, 1); m_PvP->SendUpdateWorldState(NA_UI_ALLIANCE_GUARDS_SHOW, 0); m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive); sWorld.SendZoneText(NA_HALAA_GRAVEYARD_ZONE,objmgr.GetMangosString(LANG_OPVP_NA_CAPTURE_H,-1)); } this->UpdateWyvernRoostWorldState(NA_ROOST_S); this->UpdateWyvernRoostWorldState(NA_ROOST_N); this->UpdateWyvernRoostWorldState(NA_ROOST_W); this->UpdateWyvernRoostWorldState(NA_ROOST_E); ((OutdoorPvPNA*)m_PvP)->BuffTeam(team); }
void OPvPCapturePointGH::ChangeState() { switch (m_OldState) { case OBJECTIVESTATE_NEUTRAL: break; case OBJECTIVESTATE_ALLIANCE: sWorld->SendZoneText(GH_OUTDOORPVP_ZONE, sObjectMgr->GetArkCoreStringForDBCLocale(LANG_OPVP_GH_LOOSE_A)); DeSpawnNPCs(); break; case OBJECTIVESTATE_HORDE: sWorld->SendZoneText(GH_OUTDOORPVP_ZONE, sObjectMgr->GetArkCoreStringForDBCLocale(LANG_OPVP_GH_LOOSE_H)); DeSpawnNPCs(); break; case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: break; } uint32 artkit = 21; switch (m_State) { case OBJECTIVESTATE_NEUTRAL: m_VentureState = VENTURE_N; break; case OBJECTIVESTATE_ALLIANCE: m_VentureState = VENTURE_A; FactionTakeOver(ALLIANCE); artkit = 2; sWorld->SendZoneText( GH_OUTDOORPVP_ZONE, sObjectMgr->GetArkCoreStringForDBCLocale( LANG_OPVP_GH_CAPTURE_A)); break; case OBJECTIVESTATE_HORDE: m_VentureState = VENTURE_H; FactionTakeOver(HORDE); artkit = 1; sWorld->SendZoneText( GH_OUTDOORPVP_ZONE, sObjectMgr->GetArkCoreStringForDBCLocale( LANG_OPVP_GH_CAPTURE_H)); break; case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: m_VentureState = VENTURE_N_A; break; case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: m_VentureState = VENTURE_N_H; break; case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: m_VentureState = VENTURE_N_A; artkit = 2; break; case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: m_VentureState = VENTURE_N_H; artkit = 1; break; } GameObject* flag = HashMapHolder<GameObject>::Find(m_capturePointGUID); if (flag) { flag->SetGoArtKit(artkit); } // ToDo: research about the world states! //this->UpdateVentureWorldState(); }