Projekt

Allgemein

Profil

Aktionen

Fehler #12436

geschlossen

[Tausendwinter] Kanonen - Position und Orientierung

Von 1337 vor fast 10 Jahren hinzugefügt. Vor mehr als 4 Jahren aktualisiert.

Status:
Abgewiesen
Priorität:
Normal
Zugewiesen an:
-
Kategorie:
Schlachtfelder
Beginn:
21.01.2015
Update Text Deutsch:
Tags:

Beschreibung

Die Kanonen werden nicht immer korrekt an ihre richtigen Positionen und in die richtige Orientierung versetzt, wenn die Schlacht anfängt. Teilweise fehlen sie auch einfach komplett.
Eigentlich sollten bei Beginn der Schlacht alle Kanonen neu an den richtigen Positionen gespawnt werden.

Aktionen #1

Von Rushor vor fast 10 Jahren aktualisiert

wie bei https://redmine.rising-gods.de/issues/2360
sollte das wer fixen, das andere ticket bitte gleich mitfixen.

Aktionen #2

Von 1337 vor fast 10 Jahren aktualisiert

  • Priorität wurde von Hoch zu Dringend geändert
Aktionen #3

Von Rushor vor etwa 9 Jahren aktualisiert

kann man das in tw auch iwie reproduzieren?

meine idee wäre die gridcell zusätzlich zu laden

in nagrand kann man das ja noch easy testen, daber in tw sind die kanonen ja viel zu weit zerstreut

gibt es da evtl einen punkt an dem man stehen muss und via .bf start 1 gezielt reprodzieren kann, dass bestimmte kanonen gar nicht spawnen?

Aktionen #4

Von Rushor vor fast 9 Jahren aktualisiert

Teilweise fehlen sie auch einfach komplett.

kann es sein, dass das nur passiert weil vorher getötetet kanonen nicht wiederbelebt werden bei einem erneuten bf start?

===============================================================

okay es liegt definitiv nicht an der spawnposition der npcs, sondern von der position des spielers, welcher für das umflaggen verantwortlich ist.

Bsp:
a )ich bin der einzige spieler in dem gebiet, vorher wurde noch nicht umgeflaggt und der stand ist 'neutral'
b) ich aktiviere pvp und befinde mich an der äußersten ecke an einer der brücken
c) gebeit wird geflaggt, und die npcs spawnen, jedoch nicht alle, sondern nur ein anteil.

Befinde ich mich direkt in der mitte des gebietes zum zeitpunkt des umflaggens spawnen alle npcs.

Aktionen #5

Von Rushor vor mehr als 8 Jahren aktualisiert

  • Thema wurde von [Tausendwinter] Kanonen - Position und Orientierung zu [Tausendwinter] Kanonen - Position und Orientierung | [Halaa] Forschungsleiter Kartos | Unregelmäßiger NPC-Spawn geändert
Aktionen #6

Von Rushor vor mehr als 8 Jahren aktualisiert

https://github.com/joschiwald/TrinityCore/commit/2f72752d2fec300d15dad7ff913fafd7375813aa.diff

diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index 761e12b..768f163 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
@@ -22,91 +22,394 @@
 #include "OutdoorPvPMgr.h" 
 #include "WorldPacket.h" 

-OutdoorPvPNA::OutdoorPvPNA()
+OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) : OPvPCapturePoint(pvp),
+    _capturable(true),
+    _guardsAlive(0),
+    _wyvernStateNorth(0),
+    _wyvernStateSouth(0),
+    _wyvernStateEast(0),
+    _wyvernStateWest(0),
+    _halaaState(HALAA_N),
+    _respawnTimer(NA_RESPAWN_TIME),
+    _guardCheckTimer(NA_GUARD_CHECK_TIME)
 {
-    m_TypeId = OUTDOOR_PVP_NA;
-    m_obj = NULL;
+    SetCapturePointData(182210, 530, -1572.57f, 7945.3f, -22.475f, 2.05949f, 0.0f, 0.0f, 0.857167f, 0.515038f);
 }

-void OutdoorPvPNA::HandleKillImpl(Player* player, Unit* killed)
+void OPvPCapturePointNA::FillInitialWorldStates(WorldPacket& data)
 {
-    if (killed->GetTypeId() == TYPEID_PLAYER && player->GetTeam() != killed->ToPlayer()->GetTeam())
+    data << NA_UI_HORDE_GUARDS_SHOW << uint32(m_team == TEAM_HORDE);
+    data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(m_team == TEAM_ALLIANCE);
+
+    data << NA_UI_GUARDS_MAX << NA_GUARDS_MAX;
+    data << NA_UI_GUARDS_LEFT << uint32(_guardsAlive);
+
+    data << NA_MAP_WYVERN_NORTH_NEU_H << uint32((_wyvernStateNorth & WYVERN_NEU_HORDE) != 0);
+    data << NA_MAP_WYVERN_NORTH_NEU_A << uint32((_wyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0);
+    data << NA_MAP_WYVERN_NORTH_H << uint32((_wyvernStateNorth & WYVERN_HORDE) != 0);
+    data << NA_MAP_WYVERN_NORTH_A << uint32((_wyvernStateNorth & WYVERN_ALLIANCE) != 0);
+
+    data << NA_MAP_WYVERN_SOUTH_NEU_H << uint32((_wyvernStateSouth & WYVERN_NEU_HORDE) != 0);
+    data << NA_MAP_WYVERN_SOUTH_NEU_A << uint32((_wyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0);
+    data << NA_MAP_WYVERN_SOUTH_H << uint32((_wyvernStateSouth & WYVERN_HORDE) != 0);
+    data << NA_MAP_WYVERN_SOUTH_A << uint32((_wyvernStateSouth & WYVERN_ALLIANCE) != 0);
+
+    data << NA_MAP_WYVERN_WEST_NEU_H << uint32((_wyvernStateWest & WYVERN_NEU_HORDE) != 0);
+    data << NA_MAP_WYVERN_WEST_NEU_A << uint32((_wyvernStateWest & WYVERN_NEU_ALLIANCE) != 0);
+    data << NA_MAP_WYVERN_WEST_H << uint32((_wyvernStateWest & WYVERN_HORDE) != 0);
+    data << NA_MAP_WYVERN_WEST_A << uint32((_wyvernStateWest & WYVERN_ALLIANCE) != 0);
+
+    data << NA_MAP_WYVERN_EAST_NEU_H << uint32((_wyvernStateEast & WYVERN_NEU_HORDE) != 0);
+    data << NA_MAP_WYVERN_EAST_NEU_A << uint32((_wyvernStateEast & WYVERN_NEU_ALLIANCE) != 0);
+    data << NA_MAP_WYVERN_EAST_H << uint32((_wyvernStateEast & WYVERN_HORDE) != 0);
+    data << NA_MAP_WYVERN_EAST_A << uint32((_wyvernStateEast & WYVERN_ALLIANCE) != 0);
+
+    data << NA_MAP_HALAA_NEUTRAL << uint32((_halaaState & HALAA_N) != 0);
+    data << NA_MAP_HALAA_NEU_A << uint32((_halaaState & HALAA_N_A) != 0);
+    data << NA_MAP_HALAA_NEU_H << uint32((_halaaState & HALAA_N_H) != 0);
+    data << NA_MAP_HALAA_HORDE << uint32((_halaaState & HALAA_H) != 0);
+    data << NA_MAP_HALAA_ALLIANCE << uint32((_halaaState & HALAA_A) != 0);
+}
+
+bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameObject* /*go*/)
+{
+    uint32 index;
+
+    switch (spellId)
     {
-        player->KilledMonsterCredit(NA_CREDIT_MARKER); // 0 guid, btw it isn't even used in killedmonster function :S
-        if (player->GetTeam() == ALLIANCE)
-            player->CastSpell(player, NA_KILL_TOKEN_ALLIANCE, true);
+        case NA_SPELL_FLY_NORTH:
+            index = NA_ROOST_N;
+            break;
+        case NA_SPELL_FLY_SOUTH:
+            index = NA_ROOST_S;
+            break;
+        case NA_SPELL_FLY_WEST:
+            index = NA_ROOST_W;
+            break;
+        case NA_SPELL_FLY_EAST:
+            index = NA_ROOST_E;
+            break;
+        default:
+            return false;
+    }
+
+    player->ActivateTaxiPathTo(FlightPathNodes[index]);
+    player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP);
+    player->UpdatePvP(true, true);
+
+    player->AddItem(24538, 10);
+    return true;
+}
+
+int32 OPvPCapturePointNA::HandleOpenGo(Player* player, ObjectGuid guid)
+{
+    int32 retval = OPvPCapturePoint::HandleOpenGo(player, guid);
+    if (retval >= 0)
+    {
+        go_type const* gos = nullptr;
+        if (m_team == TEAM_ALLIANCE)
+            gos = AllianceControlGOs;
+        else if (m_team == TEAM_HORDE)
+            gos = HordeControlGOs;
         else
-            player->CastSpell(player, NA_KILL_TOKEN_HORDE, true);
+            return -1;
+
+        int32 del = -1;
+        int32 del2 = -1;
+        int32 add = -1;
+        int32 add2 = -1;
+
+        switch (retval)
+        {
+            case NA_DESTROYED_ROOST_S:
+                del = NA_DESTROYED_ROOST_S;
+                add = NA_ROOST_S;
+                add2 = NA_BOMB_WAGON_S;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateSouth = WYVERN_ALLIANCE;
+                else
+                    _wyvernStateSouth = WYVERN_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_S);
+                break;
+            case NA_DESTROYED_ROOST_N:
+                del = NA_DESTROYED_ROOST_N;
+                add = NA_ROOST_N;
+                add2 = NA_BOMB_WAGON_N;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateNorth = WYVERN_ALLIANCE;
+                else
+                    _wyvernStateNorth = WYVERN_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_N);
+                break;
+            case NA_DESTROYED_ROOST_W:
+                del = NA_DESTROYED_ROOST_W;
+                add = NA_ROOST_W;
+                add2 = NA_BOMB_WAGON_W;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateWest = WYVERN_ALLIANCE;
+                else
+                    _wyvernStateWest = WYVERN_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_W);
+                break;
+            case NA_DESTROYED_ROOST_E:
+                del = NA_DESTROYED_ROOST_E;
+                add = NA_ROOST_E;
+                add2 = NA_BOMB_WAGON_E;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateEast = WYVERN_ALLIANCE;
+                else
+                    _wyvernStateEast = WYVERN_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_E);
+                break;
+            case NA_BOMB_WAGON_S:
+                del = NA_BOMB_WAGON_S;
+                del2 = NA_ROOST_S;
+                add = NA_DESTROYED_ROOST_S;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateSouth = WYVERN_NEU_ALLIANCE;
+                else
+                    _wyvernStateSouth = WYVERN_NEU_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_S);
+                break;
+            case NA_BOMB_WAGON_N:
+                del = NA_BOMB_WAGON_N;
+                del2 = NA_ROOST_N;
+                add = NA_DESTROYED_ROOST_N;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateNorth = WYVERN_NEU_ALLIANCE;
+                else
+                    _wyvernStateNorth = WYVERN_NEU_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_N);
+                break;
+            case NA_BOMB_WAGON_W:
+                del = NA_BOMB_WAGON_W;
+                del2 = NA_ROOST_W;
+                add = NA_DESTROYED_ROOST_W;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateWest = WYVERN_NEU_ALLIANCE;
+                else
+                    _wyvernStateWest = WYVERN_NEU_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_W);
+                break;
+            case NA_BOMB_WAGON_E:
+                del = NA_BOMB_WAGON_E;
+                del2 = NA_ROOST_E;
+                add = NA_DESTROYED_ROOST_E;
+                if (m_team == TEAM_HORDE)
+                    _wyvernStateEast = WYVERN_NEU_ALLIANCE;
+                else
+                    _wyvernStateEast = WYVERN_NEU_HORDE;
+                UpdateWyvernRoostWorldState(NA_ROOST_E);
+                break;
+            default:
+                return -1;
+        }
+
+        if (del > -1)
+            DelObject(del);
+
+        if (del2 > -1)
+            DelObject(del2);
+
+        if (add > -1)
+            AddObject(add, gos[add].entry, gos[add].map, gos[add].x, gos[add].y, gos[add].z, gos[add].o, gos[add].rot0, gos[add].rot1, gos[add].rot2, gos[add].rot3);
+
+        if (add2 > -1)
+            AddObject(add2, gos[add2].entry, gos[add2].map, gos[add2].x, gos[add2].y, gos[add2].z, gos[add2].o, gos[add2].rot0, gos[add2].rot1, gos[add2].rot2, gos[add2].rot3);
     }
+
+    return retval;
+}
+
+bool OPvPCapturePointNA::Update(uint32 diff)
+{
+    // let the controlling faction advance in phase
+    bool capturable = false;
+    if (m_team == TEAM_ALLIANCE && m_activePlayers[TEAM_ALLIANCE].size() > m_activePlayers[TEAM_HORDE].size())
+        capturable = true;
+    else if (m_team == TEAM_HORDE && m_activePlayers[TEAM_ALLIANCE].size() < m_activePlayers[TEAM_HORDE].size())
+        capturable = true;
+
+    if (_guardCheckTimer < diff)
+    {
+        _guardCheckTimer = NA_GUARD_CHECK_TIME;
+        uint32 count = GetAliveGuardsCount();
+        if (count != _guardsAlive)
+        {
+            _guardsAlive = count;
+            if (!_guardsAlive)
+                _capturable = true;
+            // update the guard count for the players in zone
+            m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, _guardsAlive);
+        }
+    }
+    else
+        _guardCheckTimer -= diff;
+
+    if (_capturable || capturable)
+    {
+        if (_respawnTimer < diff)
+        {
+            // if the guards have been killed, then the challenger has one hour to take over halaa.
+            // in case they fail to do it, the guards are respawned, and they have to start again.
+            ChangeTeam(m_team);
+            _respawnTimer = NA_RESPAWN_TIME;
+        }
+        else
+            _respawnTimer -= diff;
+
+        return OPvPCapturePoint::Update(diff);
+    }
+    return false;
+}
+
+void OPvPCapturePointNA::ChangeState()
+{
+    uint32 artkit = 21;
+    switch (m_State)
+    {
+        case OBJECTIVESTATE_NEUTRAL:
+            _halaaState = HALAA_N;
+            break;
+        case OBJECTIVESTATE_ALLIANCE:
+            _halaaState = HALAA_A;
+            artkit = 2;
+            break;
+        case OBJECTIVESTATE_HORDE:
+            _halaaState = HALAA_H;
+            artkit = 1;
+            break;
+        case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
+            _halaaState = HALAA_N_A;
+            break;
+        case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
+            _halaaState = HALAA_N_H;
+            break;
+        case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
+            _halaaState = HALAA_N_A;
+            artkit = 2;
+            break;
+        case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
+            _halaaState = HALAA_N_H;
+            artkit = 1;
+            break;
+    }
+
+    if (GameObject* flag = HashMapHolder<GameObject>::Find(m_capturePointGUID))
+        flag->SetGoArtKit(artkit);
+
+    UpdateHalaaWorldState();
+}
+
+void OPvPCapturePointNA::ChangeTeam(TeamId oldTeam)
+{
+    sObjectMgr->RemoveGraveYardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, oldTeam == TEAM_ALLIANCE ? ALLIANCE : HORDE, false);
+    sObjectMgr->AddGraveYardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_team == TEAM_ALLIANCE ? ALLIANCE : HORDE, false);
+
+    DeleteSpawns();
+    SpawnGOsForTeam(m_team);
+    SpawnNPCsForTeam(m_team);
+    _guardsAlive = NA_GUARDS_MAX;
+    _capturable = false;
+    UpdateHalaaWorldState();
+
+    if (m_team != TEAM_NEUTRAL)
+        m_PvP->TeamApplyBuff(m_team, NA_CAPTURE_BUFF);
+
+    if (m_team == TEAM_ALLIANCE)
+    {
+        _wyvernStateSouth = WYVERN_NEU_HORDE;
+        _wyvernStateNorth = WYVERN_NEU_HORDE;
+        _wyvernStateEast = WYVERN_NEU_HORDE;
+        _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, _guardsAlive);
+        m_PvP->SendDefenseMessage(NA_HALAA_GRAVEYARD_ZONE, TEXT_HALAA_TAKEN_ALLIANCE);
+    }
+    else
+    {
+        _wyvernStateSouth = WYVERN_NEU_ALLIANCE;
+        _wyvernStateNorth = WYVERN_NEU_ALLIANCE;
+        _wyvernStateEast = WYVERN_NEU_ALLIANCE;
+        _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, _guardsAlive);
+        m_PvP->SendDefenseMessage(NA_HALAA_GRAVEYARD_ZONE, TEXT_HALAA_TAKEN_HORDE);
+    }
+    UpdateWyvernRoostWorldState(NA_ROOST_S);
+    UpdateWyvernRoostWorldState(NA_ROOST_N);
+    UpdateWyvernRoostWorldState(NA_ROOST_W);
+    UpdateWyvernRoostWorldState(NA_ROOST_E);
 }

 uint32 OPvPCapturePointNA::GetAliveGuardsCount()
 {
-    uint32 cnt = 0;
+    uint32 count = 0;
     for (std::map<uint32, ObjectGuid>::iterator itr = m_Creatures.begin(); itr != m_Creatures.end(); ++itr)
     {
         switch (itr->first)
         {
-        case NA_NPC_GUARD_01:
-        case NA_NPC_GUARD_02:
-        case NA_NPC_GUARD_03:
-        case NA_NPC_GUARD_04:
-        case NA_NPC_GUARD_05:
-        case NA_NPC_GUARD_06:
-        case NA_NPC_GUARD_07:
-        case NA_NPC_GUARD_08:
-        case NA_NPC_GUARD_09:
-        case NA_NPC_GUARD_10:
-        case NA_NPC_GUARD_11:
-        case NA_NPC_GUARD_12:
-        case NA_NPC_GUARD_13:
-        case NA_NPC_GUARD_14:
-        case NA_NPC_GUARD_15:
-            if (Creature const* const cr = HashMapHolder<Creature>::Find(itr->second))
-                if (cr->IsAlive())
-                    ++cnt;
-            break;
-        default:
-            break;
+            case NA_NPC_GUARD_01:
+            case NA_NPC_GUARD_02:
+            case NA_NPC_GUARD_03:
+            case NA_NPC_GUARD_04:
+            case NA_NPC_GUARD_05:
+            case NA_NPC_GUARD_06:
+            case NA_NPC_GUARD_07:
+            case NA_NPC_GUARD_08:
+            case NA_NPC_GUARD_09:
+            case NA_NPC_GUARD_10:
+            case NA_NPC_GUARD_11:
+            case NA_NPC_GUARD_12:
+            case NA_NPC_GUARD_13:
+            case NA_NPC_GUARD_14:
+            case NA_NPC_GUARD_15:
+                if (Creature const* creature = HashMapHolder<Creature>::Find(itr->second))
+                    if (creature->IsAlive())
+                        ++count;
+                break;
+            default:
+                break;
         }
     }
-    return cnt;
+    return count;
 }

-uint32 OPvPCapturePointNA::GetControllingFaction() const
+void OPvPCapturePointNA::DeleteSpawns()
 {
-    return m_ControllingFaction;
+    for (auto i = m_Objects.begin(); i != m_Objects.end(); ++i)
+        DelObject(i->first);
+    for (auto i = m_Creatures.begin(); i != m_Creatures.end(); ++i)
+        DelCreature(i->first);
 }

-void OPvPCapturePointNA::SpawnNPCsForTeam(uint32 team)
+void OPvPCapturePointNA::SpawnNPCsForTeam(TeamId teamId)
 {
     creature_type const* creatures = nullptr;
-    if (team == ALLIANCE)
+    if (teamId == TEAM_ALLIANCE)
         creatures = AllianceControlNPCs;
-    else if (team == HORDE)
+    else if (teamId == TEAM_HORDE)
         creatures = HordeControlNPCs;
     else
         return;
-    for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
-        AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, OutdoorPvP::GetTeamIdByTeam(team), 1000000);
-}

-void OPvPCapturePointNA::DeSpawnNPCs()
-{
-    for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
-        DelCreature(i);
+    for (uint8 i = 0; i < NA_CONTROL_NPC_NUM; ++i)
+        AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, teamId, 1000000);
 }

-void OPvPCapturePointNA::SpawnGOsForTeam(uint32 team)
+void OPvPCapturePointNA::SpawnGOsForTeam(TeamId teamId)
 {
-    const go_type * gos = NULL;
-    if (team == ALLIANCE)
-        gos=AllianceControlGOs;
-    else if (team == HORDE)
-        gos=HordeControlGOs;
+    go_type const* gos = nullptr;
+    if (teamId == TEAM_ALLIANCE)
+        gos = AllianceControlGOs;
+    else if (teamId == TEAM_HORDE)
+        gos = HordeControlGOs;
     else
         return;
-    for (int i = 0; i < NA_CONTROL_GO_NUM; ++i)
+
+    for (uint8 i = 0; i < NA_CONTROL_GO_NUM; ++i)
     {
         if (i == NA_ROOST_S ||
             i == NA_ROOST_W ||
@@ -121,84 +424,70 @@ void OPvPCapturePointNA::SpawnGOsForTeam(uint32 team)
     }
 }

-void OPvPCapturePointNA::DeSpawnGOs()
+void OPvPCapturePointNA::UpdateHalaaWorldState()
 {
-    for (int i = 0; i < NA_CONTROL_GO_NUM; ++i)
-    {
-        DelObject(i);
-    }
+    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEUTRAL, uint32((_halaaState & HALAA_N) != 0));
+    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_A, uint32((_halaaState & HALAA_N_A) != 0));
+    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_H, uint32((_halaaState & HALAA_N_H) != 0));
+    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_HORDE, uint32((_halaaState & HALAA_H) != 0));
+    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE, uint32((_halaaState & HALAA_A) != 0));
 }

-void OPvPCapturePointNA::FactionTakeOver(uint32 team)
+void OPvPCapturePointNA::UpdateWyvernRoostWorldState(uint32 roost)
 {
-    if (m_ControllingFaction)
-        sObjectMgr->RemoveGraveYardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_ControllingFaction, false);
-
-    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);
-        m_PvP->SendDefenseMessage(NA_HALAA_GRAVEYARD_ZONE, TEXT_HALAA_TAKEN_ALLIANCE);
-    }
-    else
+    switch (roost)
     {
-        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);
-        m_PvP->SendDefenseMessage(NA_HALAA_GRAVEYARD_ZONE, TEXT_HALAA_TAKEN_HORDE);
+        case NA_ROOST_S:
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_H, uint32((_wyvernStateSouth & WYVERN_NEU_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_A, uint32((_wyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_H, uint32((_wyvernStateSouth & WYVERN_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_A, uint32((_wyvernStateSouth & WYVERN_ALLIANCE) != 0));
+            break;
+        case NA_ROOST_N:
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_H, uint32((_wyvernStateNorth & WYVERN_NEU_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_A, uint32((_wyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_H, uint32((_wyvernStateNorth & WYVERN_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_A, uint32((_wyvernStateNorth & WYVERN_ALLIANCE) != 0));
+            break;
+        case NA_ROOST_W:
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_H, uint32((_wyvernStateWest & WYVERN_NEU_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_A, uint32((_wyvernStateWest & WYVERN_NEU_ALLIANCE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_H, uint32((_wyvernStateWest & WYVERN_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_A, uint32((_wyvernStateWest & WYVERN_ALLIANCE) != 0));
+            break;
+        case NA_ROOST_E:
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_H, uint32((_wyvernStateEast & WYVERN_NEU_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_A, uint32((_wyvernStateEast & WYVERN_NEU_ALLIANCE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_H, uint32((_wyvernStateEast & WYVERN_HORDE) != 0));
+            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_A, uint32((_wyvernStateEast & WYVERN_ALLIANCE) != 0));
+            break;
+        default:
+            break;
     }
-    UpdateWyvernRoostWorldState(NA_ROOST_S);
-    UpdateWyvernRoostWorldState(NA_ROOST_N);
-    UpdateWyvernRoostWorldState(NA_ROOST_W);
-    UpdateWyvernRoostWorldState(NA_ROOST_E);
 }

-OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) :
-OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(0),
-m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0), m_WyvernStateWest(0),
-m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME)
+OutdoorPvPNA::OutdoorPvPNA()
 {
-    SetCapturePointData(182210, 530, -1572.57f, 7945.3f, -22.475f, 2.05949f, 0.0f, 0.0f, 0.857167f, 0.515038f);
+    m_TypeId = OUTDOOR_PVP_NA;
+    _capturePoint = nullptr;
 }

 bool OutdoorPvPNA::SetupOutdoorPvP()
 {
-//    m_TypeId = OUTDOOR_PVP_NA; _MUST_ be set in ctor, because of spawns cleanup
     // add the zones affected by the pvp buff
     RegisterZone(NA_BUFF_ZONE);

     // halaa
-    m_obj = new OPvPCapturePointNA(this);
+    _capturePoint = new OPvPCapturePointNA(this);

-    AddCapturePoint(m_obj);
+    AddCapturePoint(_capturePoint);
     return true;
 }

 void OutdoorPvPNA::HandlePlayerEnterZone(Player* player, uint32 zone)
 {
     // add buffs
-    if (player->GetTeam() == m_obj->GetControllingFaction())
+    if (player->GetTeamId() == _capturePoint->GetTeamId())
         player->CastSpell(player, NA_CAPTURE_BUFF, true);
     OutdoorPvP::HandlePlayerEnterZone(player, zone);
 }
@@ -210,57 +499,14 @@ void OutdoorPvPNA::HandlePlayerLeaveZone(Player* player, uint32 zone)
     OutdoorPvP::HandlePlayerLeaveZone(player, zone);
 }

-void OutdoorPvPNA::FillInitialWorldStates(WorldPacket &data)
+bool OutdoorPvPNA::Update(uint32 diff)
 {
-    m_obj->FillInitialWorldStates(data);
+    return _capturePoint->Update(diff);
 }

-void OPvPCapturePointNA::FillInitialWorldStates(WorldPacket &data)
+void OutdoorPvPNA::FillInitialWorldStates(WorldPacket &data)
 {
-    if (m_ControllingFaction == ALLIANCE)
-    {
-        data << NA_UI_HORDE_GUARDS_SHOW << uint32(0);
-        data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(1);
-    }
-    else if (m_ControllingFaction == HORDE)
-    {
-        data << NA_UI_HORDE_GUARDS_SHOW << uint32(1);
-        data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(0);
-    }
-    else
-    {
-        data << NA_UI_HORDE_GUARDS_SHOW << uint32(0);
-        data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(0);
-    }
-
-    data << NA_UI_GUARDS_MAX << NA_GUARDS_MAX;
-    data << NA_UI_GUARDS_LEFT << uint32(m_GuardsAlive);
-
-    data << NA_MAP_WYVERN_NORTH_NEU_H << uint32((m_WyvernStateNorth & WYVERN_NEU_HORDE) != 0);
-    data << NA_MAP_WYVERN_NORTH_NEU_A << uint32((m_WyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0);
-    data << NA_MAP_WYVERN_NORTH_H << uint32((m_WyvernStateNorth & WYVERN_HORDE) != 0);
-    data << NA_MAP_WYVERN_NORTH_A << uint32((m_WyvernStateNorth & WYVERN_ALLIANCE) != 0);
-
-    data << NA_MAP_WYVERN_SOUTH_NEU_H << uint32((m_WyvernStateSouth & WYVERN_NEU_HORDE) != 0);
-    data << NA_MAP_WYVERN_SOUTH_NEU_A << uint32((m_WyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0);
-    data << NA_MAP_WYVERN_SOUTH_H << uint32((m_WyvernStateSouth & WYVERN_HORDE) != 0);
-    data << NA_MAP_WYVERN_SOUTH_A << uint32((m_WyvernStateSouth & WYVERN_ALLIANCE) != 0);
-
-    data << NA_MAP_WYVERN_WEST_NEU_H << uint32((m_WyvernStateWest & WYVERN_NEU_HORDE) != 0);
-    data << NA_MAP_WYVERN_WEST_NEU_A << uint32((m_WyvernStateWest & WYVERN_NEU_ALLIANCE) != 0);
-    data << NA_MAP_WYVERN_WEST_H << uint32((m_WyvernStateWest & WYVERN_HORDE) != 0);
-    data << NA_MAP_WYVERN_WEST_A << uint32((m_WyvernStateWest & WYVERN_ALLIANCE) != 0);
-
-    data << NA_MAP_WYVERN_EAST_NEU_H << uint32((m_WyvernStateEast & WYVERN_NEU_HORDE) != 0);
-    data << NA_MAP_WYVERN_EAST_NEU_A << uint32((m_WyvernStateEast & WYVERN_NEU_ALLIANCE) != 0);
-    data << NA_MAP_WYVERN_EAST_H << uint32((m_WyvernStateEast & WYVERN_HORDE) != 0);
-    data << NA_MAP_WYVERN_EAST_A << uint32((m_WyvernStateEast & WYVERN_ALLIANCE) != 0);
-
-    data << NA_MAP_HALAA_NEUTRAL << uint32((m_HalaaState & HALAA_N) != 0);
-    data << NA_MAP_HALAA_NEU_A << uint32((m_HalaaState & HALAA_N_A) != 0);
-    data << NA_MAP_HALAA_NEU_H << uint32((m_HalaaState & HALAA_N_H) != 0);
-    data << NA_MAP_HALAA_HORDE << uint32((m_HalaaState & HALAA_H) != 0);
-    data << NA_MAP_HALAA_ALLIANCE << uint32((m_HalaaState & HALAA_A) != 0);
+    _capturePoint->FillInitialWorldStates(data);
 }

 void OutdoorPvPNA::SendRemoveWorldStates(Player* player)
@@ -292,327 +538,15 @@ void OutdoorPvPNA::SendRemoveWorldStates(Player* player)
     player->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE, 0);
 }

-bool OutdoorPvPNA::Update(uint32 diff)
-{
-    return m_obj->Update(diff);
-}
-
-bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameObject* /*go*/)
-{
-    std::vector<uint32> nodes;
-    nodes.resize(2);
-    bool retval = false;
-    switch (spellId)
-    {
-    case NA_SPELL_FLY_NORTH:
-        nodes[0] = FlightPathStartNodes[NA_ROOST_N];
-        nodes[1] = FlightPathEndNodes[NA_ROOST_N];
-        player->ActivateTaxiPathTo(nodes);
-        player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP);
-        player->UpdatePvP(true, true);
-        retval = true;
-        break;
-    case NA_SPELL_FLY_SOUTH:
-        nodes[0] = FlightPathStartNodes[NA_ROOST_S];
-        nodes[1] = FlightPathEndNodes[NA_ROOST_S];
-        player->ActivateTaxiPathTo(nodes);
-        player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP);
-        player->UpdatePvP(true, true);
-        retval = true;
-        break;
-    case NA_SPELL_FLY_WEST:
-        nodes[0] = FlightPathStartNodes[NA_ROOST_W];
-        nodes[1] = FlightPathEndNodes[NA_ROOST_W];
-        player->ActivateTaxiPathTo(nodes);
-        player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP);
-        player->UpdatePvP(true, true);
-        retval = true;
-        break;
-    case NA_SPELL_FLY_EAST:
-        nodes[0] = FlightPathStartNodes[NA_ROOST_E];
-        nodes[1] = FlightPathEndNodes[NA_ROOST_E];
-        player->ActivateTaxiPathTo(nodes);
-        player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP);
-        player->UpdatePvP(true, true);
-        retval = true;
-        break;
-    default:
-        break;
-    }
-
-    if (retval)
-    {
-        //Adding items
-        uint32 noSpaceForCount = 0;
-
-        // check space and find places
-        ItemPosCountVec dest;
-
-        int32 count = 10;
-        uint32 itemid = 24538;
-                                                                // bomb id count
-        InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemid, count, &noSpaceForCount);
-        if (msg != EQUIP_ERR_OK)                               // convert to possible store amount
-            count -= noSpaceForCount;
-
-        if (count == 0 || dest.empty())                         // can't add any
-        {
-            return true;
-        }
-
-        Item* item = player->StoreNewItem(dest, itemid, true);
-
-        if (count > 0 && item)
-        {
-            player->SendNewItem(item, count, true, false);
-        }
-
-        return true;
-    }
-    return false;
-}
-
-int32 OPvPCapturePointNA::HandleOpenGo(Player* player, ObjectGuid guid)
+void OutdoorPvPNA::HandleKillImpl(Player* player, Unit* killed)
 {
-    int32 retval = OPvPCapturePoint::HandleOpenGo(player, guid);
-    if (retval >= 0)
+    if (killed->GetTypeId() == TYPEID_PLAYER && player->GetTeam() != killed->ToPlayer()->GetTeam())
     {
-        const go_type * gos = NULL;
-        if (m_ControllingFaction == ALLIANCE)
-            gos=AllianceControlGOs;
-        else if (m_ControllingFaction == HORDE)
-            gos=HordeControlGOs;
+        player->KilledMonsterCredit(NA_CREDIT_MARKER);
+        if (player->GetTeamId() == TEAM_ALLIANCE)
+            player->CastSpell(player, NA_KILL_TOKEN_ALLIANCE, true);
         else
-            return -1;
-
-        int32 del = -1;
-        int32 del2 = -1;
-        int32 add = -1;
-        int32 add2 = -1;
-
-        switch (retval)
-        {
-        case NA_DESTROYED_ROOST_S:
-            del = NA_DESTROYED_ROOST_S;
-            add = NA_ROOST_S;
-            add2 = NA_BOMB_WAGON_S;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateSouth = WYVERN_ALLIANCE;
-            else
-                m_WyvernStateSouth = WYVERN_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_S);
-            break;
-        case NA_DESTROYED_ROOST_N:
-            del = NA_DESTROYED_ROOST_N;
-            add = NA_ROOST_N;
-            add2 = NA_BOMB_WAGON_N;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateNorth = WYVERN_ALLIANCE;
-            else
-                m_WyvernStateNorth = WYVERN_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_N);
-            break;
-        case NA_DESTROYED_ROOST_W:
-            del = NA_DESTROYED_ROOST_W;
-            add = NA_ROOST_W;
-            add2 = NA_BOMB_WAGON_W;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateWest = WYVERN_ALLIANCE;
-            else
-                m_WyvernStateWest = WYVERN_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_W);
-            break;
-        case NA_DESTROYED_ROOST_E:
-            del = NA_DESTROYED_ROOST_E;
-            add = NA_ROOST_E;
-            add2 = NA_BOMB_WAGON_E;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateEast = WYVERN_ALLIANCE;
-            else
-                m_WyvernStateEast = WYVERN_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_E);
-            break;
-        case NA_BOMB_WAGON_S:
-            del = NA_BOMB_WAGON_S;
-            del2 = NA_ROOST_S;
-            add = NA_DESTROYED_ROOST_S;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateSouth = WYVERN_NEU_ALLIANCE;
-            else
-                m_WyvernStateSouth = WYVERN_NEU_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_S);
-            break;
-        case NA_BOMB_WAGON_N:
-            del = NA_BOMB_WAGON_N;
-            del2 = NA_ROOST_N;
-            add = NA_DESTROYED_ROOST_N;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateNorth = WYVERN_NEU_ALLIANCE;
-            else
-                m_WyvernStateNorth = WYVERN_NEU_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_N);
-            break;
-        case NA_BOMB_WAGON_W:
-            del = NA_BOMB_WAGON_W;
-            del2 = NA_ROOST_W;
-            add = NA_DESTROYED_ROOST_W;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateWest = WYVERN_NEU_ALLIANCE;
-            else
-                m_WyvernStateWest = WYVERN_NEU_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_W);
-            break;
-        case NA_BOMB_WAGON_E:
-            del = NA_BOMB_WAGON_E;
-            del2 = NA_ROOST_E;
-            add = NA_DESTROYED_ROOST_E;
-            if (m_ControllingFaction == HORDE)
-                m_WyvernStateEast = WYVERN_NEU_ALLIANCE;
-            else
-                m_WyvernStateEast = WYVERN_NEU_HORDE;
-            UpdateWyvernRoostWorldState(NA_ROOST_E);
-            break;
-        default:
-            return -1;
-            break;
-        }
-
-        if (del>-1)
-            DelObject(del);
-
-        if (del2>-1)
-            DelObject(del2);
-
-        if (add>-1)
-            AddObject(add, gos[add].entry, gos[add].map, gos[add].x, gos[add].y, gos[add].z, gos[add].o, gos[add].rot0, gos[add].rot1, gos[add].rot2, gos[add].rot3);
-
-        if (add2>-1)
-            AddObject(add2, gos[add2].entry, gos[add2].map, gos[add2].x, gos[add2].y, gos[add2].z, gos[add2].o, gos[add2].rot0, gos[add2].rot1, gos[add2].rot2, gos[add2].rot3);
-
-        return retval;
-    }
-    return -1;
-}
-
-bool OPvPCapturePointNA::Update(uint32 diff)
-{
-    // let the controlling faction advance in phase
-    bool capturable = false;
-    if (m_ControllingFaction == ALLIANCE && m_activePlayers[0].size() > m_activePlayers[1].size())
-        capturable = true;
-    else if (m_ControllingFaction == HORDE && m_activePlayers[0].size() < m_activePlayers[1].size())
-        capturable = true;
-
-    if (m_GuardCheckTimer < diff)
-    {
-        m_GuardCheckTimer = NA_GUARD_CHECK_TIME;
-        uint32 cnt = GetAliveGuardsCount();
-        if (cnt != m_GuardsAlive)
-        {
-            m_GuardsAlive = cnt;
-            if (m_GuardsAlive == 0)
-                m_capturable = true;
-            // update the guard count for the players in zone
-            m_PvP->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive);
-        }
-    } else m_GuardCheckTimer -= diff;
-
-    if (m_capturable || capturable)
-    {
-        if (m_RespawnTimer < diff)
-        {
-            // if the guards have been killed, then the challenger has one hour to take over halaa.
-            // in case they fail to do it, the guards are respawned, and they have to start again.
-            if (m_ControllingFaction)
-                FactionTakeOver(m_ControllingFaction);
-            m_RespawnTimer = NA_RESPAWN_TIME;
-        } else m_RespawnTimer -= diff;
-
-        return OPvPCapturePoint::Update(diff);
-    }
-    return false;
-}
-
-void OPvPCapturePointNA::ChangeState()
-{
-    uint32 artkit = 21;
-    switch (m_State)
-    {
-        case OBJECTIVESTATE_NEUTRAL:
-            m_HalaaState = HALAA_N;
-            break;
-        case OBJECTIVESTATE_ALLIANCE:
-            m_HalaaState = HALAA_A;
-            FactionTakeOver(ALLIANCE);
-            artkit = 2;
-            break;
-        case OBJECTIVESTATE_HORDE:
-            m_HalaaState = HALAA_H;
-            FactionTakeOver(HORDE);
-            artkit = 1;
-            break;
-        case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
-            m_HalaaState = HALAA_N_A;
-            break;
-        case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
-            m_HalaaState = HALAA_N_H;
-            break;
-        case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
-            m_HalaaState = HALAA_N_A;
-            artkit = 2;
-            break;
-        case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
-            m_HalaaState = HALAA_N_H;
-            artkit = 1;
-        break;
-    }
-
-    GameObject* flag = HashMapHolder<GameObject>::Find(m_capturePointGUID);
-    if (flag)
-    {
-        flag->SetGoArtKit(artkit);
-    }
-
-    UpdateHalaaWorldState();
-}
-
-void OPvPCapturePointNA::UpdateHalaaWorldState()
-{
-    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEUTRAL, uint32((m_HalaaState & HALAA_N) != 0));
-    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_A, uint32((m_HalaaState & HALAA_N_A) != 0));
-    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_H, uint32((m_HalaaState & HALAA_N_H) != 0));
-    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_HORDE, uint32((m_HalaaState & HALAA_H) != 0));
-    m_PvP->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE, uint32((m_HalaaState & HALAA_A) != 0));
-}
-
-void OPvPCapturePointNA::UpdateWyvernRoostWorldState(uint32 roost)
-{
-    switch (roost)
-    {
-        case NA_ROOST_S:
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_H, uint32((m_WyvernStateSouth & WYVERN_NEU_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_A, uint32((m_WyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_H, uint32((m_WyvernStateSouth & WYVERN_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_A, uint32((m_WyvernStateSouth & WYVERN_ALLIANCE) != 0));
-            break;
-        case NA_ROOST_N:
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_H, uint32((m_WyvernStateNorth & WYVERN_NEU_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_A, uint32((m_WyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_H, uint32((m_WyvernStateNorth & WYVERN_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_A, uint32((m_WyvernStateNorth & WYVERN_ALLIANCE) != 0));
-            break;
-        case NA_ROOST_W:
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_H, uint32((m_WyvernStateWest & WYVERN_NEU_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_A, uint32((m_WyvernStateWest & WYVERN_NEU_ALLIANCE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_H, uint32((m_WyvernStateWest & WYVERN_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_WEST_A, uint32((m_WyvernStateWest & WYVERN_ALLIANCE) != 0));
-            break;
-        case NA_ROOST_E:
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_H, uint32((m_WyvernStateEast & WYVERN_NEU_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_A, uint32((m_WyvernStateEast & WYVERN_NEU_ALLIANCE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_H, uint32((m_WyvernStateEast & WYVERN_HORDE) != 0));
-            m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_EAST_A, uint32((m_WyvernStateEast & WYVERN_ALLIANCE) != 0));
-            break;
+            player->CastSpell(player, NA_KILL_TOKEN_HORDE, true);
     }
 }

diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index fac9d8f..a220c49 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
@@ -34,96 +34,101 @@ enum DefenseMessages

 enum OutdoorPvPNASpells
 {
-    NA_KILL_TOKEN_ALLIANCE = 33005,
-    NA_KILL_TOKEN_HORDE = 33004,
-    NA_CAPTURE_BUFF = 33795  // strength of the halaani
+    NA_KILL_TOKEN_ALLIANCE  = 33005,
+    NA_KILL_TOKEN_HORDE     = 33004,
+    NA_CAPTURE_BUFF         = 33795  // strength of the halaani
 };

 // kill credit for pks
-const uint32 NA_CREDIT_MARKER = 24867;
+uint32 const NA_CREDIT_MARKER = 24867;

-const uint32 NA_GUARDS_MAX = 15;
+uint32 const NA_GUARDS_MAX = 15;

-const uint32 NA_BUFF_ZONE = 3518;
+uint32 const NA_BUFF_ZONE = 3518;

-const uint32 NA_HALAA_GRAVEYARD = 993;
+uint32 const NA_HALAA_GRAVEYARD = 993;

-const uint32 NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id
+uint32 const NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id

-const uint32 NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards
+uint32 const NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards

-const uint32 NA_GUARD_CHECK_TIME = 500; // every half second
+uint32 const NA_GUARD_CHECK_TIME = 500; // every half second

 enum OutdoorPvPNAWorldStates
 {
-    NA_UI_HORDE_GUARDS_SHOW = 2503,
-    NA_UI_ALLIANCE_GUARDS_SHOW = 2502,
-    NA_UI_GUARDS_MAX = 2493,
-    NA_UI_GUARDS_LEFT = 2491,
-
-    NA_MAP_WYVERN_NORTH_NEU_H = 2762,
-    NA_MAP_WYVERN_NORTH_NEU_A = 2662,
-    NA_MAP_WYVERN_NORTH_H = 2663,
-    NA_MAP_WYVERN_NORTH_A = 2664,
-
-    NA_MAP_WYVERN_SOUTH_NEU_H = 2760,
-    NA_MAP_WYVERN_SOUTH_NEU_A = 2670,
-    NA_MAP_WYVERN_SOUTH_H = 2668,
-    NA_MAP_WYVERN_SOUTH_A = 2669,
-
-    NA_MAP_WYVERN_WEST_NEU_H = 2761,
-    NA_MAP_WYVERN_WEST_NEU_A = 2667,
-    NA_MAP_WYVERN_WEST_H = 2665,
-    NA_MAP_WYVERN_WEST_A = 2666,
-
-    NA_MAP_WYVERN_EAST_NEU_H = 2763,
-    NA_MAP_WYVERN_EAST_NEU_A = 2659,
-    NA_MAP_WYVERN_EAST_H = 2660,
-    NA_MAP_WYVERN_EAST_A = 2661,
-
-    NA_MAP_HALAA_NEUTRAL = 2671,
-    NA_MAP_HALAA_NEU_A = 2676,
-    NA_MAP_HALAA_NEU_H = 2677,
-    NA_MAP_HALAA_HORDE = 2672,
-    NA_MAP_HALAA_ALLIANCE = 2673
+    NA_UI_HORDE_GUARDS_SHOW     = 2503,
+    NA_UI_ALLIANCE_GUARDS_SHOW  = 2502,
+    NA_UI_GUARDS_MAX            = 2493,
+    NA_UI_GUARDS_LEFT           = 2491,
+
+    NA_MAP_WYVERN_NORTH_NEU_H   = 2762,
+    NA_MAP_WYVERN_NORTH_NEU_A   = 2662,
+    NA_MAP_WYVERN_NORTH_H       = 2663,
+    NA_MAP_WYVERN_NORTH_A       = 2664,
+
+    NA_MAP_WYVERN_SOUTH_NEU_H   = 2760,
+    NA_MAP_WYVERN_SOUTH_NEU_A   = 2670,
+    NA_MAP_WYVERN_SOUTH_H       = 2668,
+    NA_MAP_WYVERN_SOUTH_A       = 2669,
+
+    NA_MAP_WYVERN_WEST_NEU_H    = 2761,
+    NA_MAP_WYVERN_WEST_NEU_A    = 2667,
+    NA_MAP_WYVERN_WEST_H        = 2665,
+    NA_MAP_WYVERN_WEST_A        = 2666,
+
+    NA_MAP_WYVERN_EAST_NEU_H    = 2763,
+    NA_MAP_WYVERN_EAST_NEU_A    = 2659,
+    NA_MAP_WYVERN_EAST_H        = 2660,
+    NA_MAP_WYVERN_EAST_A        = 2661,
+
+    NA_MAP_HALAA_NEUTRAL        = 2671,
+    NA_MAP_HALAA_NEU_A          = 2676,
+    NA_MAP_HALAA_NEU_H          = 2677,
+    NA_MAP_HALAA_HORDE          = 2672,
+    NA_MAP_HALAA_ALLIANCE       = 2673
 };

-const uint32 FLIGHT_NODES_NUM = 4;
-
 // used to access the elements of Horde/AllyControlGOs
 enum ControlGOTypes
 {
-    NA_ROOST_S = 0,
-    NA_ROOST_W = 1,
-    NA_ROOST_N = 2,
-    NA_ROOST_E = 3,
-
-    NA_BOMB_WAGON_S = 4,
-    NA_BOMB_WAGON_W = 5,
-    NA_BOMB_WAGON_N = 6,
-    NA_BOMB_WAGON_E = 7,
-
-    NA_DESTROYED_ROOST_S = 8,
-    NA_DESTROYED_ROOST_W = 9,
-    NA_DESTROYED_ROOST_N = 10,
-    NA_DESTROYED_ROOST_E = 11,
-
-    NA_CONTROL_GO_NUM = 12
+    NA_ROOST_S              = 0,
+    NA_ROOST_W              = 1,
+    NA_ROOST_N              = 2,
+    NA_ROOST_E              = 3,
+
+    NA_BOMB_WAGON_S         = 4,
+    NA_BOMB_WAGON_W         = 5,
+    NA_BOMB_WAGON_N         = 6,
+    NA_BOMB_WAGON_E         = 7,
+
+    NA_DESTROYED_ROOST_S    = 8,
+    NA_DESTROYED_ROOST_W    = 9,
+    NA_DESTROYED_ROOST_N    = 10,
+    NA_DESTROYED_ROOST_E    = 11,
+
+    NA_CONTROL_GO_NUM       = 12
 };

-const uint32 FlightPathStartNodes[FLIGHT_NODES_NUM] = {103, 105, 107, 109};
-const uint32 FlightPathEndNodes[FLIGHT_NODES_NUM] = {104, 106, 108, 110};
+uint32 const FLIGHT_NODES_NUM = 4;
+std::vector<uint32> const FlightPathNodes[FLIGHT_NODES_NUM] =
+{
+    // start, end
+    { 103, 104 },
+    { 105, 106 },
+    { 107, 108 },
+    { 109, 110 }
+};

 enum FlightSpellsNA
 {
-    NA_SPELL_FLY_SOUTH = 32059,
-    NA_SPELL_FLY_WEST = 32068,
-    NA_SPELL_FLY_NORTH = 32075,
-    NA_SPELL_FLY_EAST = 32081
+    NA_SPELL_FLY_SOUTH  = 32059,
+    NA_SPELL_FLY_WEST   = 32068,
+    NA_SPELL_FLY_NORTH  = 32075,
+    NA_SPELL_FLY_EAST   = 32081
 };

 // spawned when the alliance is attacking, horde is in control
-const go_type HordeControlGOs[NA_CONTROL_GO_NUM] =
+go_type const HordeControlGOs[NA_CONTROL_GO_NUM] =
 {
     {182267, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //ALLY_ROOST_SOUTH
     {182280, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //ALLY_ROOST_WEST
@@ -142,7 +147,7 @@ const go_type HordeControlGOs[NA_CONTROL_GO_NUM] =
 };

 // spawned when the horde is attacking, alliance is in control
-const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] =
+go_type const AllianceControlGOs[NA_CONTROL_GO_NUM] =
 {
     {182301, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //HORDE_ROOST_SOUTH
     {182302, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //HORDE_ROOST_WEST
@@ -237,73 +242,68 @@ const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] =

 enum WyvernStates
 {
-    WYVERN_NEU_HORDE = 1,
+    WYVERN_NEU_HORDE    = 1,
     WYVERN_NEU_ALLIANCE = 2,
-    WYVERN_HORDE = 4,
-    WYVERN_ALLIANCE = 8
+    WYVERN_HORDE        = 4,
+    WYVERN_ALLIANCE     = 8
 };

 enum HalaaStates
 {
-    HALAA_N = 1,
-    HALAA_N_A = 2,
-    HALAA_A = 4,
-    HALAA_N_H = 8,
-    HALAA_H = 16
+    HALAA_N             = 1,
+    HALAA_N_A           = 2,
+    HALAA_A             = 4,
+    HALAA_N_H           = 8,
+    HALAA_H             = 16
 };

 class Unit;
 class Creature;
 class OutdoorPvPNA;

+
 class OPvPCapturePointNA : public OPvPCapturePoint
 {
     public:
         OPvPCapturePointNA(OutdoorPvP* pvp);

-        bool Update(uint32 diff) override;
-
-        void ChangeState() override;
-
-        void FillInitialWorldStates(WorldPacket & data) override;
+        void FillInitialWorldStates(WorldPacket& data) override;

         bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go) override;

         int32 HandleOpenGo(Player* player, ObjectGuid guid) override;

+        bool Update(uint32 diff) override;
+
+        void ChangeState() override;
+        void ChangeTeam(TeamId oldTeam) override;
+
+        TeamId GetTeamId() const { return m_team; }
         uint32 GetAliveGuardsCount();
-        uint32 GetControllingFaction() const;

     protected:
-        // called when a faction takes control
-        void FactionTakeOver(uint32 team);
+        void DeleteSpawns() override;

-        void DeSpawnNPCs();
-        void DeSpawnGOs();
+        void SpawnNPCsForTeam(TeamId teamId);
+        void SpawnGOsForTeam(TeamId teamId);

-        void SpawnNPCsForTeam(uint32 team);
-        void SpawnGOsForTeam(uint32 team);
-
-        void UpdateWyvernRoostWorldState(uint32 roost);
         void UpdateHalaaWorldState();
+        void UpdateWyvernRoostWorldState(uint32 roost);

     private:
-        bool m_capturable;
-
-        uint32 m_GuardsAlive;
+        bool _capturable;

-        uint32 m_ControllingFaction;
+        uint32 _guardsAlive;

-        uint32 m_WyvernStateNorth;
-        uint32 m_WyvernStateSouth;
-        uint32 m_WyvernStateEast;
-        uint32 m_WyvernStateWest;
+        uint32 _wyvernStateNorth;
+        uint32 _wyvernStateSouth;
+        uint32 _wyvernStateEast;
+        uint32 _wyvernStateWest;

-        uint32 m_HalaaState;
+        uint32 _halaaState;

-        uint32 m_RespawnTimer;
-
-        uint32 m_GuardCheckTimer;
+        uint32 _respawnTimer;
+        uint32 _guardCheckTimer;
 };

 class OutdoorPvPNA : public OutdoorPvP
@@ -311,21 +311,21 @@ class OutdoorPvPNA : public OutdoorPvP
     public:
         OutdoorPvPNA();

-        bool SetupOutdoorPvP();
+        bool SetupOutdoorPvP() override;

-        void HandlePlayerEnterZone(Player* player, uint32 zone);
-        void HandlePlayerLeaveZone(Player* player, uint32 zone);
+        void HandlePlayerEnterZone(Player* player, uint32 zone) override;
+        void HandlePlayerLeaveZone(Player* player, uint32 zone) override;

-        bool Update(uint32 diff);
+        bool Update(uint32 diff) override;

-        void FillInitialWorldStates(WorldPacket &data);
+        void FillInitialWorldStates(WorldPacket& data) override;

-        void SendRemoveWorldStates(Player* player);
+        void SendRemoveWorldStates(Player* player) override;

-        void HandleKillImpl(Player* player, Unit* killed);
+        void HandleKillImpl(Player* killer, Unit* killed) override;

     private:
-        OPvPCapturePointNA * m_obj;
+        OPvPCapturePointNA* _capturePoint;
 };

-#endif
+#endif // OUTDOOR_PVP_NA_

Aktionen #7

Von Shienor vor fast 8 Jahren aktualisiert

  • Zugewiesen an wurde auf mathew gesetzt
Aktionen #8

Von mathew vor fast 8 Jahren aktualisiert

  • Zugewiesen an wurde von mathew zu Daejiv geändert
Aktionen #9

Von Daejiv vor mehr als 7 Jahren aktualisiert

  • Zugewiesen an Daejiv wurde gelöscht
Aktionen #10

Von creedem vor fast 7 Jahren aktualisiert

  • Status wurde von Bestätigt zu Recherche geändert

Aktueller Stand ? Tritt das noch auf ?

Aktionen #11

Von LordMagnum vor etwa 6 Jahren aktualisiert

  • Status wurde von Recherche zu Bestätigt geändert
Aktionen #12

Von LordMagnum vor etwa 6 Jahren aktualisiert

  • Tags wurde auf Vehicle gesetzt
  • Thema wurde von [Tausendwinter] Kanonen - Position und Orientierung | [Halaa] Forschungsleiter Kartos | Unregelmäßiger NPC-Spawn zu [Tausendwinter] Kanonen - Position und Orientierung geändert
  • Priorität wurde von Dringend zu Normal geändert
  • DB-Link wurde auf https://db.rising-gods.de/?npc=28366 gesetzt
Aktionen #13

Von Jeora vor mehr als 4 Jahren aktualisiert

  • Status wurde von Bestätigt zu Abgewiesen geändert

Tritt nicht mehr auf.

Aktionen

Auch abrufbar als: Atom PDF