mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Combine if member & isAssist
This commit is contained in:
@@ -2237,17 +2237,14 @@ bool PlayerbotAI::IsHealAssistantOfIndex(Player* player, int index)
|
|||||||
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
||||||
{
|
{
|
||||||
Player* member = ref->GetSource();
|
Player* member = ref->GetSource();
|
||||||
if (!member)
|
if (!member || !IsHeal(member))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IsHeal(member))
|
|
||||||
{
|
|
||||||
if (group->IsAssistant(member->GetGUID()))
|
if (group->IsAssistant(member->GetGUID()))
|
||||||
assistantHealers.push_back(member);
|
assistantHealers.push_back(member);
|
||||||
else
|
else
|
||||||
nonAssistantHealers.push_back(member);
|
nonAssistantHealers.push_back(member);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Combine: assistants before non-assistants
|
// Combine: assistants before non-assistants
|
||||||
allHealers.insert(allHealers.end(), assistantHealers.begin(), assistantHealers.end());
|
allHealers.insert(allHealers.end(), assistantHealers.begin(), assistantHealers.end());
|
||||||
@@ -2272,17 +2269,14 @@ bool PlayerbotAI::IsRangedDpsAssistantOfIndex(Player* player, int index)
|
|||||||
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
||||||
{
|
{
|
||||||
Player* member = ref->GetSource();
|
Player* member = ref->GetSource();
|
||||||
if (!member)
|
if (!member || !IsRangedDps(member))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IsRangedDps(member))
|
|
||||||
{
|
|
||||||
if (group->IsAssistant(member->GetGUID()))
|
if (group->IsAssistant(member->GetGUID()))
|
||||||
assistantRangedDps.push_back(member);
|
assistantRangedDps.push_back(member);
|
||||||
else
|
else
|
||||||
nonAssistantRangedDps.push_back(member);
|
nonAssistantRangedDps.push_back(member);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Combine: assistants before non-assistants
|
// Combine: assistants before non-assistants
|
||||||
allRangedDps.insert(allRangedDps.end(), assistantRangedDps.begin(), assistantRangedDps.end());
|
allRangedDps.insert(allRangedDps.end(), assistantRangedDps.begin(), assistantRangedDps.end());
|
||||||
@@ -2307,17 +2301,14 @@ bool PlayerbotAI::IsAssistTankOfIndex(Player* player, int index)
|
|||||||
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
|
||||||
{
|
{
|
||||||
Player* member = ref->GetSource();
|
Player* member = ref->GetSource();
|
||||||
if (!member)
|
if (!member || !IsAssistTank(member))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IsAssistTank(member))
|
|
||||||
{
|
|
||||||
if (group->IsAssistant(member->GetGUID()))
|
if (group->IsAssistant(member->GetGUID()))
|
||||||
assistTanks.push_back(member);
|
assistTanks.push_back(member);
|
||||||
else
|
else
|
||||||
nonAssistTanks.push_back(member);
|
nonAssistTanks.push_back(member);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Combine: assistants before non-assistants
|
// Combine: assistants before non-assistants
|
||||||
allTanks.insert(allTanks.end(), assistTanks.begin(), assistTanks.end());
|
allTanks.insert(allTanks.end(), assistTanks.begin(), assistTanks.end());
|
||||||
|
|||||||
Reference in New Issue
Block a user