mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-31 09:23:47 +00:00
[Log] Better bot teleport info
This commit is contained in:
@@ -1190,6 +1190,10 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector<WorldLocation>&
|
|||||||
AreaTableEntry const* zone = sAreaTableStore.LookupEntry(map->GetZoneId(bot->GetPhaseMask(), x, y, z));
|
AreaTableEntry const* zone = sAreaTableStore.LookupEntry(map->GetZoneId(bot->GetPhaseMask(), x, y, z));
|
||||||
if (!zone)
|
if (!zone)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
AreaTableEntry const* area = sAreaTableStore.LookupEntry(map->GetAreaId(bot->GetPhaseMask(), x, y, z));
|
||||||
|
if (!area)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Do not teleport to enemy zones if level is low
|
// Do not teleport to enemy zones if level is low
|
||||||
if (zone->team == 4 && bot->GetTeamId() == TEAM_ALLIANCE)
|
if (zone->team == 4 && bot->GetTeamId() == TEAM_ALLIANCE)
|
||||||
@@ -1218,9 +1222,14 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector<WorldLocation>&
|
|||||||
if (bot->GetLevel() <= 18 && (loc.GetMapId() != pInfo->mapId || dis > 10000.0f)) {
|
if (bot->GetLevel() <= 18 && (loc.GetMapId() != pInfo->mapId || dis > 10000.0f)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
LocaleConstant locale = sWorld->GetDefaultDbcLocale();
|
||||||
LOG_INFO("playerbots", "Random teleporting bot {} (level {}) to {} {},{},{} ({}/{} locations)",
|
|
||||||
bot->GetName().c_str(), bot->GetLevel(), zone->area_name[0], x, y, z, i + 1, tlocs.size());
|
LOG_INFO("playerbots", "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) {},{},{} ({}/{} locations)",
|
||||||
|
bot->GetName().c_str(), bot->GetLevel(),
|
||||||
|
map->GetId(), map->GetMapName(),
|
||||||
|
zone->ID, zone->area_name[locale],
|
||||||
|
area->ID, area->area_name[locale],
|
||||||
|
x, y, z, i + 1, tlocs.size());
|
||||||
|
|
||||||
if (hearth)
|
if (hearth)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user