mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix get zone id
This commit is contained in:
parent
a5d1d7579d
commit
9b41798eee
@ -1537,6 +1537,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
|
||||
if (!map)
|
||||
continue;
|
||||
const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z));
|
||||
uint32 zoneId = area->zone ? area->zone : area->ID;
|
||||
uint32 level = area->area_level;
|
||||
for (int i = 5; i <= maxLevel; i++)
|
||||
{
|
||||
@ -1551,13 +1552,14 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
|
||||
if (loc.GetExactDist(checkLoc) > 1000.0f)
|
||||
continue;
|
||||
|
||||
if (area->zone !=
|
||||
if (zoneId !=
|
||||
map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ()))
|
||||
continue;
|
||||
|
||||
counter++;
|
||||
levelLoc = checkLoc;
|
||||
}
|
||||
|
||||
if (counter < 15)
|
||||
continue;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user