mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 19:53:02 -04:00
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.
This commit is contained in:
@@ -478,7 +478,7 @@ void BossAI::_Reset()
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
scheduler.CancelAll();
|
||||
if (instance)
|
||||
if (instance && instance->GetBossState(_bossId) != DONE)
|
||||
instance->SetBossState(_bossId, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -564,12 +564,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 %ld seconds, defaulting to 2.", delayToRespawn.count());
|
||||
delayToRespawn = Seconds(2);
|
||||
}
|
||||
|
||||
if (!who)
|
||||
|
||||
Reference in New Issue
Block a user