mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
movement, disable hearthstone
This commit is contained in:
@@ -46,21 +46,21 @@ bool CheckMountStateAction::Execute(Event event)
|
|||||||
if (!bot->GetGroup() || bot->GetGroup()->GetLeaderGUID() != master->GetGUID())
|
if (!bot->GetGroup() || bot->GetGroup()->GetLeaderGUID() != master->GetGUID())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool farFromMaster = sServerFacade->GetDistance2d(bot, master) > sPlayerbotAIConfig->sightDistance;
|
// bool farFromMaster = sServerFacade->GetDistance2d(bot, master) > sPlayerbotAIConfig->sightDistance;
|
||||||
if (master->IsMounted() && !bot->IsMounted() && noattackers)
|
if (master->IsMounted() && !bot->IsMounted() && noattackers)
|
||||||
{
|
{
|
||||||
return Mount();
|
return Mount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bot->IsMounted() && (chasedistance || (farFromMaster && botAI->HasStrategy("follow", BOT_STATE_NON_COMBAT))) && !bot->IsInCombat() && !dps)
|
// if (!bot->IsMounted() && (chasedistance || (farFromMaster && botAI->HasStrategy("follow", BOT_STATE_NON_COMBAT))) && !bot->IsInCombat() && !dps)
|
||||||
return Mount();
|
// return Mount();
|
||||||
|
|
||||||
if (!bot->IsFlying() && ((!farFromMaster && !master->IsMounted()) || attackdistance) && bot->IsMounted())
|
// if (!bot->IsFlying() && ((!farFromMaster && !master->IsMounted()) || attackdistance) && bot->IsMounted())
|
||||||
{
|
// {
|
||||||
WorldPacket emptyPacket;
|
// WorldPacket emptyPacket;
|
||||||
bot->GetSession()->HandleCancelMountAuraOpcode(emptyPacket);
|
// bot->GetSession()->HandleCancelMountAuraOpcode(emptyPacket);
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,23 +382,23 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathType == TravelNodePathType::teleportSpell && entry)
|
// if (pathType == TravelNodePathType::teleportSpell && entry)
|
||||||
{
|
// {
|
||||||
if (entry == 8690)
|
// if (entry == 8690)
|
||||||
{
|
// {
|
||||||
if (!bot->HasSpellCooldown(8690))
|
// if (!bot->HasSpellCooldown(8690))
|
||||||
{
|
// {
|
||||||
return botAI->DoSpecificAction("hearthstone", Event("move action"));
|
// return botAI->DoSpecificAction("hearthstone", Event("move action"));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
movePath.clear();
|
// movePath.clear();
|
||||||
AI_VALUE(LastMovement&, "last movement").setPath(movePath);
|
// AI_VALUE(LastMovement&, "last movement").setPath(movePath);
|
||||||
LOG_DEBUG("playerbots", "bot->HasSpellCooldown(8690)");
|
// LOG_DEBUG("playerbots", "bot->HasSpellCooldown(8690)");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//if (!isTransport && bot->GetTransport())
|
//if (!isTransport && bot->GetTransport())
|
||||||
// bot->GetTransport()->RemovePassenger(bot);
|
// bot->GetTransport()->RemovePassenger(bot);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ void CombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
|||||||
triggers.push_back(new TriggerNode("mounted", NextAction::array(0, new NextAction("check mount state", 54), nullptr)));
|
triggers.push_back(new TriggerNode("mounted", NextAction::array(0, new NextAction("check mount state", 54), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("out of react range", NextAction::array(0, new NextAction("flee to master", 55), nullptr)));
|
triggers.push_back(new TriggerNode("out of react range", NextAction::array(0, new NextAction("flee to master", 55), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("combat stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("combat stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("combat long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
// triggers.push_back(new TriggerNode("combat long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ void MaintenanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("enchant random item", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("enchant random item", 1.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("smart destroy item", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("smart destroy item", 1.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("move stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("move stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("move long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
// triggers.push_back(new TriggerNode("move long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user