Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1arm committed Aug 25, 2024
1 parent fead521 commit f3911b0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/game/WorldHandlers/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9017,13 +9017,21 @@ void Spell::FillRaidOrPartyTargets(UnitList& targetUnitMap, Unit* member, Unit*
{
if ((Target == center || center->IsWithinDistInMap(Target, radius)) &&
(withcaster || Target != m_caster))
{
targetUnitMap.push_back(Target);
}

if (withPets)
{
if (Pet* pet = Target->GetPet())
{
if ((pet == center || center->IsWithinDistInMap(pet, radius)) &&
(withcaster || pet != m_caster))
{
targetUnitMap.push_back(pet);
}
}
}
}
}
}
Expand All @@ -9032,14 +9040,21 @@ void Spell::FillRaidOrPartyTargets(UnitList& targetUnitMap, Unit* member, Unit*
Unit* ownerOrSelf = pMember ? pMember : member->GetCharmerOrOwnerOrSelf();
if ((ownerOrSelf == center || center->IsWithinDistInMap(ownerOrSelf, radius)) &&
(withcaster || ownerOrSelf != m_caster))
{
targetUnitMap.push_back(ownerOrSelf);
}

if (withPets)
{
if (Pet* pet = ownerOrSelf->GetPet())
{
if ((pet == center || center->IsWithinDistInMap(pet, radius)) &&
(withcaster || pet != m_caster))
{
targetUnitMap.push_back(pet);
}
}
}
}
}

Expand All @@ -9049,11 +9064,12 @@ void Spell::FillRaidOrPartyManaPriorityTargets(UnitList& targetUnitMap, Unit* me

PrioritizeManaUnitQueue manaUsers;
for (UnitList::const_iterator itr = targetUnitMap.begin(); itr != targetUnitMap.end(); ++itr)
{
if ((*itr)->GetPowerType() == POWER_MANA && !(*itr)->IsDead())
{
manaUsers.push(PrioritizeManaUnitWraper(*itr));
}

}
targetUnitMap.clear();
while (!manaUsers.empty() && targetUnitMap.size() < count)
{
Expand All @@ -9068,10 +9084,12 @@ void Spell::FillRaidOrPartyHealthPriorityTargets(UnitList& targetUnitMap, Unit*

PrioritizeHealthUnitQueue healthQueue;
for (UnitList::const_iterator itr = targetUnitMap.begin(); itr != targetUnitMap.end(); ++itr)
{
if (!(*itr)->IsDead())
{
healthQueue.push(PrioritizeHealthUnitWraper(*itr));
}
}

targetUnitMap.clear();
while (!healthQueue.empty() && targetUnitMap.size() < count)
Expand Down

0 comments on commit f3911b0

Please sign in to comment.