Dynamic Creature/Go spawning:

- True blizzlike creature spawn/respawn behavior - new creature = new object
 - Toggleable spawn groups (with C++/SAI/command options to use them)
 - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
 - Backward compatibility mode (set via group and for summons)
   to support creatures/gos that currently don't work well with this
   (this should be removed once the exceptions are fixed)

Fixes and closes #2858
Tags #8661 as fixable.
Fixes and closes #13787
Fixes #15222.

(cherry picked from commit 59db2eeea0a35028779fd76372ae06cc98c8086f)
This commit is contained in:
r00ty-tc
2020-08-22 12:59:57 +02:00
committed by Shauren
parent bf5be28396
commit 03b125e6d1
57 changed files with 2707 additions and 788 deletions
@@ -462,7 +462,7 @@ void BossAI::_Reset()
events.Reset();
summons.DespawnAll();
scheduler.CancelAll();
if (instance)
if (instance && instance->GetBossState(_bossId) != DONE)
instance->SetBossState(_bossId, NOT_STARTED);
}
@@ -548,12 +548,12 @@ bool BossAI::CanAIAttack(Unit const* target) const
return CheckBoundary(target);
}
void BossAI::_DespawnAtEvade(uint32 delayToRespawn /*= 30*/, Creature* who /*= nullptr*/)
void BossAI::_DespawnAtEvade(Seconds delayToRespawn, Creature* who)
{
if (delayToRespawn < 2)
if (delayToRespawn < Seconds(2))
{
TC_LOG_ERROR("scripts", "_DespawnAtEvade called with delay of %u seconds, defaulting to 2.", delayToRespawn);
delayToRespawn = 2;
TC_LOG_ERROR("scripts", "_DespawnAtEvade called with delay of " SI64FMTD " seconds, defaulting to 2.", delayToRespawn.count());
delayToRespawn = Seconds(2);
}
if (!who)