mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Improve ICC spread and fix Valithria trigger (#884)
* Temp fix valithria find target * Improve spread with FleePosition * Fix Valithria trigger
This commit is contained in:
@@ -2144,8 +2144,13 @@ Position MovementAction::BestPositionForRangedToFlee(Position pos, float radius)
|
||||
return Position();
|
||||
}
|
||||
|
||||
bool MovementAction::FleePosition(Position pos, float radius)
|
||||
bool MovementAction::FleePosition(Position pos, float radius, uint32 minInterval)
|
||||
{
|
||||
std::list<FleeInfo>& infoList = AI_VALUE(std::list<FleeInfo>&, "recently flee info");
|
||||
|
||||
if (!infoList.empty() && infoList.back().timestamp + minInterval > getMSTime())
|
||||
return false;
|
||||
|
||||
Position bestPos;
|
||||
if (botAI->IsMelee(bot))
|
||||
{
|
||||
@@ -2160,7 +2165,6 @@ bool MovementAction::FleePosition(Position pos, float radius)
|
||||
if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false,
|
||||
false, true, false, MovementPriority::MOVEMENT_COMBAT))
|
||||
{
|
||||
std::list<FleeInfo>& infoList = AI_VALUE(std::list<FleeInfo>&, "recently flee info");
|
||||
uint32 curTS = getMSTime();
|
||||
while (!infoList.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user