diff options
Diffstat (limited to 'src/game/BattleGroundAV.cpp')
-rw-r--r-- | src/game/BattleGroundAV.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index 8c7277bdbd8..04faa776a9f 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -1099,7 +1099,9 @@ WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* player) for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) if (m_Nodes[i].Owner == player->GetTeam() && m_Nodes[i].State == POINT_CONTROLED) - if (entry = sWorldSafeLocsStore.LookupEntry(BG_AV_GraveyardIds[i])) + { + entry = sWorldSafeLocsStore.LookupEntry(BG_AV_GraveyardIds[i]); + if (entry) { dist = (entry->x - x)*(entry->x - x)+(entry->y - y)*(entry->y - y); if (dist < minDist) @@ -1108,6 +1110,7 @@ WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* player) pGraveyard = entry; } } + } return pGraveyard; } |