mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-14 15:53:45 +00:00
Revert "Fix GetTargetIcons calls (thanks xuanfeng66)"
This reverts commit 4abe553f27.
This commit is contained in:
@@ -101,7 +101,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range)
|
||||
Creature* c = attacker->ToCreature();
|
||||
bool rti = false;
|
||||
if (attacker && bot->GetGroup())
|
||||
rti = bot->GetGroup()->GetTargetIcons()[7] == attacker->GetGUID();
|
||||
rti = bot->GetGroup()->GetTargetIcon(7) == attacker->GetGUID();
|
||||
|
||||
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class FindLeastHpTargetStrategy : public FindTargetStrategy
|
||||
{
|
||||
if (Group* group = botAI->GetBot()->GetGroup())
|
||||
{
|
||||
ObjectGuid guid = group->GetTargetIcons()[4];
|
||||
ObjectGuid guid = group->GetTargetIcon(4);
|
||||
if (guid && attacker->GetGUID() == guid)
|
||||
return;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class FindMaxHpTargetStrategy : public FindTargetStrategy
|
||||
{
|
||||
if (Group* group = botAI->GetBot()->GetGroup())
|
||||
{
|
||||
ObjectGuid guid = group->GetTargetIcons()[4];
|
||||
ObjectGuid guid = group->GetTargetIcon(4);
|
||||
if (guid && attacker->GetGUID() == guid)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ Unit* RtiTargetValue::Calculate()
|
||||
if (index == -1)
|
||||
return nullptr;
|
||||
|
||||
ObjectGuid guid = group->GetTargetIcons()[index];
|
||||
ObjectGuid guid = group->GetTargetIcon(index);
|
||||
if (!guid)
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -49,14 +49,14 @@ bool FindNonCcTargetStrategy::IsCcTarget(Unit* attacker)
|
||||
int32 index = RtiTargetValue::GetRtiIndex(rti);
|
||||
if (index != -1)
|
||||
{
|
||||
if (ObjectGuid guid = group->GetTargetIcons()[index])
|
||||
if (ObjectGuid guid = group->GetTargetIcon(index))
|
||||
if (attacker->GetGUID() == guid)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectGuid guid = group->GetTargetIcons()[4])
|
||||
if (ObjectGuid guid = group->GetTargetIcon(4))
|
||||
if (attacker->GetGUID() == guid)
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user