diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index c76d0422763b65..d0425cb09b263e 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -4001,7 +4001,7 @@ bool Creature::LoadBotCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool //We should set first home position, because then AI calls home movement SetHomePosition(*this); - m_deathState = ALIVE; + m_deathState = DeathState::Alive; m_respawnTime = 0; uint32 curhealth; @@ -4023,7 +4023,7 @@ bool Creature::LoadBotCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool SetPower(POWER_MANA, GetMaxPower(POWER_MANA)); } - SetHealth(m_deathState == ALIVE ? curhealth : 0); + SetHealth(m_deathState == DeathState::Alive ? curhealth : 0); // checked at creature_template loading m_defaultMovementType = data ? MovementGeneratorType(data->movementType) : IDLE_MOTION_TYPE; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 632493adc86f95..3a85b17fca4558 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2788,10 +2788,6 @@ template <> void Map::AddToActive(Creature* c) { AddToActiveHelper(c); - //npcbot - else if (c->IsNPCBot()) - EnsureGridLoadedForActiveObject(Cell(Acore::ComputeCellCoord(c->GetPositionX(), c->GetPositionY())), c); - //end npcbot } template<> @@ -2816,15 +2812,6 @@ template <> void Map::RemoveFromActive(Creature* c) { RemoveFromActiveHelper(c); - //npcbot: prevent crash from accessing deleted creatureData - if (c->IsNPCBot()) - c->GetHomePosition().GetPosition(x, y, z); - else - //end npcbot - //npcbot - else if (c->IsNPCBot()) - EnsureGridLoaded(Cell(Acore::ComputeCellCoord(c->GetPositionX(), c->GetPositionY()))); - //end npcbot } template<> diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 620cc6ff4996d3..a5f94745d84bd0 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -361,14 +361,14 @@ bool OPvPCapturePoint::Update(uint32 diff) { botsCount[team] = 0; - for (GuidSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr) + for (GuidSet::iterator itr = _activePlayers[team].begin(); itr != _activePlayers[team].end(); ++itr) { if (Player* player = ObjectAccessor::FindPlayer(*itr)) botsCount[team] += player->GetNpcBotsCount(); } } - fact_diff += 0.5f * ((float)botsCount[0] - (float)botsCount[1]) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL; + factDiff += 0.5f * ((float)botsCount[0] - (float)botsCount[1]) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL; //end npcbot TeamId ChallengerId = TEAM_NEUTRAL;