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:
@@ -424,7 +424,8 @@ class boss_gothik : public CreatureScript
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
|
||||
summons.DoAction(0, 0);
|
||||
DummyEntryCheckPredicate pred;
|
||||
summons.DoAction(0, pred); //! Magic numbers fail
|
||||
summons.DoZoneInCombat();
|
||||
mergedSides = true;
|
||||
}
|
||||
@@ -447,7 +448,8 @@ class boss_gothik : public CreatureScript
|
||||
DoScriptText(SAY_TELEPORT, me);
|
||||
DoTeleportTo(PosGroundLiveSide);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
summons.DoAction(0, 0);
|
||||
DummyEntryCheckPredicate pred;
|
||||
summons.DoAction(0, pred); //! Magic numbers fail
|
||||
summons.DoZoneInCombat();
|
||||
events.ScheduleEvent(EVENT_BOLT, 1000);
|
||||
events.ScheduleEvent(EVENT_HARVEST, urand(3000, 15000));
|
||||
|
||||
Reference in New Issue
Block a user