fix(Scripts/BlackwingLair): Razorgore improvements (#10971)

- Rewrite reset events
- Use proper healing spell on phase transition
- Now uses abilities during phase 1
- Phase transition scripted - mobs now run away
This commit is contained in:
Skjalf
2022-03-23 15:42:34 -03:00
committed by GitHub
parent 6a6d0e5907
commit 7377c96cc8
12 changed files with 212 additions and 32 deletions

View File

@@ -3524,3 +3524,8 @@ void Creature::SetRespawnTime(uint32 respawn)
{
m_respawnTime = respawn ? GameTime::GetGameTime().count() + respawn : 0;
}
void Creature::SetCorpseRemoveTime(uint32 delay)
{
m_corpseRemoveTime = GameTime::GetGameTime().count() + delay;
}

View File

@@ -69,6 +69,7 @@ public:
void GetRespawnPosition(float& x, float& y, float& z, float* ori = nullptr, float* dist = nullptr) const;
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
void SetCorpseRemoveTime(uint32 delay);
[[nodiscard]] uint32 GetCorpseDelay() const { return m_corpseDelay; }
[[nodiscard]] bool IsRacialLeader() const { return GetCreatureTemplate()->RacialLeader; }
[[nodiscard]] bool IsCivilian() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; }
@@ -395,7 +396,7 @@ protected:
ObjectGuid::LowType m_lootRecipientGroup;
/// Timers
time_t m_corpseRemoveTime; // (msecs)timer for death or corpse disappearance
time_t m_corpseRemoveTime; // (secs) timer for death or corpse disappearance
time_t m_respawnTime; // (secs) time of next respawn
time_t m_respawnedTime; // (secs) time when creature respawned
uint32 m_respawnDelay; // (secs) delay between corpse disappearance and respawning