Core/Maps: Use IsValidMapCoord for checking Z coord instead of just std::isfinite - only acceptable values are between -17066.6656 and 17066.6656

(cherry picked from commit 4d956c89fc)
This commit is contained in:
Shauren
2016-02-09 19:18:05 +01:00
parent 25cdc5d980
commit 761c82e65a
3 changed files with 1 additions and 18 deletions

View File

@@ -1909,9 +1909,6 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* achie
if (!area)
break;
if (area->exploreFlag < 0)
continue;
uint32 playerIndexOffset = uint32(area->exploreFlag) / 32;
if (playerIndexOffset >= PLAYER_EXPLORED_ZONES_SIZE)
continue;

View File

@@ -226,7 +226,7 @@ namespace Trinity
inline bool IsValidMapCoord(float x, float y, float z)
{
return IsValidMapCoord(x, y) && std::isfinite(z);
return IsValidMapCoord(x, y) && IsValidMapCoord(z);
}
inline bool IsValidMapCoord(float x, float y, float z, float o)

View File

@@ -1060,13 +1060,6 @@ public:
return false;
}
if (area->exploreFlag < 0)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}
int32 offset = area->exploreFlag / 32;
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
@@ -1104,13 +1097,6 @@ public:
return false;
}
if (area->exploreFlag < 0)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}
int32 offset = area->exploreFlag / 32;
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{