Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Trinity
|
||||
}
|
||||
|
||||
template<class C>
|
||||
void RandomResizeList(C& container, std::size_t requestedSize)
|
||||
void RandomResize(C& container, std::size_t requestedSize)
|
||||
{
|
||||
uint32 currentSize = uint32(Size(container));
|
||||
while (currentSize > requestedSize)
|
||||
@@ -67,7 +67,7 @@ namespace Trinity
|
||||
}
|
||||
|
||||
template<class C, class Predicate>
|
||||
void RandomResizeList(C& container, Predicate&& predicate, std::size_t requestedSize)
|
||||
void RandomResize(C& container, Predicate&& predicate, std::size_t requestedSize)
|
||||
{
|
||||
//! First use predicate filter
|
||||
C containerCopy;
|
||||
@@ -75,7 +75,7 @@ namespace Trinity
|
||||
if (requestedSize)
|
||||
{
|
||||
std::copy_if(std::begin(container), std::end(container), std::inserter(containerCopy, std::end(containerCopy)), predicate);
|
||||
RandomResizeList(containerCopy, requestedSize);
|
||||
RandomResize(containerCopy, requestedSize);
|
||||
}
|
||||
|
||||
container = std::move(containerCopy);
|
||||
@@ -87,7 +87,7 @@ namespace Trinity
|
||||
* Note: container cannot be empty
|
||||
*/
|
||||
template<class C>
|
||||
inline auto SelectRandomContainerElement(C const& container) -> decltype(*std::begin(container)) const&
|
||||
inline auto SelectRandomContainerElement(C const& container) -> typename std::add_const<decltype(*std::begin(container))>::type&
|
||||
{
|
||||
auto it = std::begin(container);
|
||||
std::advance(it, urand(0, uint32(Size(container)) - 1));
|
||||
@@ -104,7 +104,7 @@ namespace Trinity
|
||||
* Note: container cannot be empty
|
||||
*/
|
||||
template<class C>
|
||||
auto SelectRandomWeightedContainerElement(C const& container, std::vector<double> weights) -> decltype(std::begin(container))
|
||||
inline auto SelectRandomWeightedContainerElement(C const& container, std::vector<double> weights) -> decltype(std::begin(container))
|
||||
{
|
||||
auto it = std::begin(container);
|
||||
std::advance(it, urandweighted(weights.size(), weights.data()));
|
||||
|
||||
@@ -228,7 +228,7 @@ class TC_GAME_API UnitAI
|
||||
targetList.reverse();
|
||||
|
||||
if (targetType == SELECT_TARGET_RANDOM)
|
||||
Trinity::Containers::RandomResizeList(targetList, maxTargets);
|
||||
Trinity::Containers::RandomResize(targetList, maxTargets);
|
||||
else
|
||||
targetList.resize(maxTargets);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
{
|
||||
// We need to use a copy of SummonList here, otherwise original SummonList would be modified
|
||||
StorageType listCopy = storage_;
|
||||
Trinity::Containers::RandomResizeList<StorageType, Predicate>(listCopy, std::forward<Predicate>(predicate), max);
|
||||
Trinity::Containers::RandomResize<StorageType, Predicate>(listCopy, std::forward<Predicate>(predicate), max);
|
||||
for (StorageType::iterator i = listCopy.begin(); i != listCopy.end(); )
|
||||
{
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i++);
|
||||
|
||||
@@ -182,7 +182,7 @@ void BlackMarketMgr::RefreshAuctions()
|
||||
templates.push_back(pair.second);
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(templates, sWorld->getIntConfig(CONFIG_BLACKMARKET_MAXAUCTIONS));
|
||||
Trinity::Containers::RandomResize(templates, sWorld->getIntConfig(CONFIG_BLACKMARKET_MAXAUCTIONS));
|
||||
|
||||
for (BlackMarketTemplate const* templat : templates)
|
||||
{
|
||||
|
||||
@@ -207,8 +207,8 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(uint32 gar
|
||||
}
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size()));
|
||||
Trinity::Containers::RandomResizeList(traitList, std::max<int32>(0, slots[1] - forcedTraits.size()));
|
||||
Trinity::Containers::RandomResize(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size()));
|
||||
Trinity::Containers::RandomResize(traitList, std::max<int32>(0, slots[1] - forcedTraits.size()));
|
||||
|
||||
// Add abilities specified in GarrFollowerXAbility.db2 before generic classspec ones on follower creation
|
||||
if (initial)
|
||||
@@ -240,7 +240,7 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(uint32 gar
|
||||
std::set_difference(classSpecAbilities.begin(), classSpecAbilities.end(), forcedAbilities.begin(), forcedAbilities.end(), std::back_inserter(classSpecAbilitiesTemp));
|
||||
std::set_union(classSpecAbilitiesTemp.begin(), classSpecAbilitiesTemp.end(), classSpecAbilitiesTemp2.begin(), classSpecAbilitiesTemp2.end(), std::back_inserter(abilityList));
|
||||
|
||||
Trinity::Containers::RandomResizeList(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size()));
|
||||
Trinity::Containers::RandomResize(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size()));
|
||||
}
|
||||
|
||||
if (slots[1] > forcedTraits.size() + traitList.size())
|
||||
|
||||
@@ -1147,7 +1147,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
{
|
||||
// Other special target selection goes here
|
||||
if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
|
||||
Trinity::Containers::RandomResizeList(targets, maxTargets);
|
||||
Trinity::Containers::RandomResize(targets, maxTargets);
|
||||
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
@@ -1226,7 +1226,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
{
|
||||
// Other special target selection goes here
|
||||
if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
|
||||
Trinity::Containers::RandomResizeList(targets, maxTargets);
|
||||
Trinity::Containers::RandomResize(targets, maxTargets);
|
||||
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -319,7 +319,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectNULL, //251 SPELL_EFFECT_SET_GARRISON_CACHE_SIZE
|
||||
&Spell::EffectTeleportUnits, //252 SPELL_EFFECT_TELEPORT_UNITS
|
||||
&Spell::EffectNULL, //253 SPELL_EFFECT_GIVE_HONOR
|
||||
&Spell::EffectNULL, //254 SPELL_EFFECT_254
|
||||
&Spell::EffectJumpDest, //254 SPELL_EFFECT_254
|
||||
&Spell::EffectNULL, //255 SPELL_EFFECT_LEARN_TRANSMOG_SET
|
||||
};
|
||||
|
||||
@@ -889,7 +889,18 @@ void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/)
|
||||
CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(destTarget), speedXY, speedZ);
|
||||
JumpArrivalCastArgs arrivalCast;
|
||||
arrivalCast.SpellId = effectInfo->TriggerSpell;
|
||||
m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, !m_targets.GetObjectTargetGUID().IsEmpty(), &arrivalCast);
|
||||
Optional<Movement::SpellEffectExtraData> extra;
|
||||
if (m_spellInfo->Id == 191428)
|
||||
{
|
||||
// 0.88 - time, A CONSTANT
|
||||
// 0.001 - parabolic max_height - THIS IS A CONSTANT!!!
|
||||
// 0.19642354884476423184854952469683 - speedZ - CONSTANT FOR MAX_HEIGHT
|
||||
// EFFECT_254 = SPELL_EFFECT_JUMP_CONSTANT_TIME?
|
||||
// time taken from curve?
|
||||
extra = boost::in_place();
|
||||
extra->ProgressCurveId = 1717;
|
||||
}
|
||||
m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, !m_targets.GetObjectTargetGUID().IsEmpty(), &arrivalCast, extra.get_ptr());
|
||||
}
|
||||
|
||||
void Spell::CalculateJumpSpeeds(SpellEffectInfo const* effInfo, float dist, float& speedXY, float& speedZ)
|
||||
|
||||
@@ -132,7 +132,7 @@ class spell_argaloth_consuming_darkness : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(targets, GetCaster()->GetMap()->Is25ManRaid() ? 8 : 3);
|
||||
Trinity::Containers::RandomResize(targets, GetCaster()->GetMap()->Is25ManRaid() ? 8 : 3);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
AddList.push_back(Adds[i]);
|
||||
|
||||
Trinity::Containers::RandomResizeList(AddList, 4);
|
||||
Trinity::Containers::RandomResize(AddList, 4);
|
||||
|
||||
uint8 i = 0;
|
||||
for (std::list<uint32>::const_iterator itr = AddList.begin(); itr != AddList.end() && i < 4; ++itr, ++i)
|
||||
|
||||
@@ -194,7 +194,7 @@ class boss_mandokir : public CreatureScript
|
||||
GetCreatureListWithEntryInGrid(creatures, me, NPC_CHAINED_SPIRIT, 200.0f);
|
||||
creatures.remove_if(Trinity::AnyDeadUnitCheck());
|
||||
creatures.remove_if(Trinity::UnitAuraCheck(true, SPELL_OHGAN_ORDERS_TRIGGER));
|
||||
Trinity::Containers::RandomResizeList(creatures, 1);
|
||||
Trinity::Containers::RandomResize(creatures, 1);
|
||||
if (creatures.empty())
|
||||
return;
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
GetCreatureListWithEntryInGrid(stalkers, me, NPC_BEETLE_STALKER, 100.0f);
|
||||
std::list<Creature*> beetlers = stalkers;
|
||||
|
||||
Trinity::Containers::RandomResizeList(beetlers, 9); // Holds the summoners of Jeweled Scarab
|
||||
Trinity::Containers::RandomResize(beetlers, 9); // Holds the summoners of Jeweled Scarab
|
||||
|
||||
for (std::list<Creature*>::iterator itr = beetlers.begin(); itr != beetlers.end(); ++itr)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
(*itr)->m_Events.AddEvent(new SummonScarab((*itr), instance), (*itr)->m_Events.CalculateTime(5000));
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(stalkers, 2); // Holds the summoners of Dustbone Horror
|
||||
Trinity::Containers::RandomResize(stalkers, 2); // Holds the summoners of Dustbone Horror
|
||||
|
||||
for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
|
||||
(*itr)->CastSpell((*itr), SPELL_SUMMON_DUSTBONE_HORROR);
|
||||
@@ -263,7 +263,7 @@ class spell_earthrager_ptah_flame_bolt : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(targets, GetCaster()->GetMap()->IsHeroic() ? 3 : 2);
|
||||
Trinity::Containers::RandomResize(targets, GetCaster()->GetMap()->IsHeroic() ? 3 : 2);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -154,7 +154,7 @@ class boss_moam : public CreatureScript
|
||||
targetList.push_back((*itr)->getTarget());
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(targetList, 5);
|
||||
Trinity::Containers::RandomResize(targetList, 5);
|
||||
|
||||
for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
|
||||
DoCast(*itr, SPELL_DRAIN_MANA);
|
||||
|
||||
@@ -1831,7 +1831,7 @@ class spell_halion_spawn_living_embers : public SpellScriptLoader
|
||||
void SelectMeteorFlames(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
if (!unitList.empty())
|
||||
Trinity::Containers::RandomResizeList(unitList, 10);
|
||||
Trinity::Containers::RandomResize(unitList, 10);
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /* effIndex */)
|
||||
|
||||
@@ -232,7 +232,7 @@ class spell_saviana_conflagration_init : public SpellScriptLoader
|
||||
targets.remove_if(ConflagrationTargetSelector());
|
||||
uint8 maxSize = uint8(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 6 : 3);
|
||||
if (targets.size() > maxSize)
|
||||
Trinity::Containers::RandomResizeList(targets, maxSize);
|
||||
Trinity::Containers::RandomResize(targets, maxSize);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
|
||||
+2
-2
@@ -554,9 +554,9 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
ObjectGuid bossGuid = i <= 3 ? FalricGUID : MarwynGUID;
|
||||
|
||||
if (!i)
|
||||
Trinity::Containers::RandomResizeList(tempList, 3);
|
||||
Trinity::Containers::RandomResize(tempList, 3);
|
||||
else if (i < 6 && i != 3)
|
||||
Trinity::Containers::RandomResizeList(tempList, 4);
|
||||
Trinity::Containers::RandomResize(tempList, 4);
|
||||
|
||||
for (uint32 entry : tempList)
|
||||
{
|
||||
|
||||
@@ -408,7 +408,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
SelectRandomTarget(false, &targets);
|
||||
Trinity::Containers::RandomResizeList(targets, Is25ManRaid() ? 3 : 2);
|
||||
Trinity::Containers::RandomResize(targets, Is25ManRaid() ? 3 : 2);
|
||||
if (targets.size() > 1)
|
||||
{
|
||||
Talk(SAY_PACT_OF_THE_DARKFALLEN);
|
||||
@@ -431,7 +431,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
SelectRandomTarget(false, &targets);
|
||||
Trinity::Containers::RandomResizeList(targets, uint32(Is25ManRaid() ? 4 : 2));
|
||||
Trinity::Containers::RandomResize(targets, uint32(Is25ManRaid() ? 4 : 2));
|
||||
for (std::list<Player*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
DoCast(*itr, SPELL_TWILIGHT_BLOODBOLT);
|
||||
DoCast(me, SPELL_TWILIGHT_BLOODBOLT_TARGET);
|
||||
@@ -683,7 +683,7 @@ class spell_blood_queen_bloodbolt : public SpellScriptLoader
|
||||
{
|
||||
uint32 targetCount = (targets.size() + 2) / 3;
|
||||
targets.remove_if(BloodboltHitCheck(static_cast<LanaThelAI*>(GetCaster()->GetAI())));
|
||||
Trinity::Containers::RandomResizeList(targets, targetCount);
|
||||
Trinity::Containers::RandomResize(targets, targetCount);
|
||||
// mark targets now, effect hook has missile travel time delay (might cast next in that time)
|
||||
for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
GetCaster()->GetAI()->SetGUID((*itr)->GetGUID(), GUID_BLOODBOLT);
|
||||
|
||||
@@ -221,7 +221,7 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
if (!ranged.empty())
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(ranged, RAID_MODE<uint32>(1, 3, 1, 3));
|
||||
Trinity::Containers::RandomResize(ranged, RAID_MODE<uint32>(1, 3, 1, 3));
|
||||
for (std::list<Unit*>::iterator itr = ranged.begin(); itr != ranged.end(); ++itr)
|
||||
DoCast(*itr, SPELL_VILE_GAS);
|
||||
}
|
||||
|
||||
@@ -1142,7 +1142,7 @@ class spell_putricide_unbound_plague : public SpellScriptLoader
|
||||
|
||||
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_UNBOUND_PLAGUE));
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -849,7 +849,7 @@ class spell_rotface_vile_gas_trigger : public SpellScriptLoader
|
||||
}
|
||||
|
||||
if (!ranged.empty())
|
||||
Trinity::Containers::RandomResizeList(ranged, GetCaster()->GetMap()->Is25ManRaid() ? 3 : 1);
|
||||
Trinity::Containers::RandomResize(ranged, GetCaster()->GetMap()->Is25ManRaid() ? 3 : 1);
|
||||
|
||||
targets.swap(ranged);
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,7 @@ class spell_sindragosa_unchained_magic : public SpellScriptLoader
|
||||
unitList.remove_if(UnchainedMagicTargetSelector());
|
||||
uint32 maxSize = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 6 : 2);
|
||||
if (unitList.size() > maxSize)
|
||||
Trinity::Containers::RandomResizeList(unitList, maxSize);
|
||||
Trinity::Containers::RandomResize(unitList, maxSize);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -1264,7 +1264,7 @@ class spell_dreamwalker_summon_suppresser : public SpellScriptLoader
|
||||
std::list<Creature*> summoners;
|
||||
GetCreatureListWithEntryInGrid(summoners, caster, NPC_WORLD_TRIGGER, 100.0f);
|
||||
summoners.remove_if(Trinity::UnitAuraCheck(true, SPELL_RECENTLY_SPAWNED));
|
||||
Trinity::Containers::RandomResizeList(summoners, 2);
|
||||
Trinity::Containers::RandomResize(summoners, 2);
|
||||
if (summoners.empty())
|
||||
return;
|
||||
|
||||
|
||||
@@ -2005,7 +2005,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
|
||||
void RemoveAliveTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(AliveCheck());
|
||||
Trinity::Containers::RandomResizeList(targets, 2);
|
||||
Trinity::Containers::RandomResize(targets, 2);
|
||||
}
|
||||
|
||||
void Land(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -1750,10 +1750,10 @@ class spell_malygos_arcane_storm : public SpellScriptLoader
|
||||
{
|
||||
// Resize list only to objects that are vehicles.
|
||||
IsCreatureVehicleCheck check(true);
|
||||
Trinity::Containers::RandomResizeList(targets, check, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
|
||||
Trinity::Containers::RandomResize(targets, check, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
|
||||
}
|
||||
else
|
||||
Trinity::Containers::RandomResizeList(targets, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
|
||||
Trinity::Containers::RandomResize(targets, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
|
||||
}
|
||||
|
||||
void HandleVisual(SpellEffIndex /*effIndex*/)
|
||||
@@ -2031,7 +2031,7 @@ class spell_scion_of_eternity_arcane_barrage : public SpellScriptLoader
|
||||
if (!targets.empty())
|
||||
{
|
||||
if (targets.size() > 1)
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
|
||||
if (WorldObject* filteredTarget = targets.front())
|
||||
if (malygos)
|
||||
@@ -2285,7 +2285,7 @@ class spell_malygos_surge_of_power_warning_selector_25 : public SpellScriptLoade
|
||||
std::list<WorldObject*> selectedTargets = targets;
|
||||
|
||||
uint8 guidDataSlot = DATA_FIRST_SURGE_TARGET_GUID; // SetGuid in Malygos AI is reserved for 14th, 15th and 16th Id for the three targets
|
||||
Trinity::Containers::RandomResizeList(selectedTargets, 3);
|
||||
Trinity::Containers::RandomResize(selectedTargets, 3);
|
||||
for (std::list<WorldObject*>::const_iterator itr = selectedTargets.begin(); itr != selectedTargets.end(); ++itr)
|
||||
{
|
||||
Creature* target = (*itr)->ToCreature();
|
||||
|
||||
@@ -710,7 +710,7 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(targets, 2);
|
||||
Trinity::Containers::RandomResize(targets, 2);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -3176,7 +3176,7 @@ class spell_item_taunt_flag_targeting : public SpellScriptLoader
|
||||
return;
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
|
||||
void ResizeTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(targets, 3);
|
||||
Trinity::Containers::RandomResize(targets, 3);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -494,7 +494,7 @@ class spell_sha_healing_stream_totem_heal : public SpellScriptLoader
|
||||
return !target->ToUnit() || target->ToUnit()->IsFullHealth();
|
||||
});
|
||||
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
|
||||
if (targets.empty())
|
||||
targets.push_back(GetOriginalCaster());
|
||||
@@ -869,7 +869,7 @@ public:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove(GetExplTargetUnit());
|
||||
Trinity::Containers::RandomResizeList(targets, [this](WorldObject* target)
|
||||
Trinity::Containers::RandomResize(targets, [this](WorldObject* target)
|
||||
{
|
||||
return target->GetTypeId() == TYPEID_UNIT && !target->ToUnit()->HasAura(SPELL_SHAMAN_FLAME_SHOCK_MAELSTROM, GetCaster()->GetGUID());
|
||||
}, 1);
|
||||
|
||||
Reference in New Issue
Block a user