From f3911b01c92fe9bff05ecf61083b864007f8ce9a Mon Sep 17 00:00:00 2001 From: billy1arm Date: Sun, 25 Aug 2024 19:50:28 +0100 Subject: [PATCH] Fix build --- src/game/WorldHandlers/Spell.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index 11b227da7..a33be47fd 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -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); + } + } + } } } } @@ -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); + } + } + } } } @@ -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) { @@ -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)