mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 01:19:08 +00:00
[Attack target] Fix attack
This commit is contained in:
@@ -100,6 +100,24 @@ void FindTargetStrategy::GetPlayerCount(Unit* creature, uint32* tankCount, uint3
|
||||
dpsCountCache[creature] = *dpsCount;
|
||||
}
|
||||
|
||||
bool FindTargetStrategy::IsHighPriority(Unit* attacker)
|
||||
{
|
||||
if (Group* group = botAI->GetBot()->GetGroup())
|
||||
{
|
||||
ObjectGuid guid = group->GetTargetIcon(4);
|
||||
if (guid && attacker->GetGUID() == guid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
GuidVector prioritizedTargets = botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Get();
|
||||
for (ObjectGuid targetGuid : prioritizedTargets) {
|
||||
if (targetGuid && attacker->GetGUID() == targetGuid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
WorldPosition LastLongMoveValue::Calculate()
|
||||
{
|
||||
LastMovement& lastMove = *context->GetValue<LastMovement&>("last movement");
|
||||
|
||||
Reference in New Issue
Block a user