aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundAV.cpp
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-19 17:03:10 +0200
committerSpp <none@none>2010-04-19 17:03:10 +0200
commitbe01821050dd30ff65e89b347d528efb20aba028 (patch)
tree6d33e686bf1c5d664a7104a208a4e057c6337b1e /src/game/BattleGroundAV.cpp
parentf74e969a069646eca6227bdede974223c07e9c94 (diff)
More warning removal (Some code modifications and cleanup when needed)
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundAV.cpp')
-rw-r--r--src/game/BattleGroundAV.cpp5
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;
}