mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 12:12:34 -04:00
Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
This commit is contained in:
@@ -30,18 +30,6 @@ void SummonList::DoZoneInCombat(uint32 entry)
|
||||
}
|
||||
}
|
||||
|
||||
void SummonList::DoAction(uint32 entry, int32 info)
|
||||
{
|
||||
for (iterator i = begin(); i != end();)
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, *i);
|
||||
++i;
|
||||
if (summon && summon->IsAIEnabled
|
||||
&& (!entry || summon->GetEntry() == entry))
|
||||
summon->AI()->DoAction(info);
|
||||
}
|
||||
}
|
||||
|
||||
void SummonList::DespawnEntry(uint32 entry)
|
||||
{
|
||||
for (iterator i = begin(); i != end();)
|
||||
|
||||
Reference in New Issue
Block a user