fix(Scripts/Steamvault): Rework Kalithresh (#15883)
This commit is contained in:
parent
324ee93ebb
commit
a695d00932
6 changed files with 166 additions and 91 deletions
|
|
@ -208,7 +208,10 @@ void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
|
|||
minion->Respawn();
|
||||
else
|
||||
{
|
||||
minion->AI()->DoZoneInCombat(nullptr, 100.0f);
|
||||
if (minion->GetReactState() == REACT_AGGRESSIVE)
|
||||
{
|
||||
minion->AI()->DoZoneInCombat(nullptr, 100.0f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -362,6 +365,20 @@ void InstanceScript::StorePersistentData(uint32 index, uint32 data)
|
|||
persistentData[index] = data;
|
||||
}
|
||||
|
||||
void InstanceScript::DoForAllMinions(uint32 id, std::function<void(Creature*)> exec)
|
||||
{
|
||||
BossInfo* bossInfo = &bosses[id];
|
||||
MinionSet listCopy = bossInfo->minion;
|
||||
|
||||
for (auto const& minion : listCopy)
|
||||
{
|
||||
if (minion)
|
||||
{
|
||||
exec(minion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceScript::Load(const char* data)
|
||||
{
|
||||
if (!data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue