mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user