Beispiel #1
0
bool WorldLocation::IsValidMapCoord(WorldLocation const& loc)
{
    if (loc.HasMap())
        return MapManager::IsValidMapCoord(loc);
    else
        return MaNGOS::IsValidMapCoord(loc.getX(), loc.getY(), loc.getZ(), loc.getO());
}
Beispiel #2
0
bool WorldLocation::IsValidMapCoord(WorldLocation const& loc)
{
    if (loc.HasMap())
        return MapManager::IsValidMapCoord(loc);
    else
        return MaNGOS::IsValidMapCoord(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
}
Beispiel #3
0
float WorldLocation::GetDistance(WorldLocation const& loc) const
{
    return (!HasMap() || !loc.HasMap() || ((GetMapId() == loc.GetMapId()) && (GetInstanceId() == loc.GetInstanceId()))) ?
        ((Position)*this).GetDistance((Position)loc) :
        MAX_VISIBILITY_DISTANCE + 1.0f;
};