mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
feat(Core/Travel): Add transportTeleportType config + teleport-across-water branch in UpcommingSpecialMovement
This commit is contained in:
parent
b269fa3825
commit
666136ab34
@ -1038,6 +1038,15 @@ AiPlayerbot.EnableNewRpgStrategy = 1
|
|||||||
# Default: 0 (disabled)
|
# Default: 0 (disabled)
|
||||||
AiPlayerbot.EnableTravelNodes = 0
|
AiPlayerbot.EnableTravelNodes = 0
|
||||||
|
|
||||||
|
# Transport handling mode (travel node graph only):
|
||||||
|
# 0 = bot walks to dock, boards transport, rides, walks off (fully physical)
|
||||||
|
# 1 = same as 0, but if walk-on/off fails the boarding teleports the bot
|
||||||
|
# 2 = bot teleports across the route, skipping the ride entirely
|
||||||
|
# Reference default is 0; raise only if invisible/random-bot mass travel
|
||||||
|
# performance becomes an issue.
|
||||||
|
# Default: 0
|
||||||
|
AiPlayerbot.TransportTeleportType = 0
|
||||||
|
|
||||||
# Control probability weights for RPG status of bots. Takes effect only when the status meets its premise.
|
# Control probability weights for RPG status of bots. Takes effect only when the status meets its premise.
|
||||||
# Sum of weights need not be 100. Set to 0 to disable the status.
|
# Sum of weights need not be 100. Set to 0 to disable the status.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -927,12 +927,12 @@ bool TravelPath::UpcommingSpecialMovement(WorldPosition startPos,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transport boarding/disembark. We don't expose a teleport-vs-walk
|
// Walk-on / teleport-to-transport boarding mode (modes 0 and 1).
|
||||||
// toggle yet, so always take the walk-on-board path: cut to dock if
|
// Cut to dock if off-transport, traverse to disembark if on-transport.
|
||||||
// off-transport, traverse to disembark if on-transport.
|
if (sPlayerbotAIConfig.transportTeleportType < 2 &&
|
||||||
if (startP->type == PathNodeType::NODE_TRANSPORT)
|
startP->type == PathNodeType::NODE_TRANSPORT)
|
||||||
{
|
{
|
||||||
uint32 entry = nextP->entry;
|
uint32 const entry = nextP->entry;
|
||||||
|
|
||||||
if (!onTransport)
|
if (!onTransport)
|
||||||
{
|
{
|
||||||
@ -954,6 +954,24 @@ bool TravelPath::UpcommingSpecialMovement(WorldPosition startPos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Teleport-across mode (mode 2): bot is approaching a transport
|
||||||
|
// node — walk forward to find the first non-transport node (the
|
||||||
|
// disembark side), cut to prevP (last transport node) so
|
||||||
|
// HandleSpecialMovement teleports the bot across directly.
|
||||||
|
if (sPlayerbotAIConfig.transportTeleportType == 2 &&
|
||||||
|
nextP->type == PathNodeType::NODE_TRANSPORT)
|
||||||
|
{
|
||||||
|
for (auto p = std::next(startP); p != fullPath.end(); ++p)
|
||||||
|
{
|
||||||
|
if (p->type != PathNodeType::NODE_TRANSPORT)
|
||||||
|
{
|
||||||
|
cutTo(*prevP, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
prevP = p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,6 +88,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
|
|
||||||
farDistance = sConfigMgr->GetOption<float>("AiPlayerbot.FarDistance", 20.0f);
|
farDistance = sConfigMgr->GetOption<float>("AiPlayerbot.FarDistance", 20.0f);
|
||||||
sightDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SightDistance", 100.0f);
|
sightDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SightDistance", 100.0f);
|
||||||
|
transportTeleportType = sConfigMgr->GetOption<uint32>("AiPlayerbot.TransportTeleportType", 0);
|
||||||
spellDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SpellDistance", 28.5f);
|
spellDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SpellDistance", 28.5f);
|
||||||
shootDistance = sConfigMgr->GetOption<float>("AiPlayerbot.ShootDistance", 5.0f);
|
shootDistance = sConfigMgr->GetOption<float>("AiPlayerbot.ShootDistance", 5.0f);
|
||||||
healDistance = sConfigMgr->GetOption<float>("AiPlayerbot.HealDistance", 38.5f);
|
healDistance = sConfigMgr->GetOption<float>("AiPlayerbot.HealDistance", 38.5f);
|
||||||
|
|||||||
@ -93,6 +93,11 @@ public:
|
|||||||
bool randomBotGuildNearby, randomBotInvitePlayer, inviteChat;
|
bool randomBotGuildNearby, randomBotInvitePlayer, inviteChat;
|
||||||
uint32 globalCoolDown, reactDelay, maxWaitForMove, disableMoveSplinePath, expireActionTime,
|
uint32 globalCoolDown, reactDelay, maxWaitForMove, disableMoveSplinePath, expireActionTime,
|
||||||
dispelAuraDuration, passiveDelay, repeatDelay, errorDelay, rpgDelay, sitDelay, returnDelay, lootDelay;
|
dispelAuraDuration, passiveDelay, repeatDelay, errorDelay, rpgDelay, sitDelay, returnDelay, lootDelay;
|
||||||
|
// Transport handling mode (matches reference `transportTeleportType`):
|
||||||
|
// 0 = walk on board, walk off (default, fully physical)
|
||||||
|
// 1 = walk on board, but UseTransport teleports on/off if walk fails
|
||||||
|
// 2 = skip the ride entirely — teleport directly across the route
|
||||||
|
uint32 transportTeleportType;
|
||||||
bool dynamicReactDelay;
|
bool dynamicReactDelay;
|
||||||
float sightDistance, spellDistance, reactDistance, grindDistance, lootDistance, shootDistance, fleeDistance,
|
float sightDistance, spellDistance, reactDistance, grindDistance, lootDistance, shootDistance, fleeDistance,
|
||||||
tooCloseDistance, meleeDistance, followDistance, whisperDistance, contactDistance, aoeRadius, rpgDistance,
|
tooCloseDistance, meleeDistance, followDistance, whisperDistance, contactDistance, aoeRadius, rpgDistance,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user