mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-29 00:13:47 +00:00
[Attack target] Ignore moon mark
This commit is contained in:
@@ -71,6 +71,12 @@ class CasterFindTargetSmartStrategy : public FindTargetStrategy
|
|||||||
|
|
||||||
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
||||||
{
|
{
|
||||||
|
if (Group* group = botAI->GetBot()->GetGroup())
|
||||||
|
{
|
||||||
|
ObjectGuid guid = group->GetTargetIcon(4);
|
||||||
|
if (guid && attacker->GetGUID() == guid)
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!attacker->IsAlive()) {
|
if (!attacker->IsAlive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -138,6 +144,12 @@ class NonCasterFindTargetSmartStrategy : public FindTargetStrategy
|
|||||||
|
|
||||||
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
||||||
{
|
{
|
||||||
|
if (Group* group = botAI->GetBot()->GetGroup())
|
||||||
|
{
|
||||||
|
ObjectGuid guid = group->GetTargetIcon(4);
|
||||||
|
if (guid && attacker->GetGUID() == guid)
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!attacker->IsAlive()) {
|
if (!attacker->IsAlive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -193,6 +205,12 @@ class ComboFindTargetSmartStrategy : public FindTargetStrategy
|
|||||||
|
|
||||||
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
void CheckAttacker(Unit* attacker, ThreatMgr* threatMgr) override
|
||||||
{
|
{
|
||||||
|
if (Group* group = botAI->GetBot()->GetGroup())
|
||||||
|
{
|
||||||
|
ObjectGuid guid = group->GetTargetIcon(4);
|
||||||
|
if (guid && attacker->GetGUID() == guid)
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!attacker->IsAlive()) {
|
if (!attacker->IsAlive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user