[Attack target] Fix attack

This commit is contained in:
Yunfan Li
2024-06-04 22:15:27 +08:00
parent 55eecba11b
commit 46e585f854
3 changed files with 60 additions and 75 deletions

View File

@@ -21,12 +21,14 @@ class FindTargetStrategy
Unit* GetResult();
virtual void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) = 0;
void GetPlayerCount(Unit* creature, uint32* tankCount, uint32* dpsCount);
bool IsHighPriority(Unit* attacker);
protected:
Unit* result;
PlayerbotAI* botAI;
std::map<Unit*, uint32> tankCountCache;
std::map<Unit*, uint32> dpsCountCache;
bool foundHighPriority = false;
};
class FindNonCcTargetStrategy : public FindTargetStrategy