mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Spells: Implemented SummonPropertiesFlags::UseDemonTimeout
Closes #29930
(cherry picked from commit c15c8609f0)
This commit is contained in:
@@ -2099,7 +2099,7 @@ enum class SummonPropertiesFlags : uint32
|
||||
DespawnOnSummonerDeath = 0x00000008, // NYI
|
||||
OnlyVisibleToSummoner = 0x00000010,
|
||||
CannotDismissPet = 0x00000020, // NYI
|
||||
UseDemonTimeout = 0x00000040, // NYI
|
||||
UseDemonTimeout = 0x00000040,
|
||||
UnlimitedSummons = 0x00000080, // NYI
|
||||
UseCreatureLevel = 0x00000100,
|
||||
JoinSummonerSpawnGroup = 0x00000200, // NYI
|
||||
|
||||
@@ -193,7 +193,14 @@ void TempSummon::InitStats(WorldObject* summoner, Milliseconds duration)
|
||||
m_lifetime = duration;
|
||||
|
||||
if (m_type == TEMPSUMMON_MANUAL_DESPAWN)
|
||||
m_type = (duration <= 0ms) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
{
|
||||
if (duration <= 0s)
|
||||
m_type = TEMPSUMMON_DEAD_DESPAWN;
|
||||
else if (m_Properties && m_Properties->GetFlags().HasFlag(SummonPropertiesFlags::UseDemonTimeout))
|
||||
m_type = TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT;
|
||||
else
|
||||
m_type = TEMPSUMMON_TIMED_DESPAWN;
|
||||
}
|
||||
|
||||
if (summoner && summoner->IsPlayer())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user