Minor improvments on logs, stats weights and aoe distance calculation (#995)

* StatsCollector for paladin spell

* Remove error log on MoveFromGroup

* Log and timer for CreateRandomBots

* Improve aoe trigger distance calculation

* Reduce spirit weights for heal priest and paladin
This commit is contained in:
Yunfan Li
2025-02-22 10:57:33 +08:00
committed by GitHub
parent a0278f1efb
commit 4b1febc62a
7 changed files with 35 additions and 25 deletions

View File

@@ -1583,7 +1583,7 @@ bool MovementAction::MoveAway(Unit* target, float distance, bool backwards)
// just calculates average position of group and runs away from that position
bool MovementAction::MoveFromGroup(float distance)
{
LOG_ERROR("playerbots", "MovementAction::MoveFromGroup");
// LOG_ERROR("playerbots", "MovementAction::MoveFromGroup");
//if (Player* master = botAI->GetMaster())
//{
// return MoveAway(master);

View File

@@ -829,11 +829,6 @@ bool AnubrekhanPositionAction::Execute(Event event)
{
return false;
}
auto* boss_ai = dynamic_cast<Anubrekhan::boss_anubrekhan::boss_anubrekhanAI*>(boss->GetAI());
if (!boss_ai)
{
return false;
}
bool inPhase = botAI->HasAura("locust swarm", boss) || boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (inPhase)
{

View File

@@ -228,8 +228,7 @@ bool AoeTrigger::IsActive()
Unit* unit = botAI->GetUnit(guid);
if (!unit || !unit->IsAlive())
continue;
if (unit->GetExactDist2d(current_target) <= range)
if (unit->GetDistance(current_target->GetPosition()) <= range)
{
attackers_count++;
}