diff --git a/src/strategy/warrior/WarriorActions.cpp b/src/strategy/warrior/WarriorActions.cpp index a917afd2..a6eee7dc 100644 --- a/src/strategy/warrior/WarriorActions.cpp +++ b/src/strategy/warrior/WarriorActions.cpp @@ -13,12 +13,12 @@ bool CastSunderArmorAction::isUseful() return !aura || aura->GetStackAmount() < 5 || aura->GetDuration() <= 6000; } -Value* CastVigilanceAction::GetTargetValue() +Unit* CastVigilanceAction::GetTarget() { Group* group = bot->GetGroup(); if (!group) { - return new ManualSetValue(botAI, nullptr); + return nullptr; } Player* currentVigilanceTarget = nullptr; @@ -74,23 +74,23 @@ Value* CastVigilanceAction::GetTargetValue() // If no valid target, return nullptr if (!highestPriorityTarget) { - return new ManualSetValue(botAI, nullptr); + return nullptr; } // If the current target is already the highest-priority target, do nothing if (currentVigilanceTarget == highestPriorityTarget) { - return new ManualSetValue(botAI, nullptr); + return nullptr; } // Assign the new target Unit* targetUnit = highestPriorityTarget->ToUnit(); if (targetUnit) { - return new ManualSetValue(botAI, targetUnit); + return targetUnit; } - return new ManualSetValue(botAI, nullptr); + return nullptr; } bool CastVigilanceAction::Execute(Event event) diff --git a/src/strategy/warrior/WarriorActions.h b/src/strategy/warrior/WarriorActions.h index 5683589c..79929b45 100644 --- a/src/strategy/warrior/WarriorActions.h +++ b/src/strategy/warrior/WarriorActions.h @@ -140,7 +140,7 @@ class CastVigilanceAction : public BuffOnPartyAction public: CastVigilanceAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "vigilance") {} - Value* GetTargetValue() override; + Unit* GetTarget() override; bool Execute(Event event) override; };