Core/Spells: Implemented SummonPropertiesFlags::UseDemonTimeout

Port From (https://github.com/TrinityCore/TrinityCore/commit/c15c8609f0b950804ce798369bd7c3f54b5ab221)
This commit is contained in:
Hondacrx
2024-08-25 00:16:51 -04:00
parent 9cd5c14cd8
commit 9193c25cde
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -175,7 +175,14 @@ namespace Game.Entities
m_lifetime = duration;
if (m_type == TempSummonType.ManualDespawn)
m_type = (duration <= TimeSpan.Zero) ? TempSummonType.DeadDespawn : TempSummonType.TimedDespawn;
{
if (duration <= TimeSpan.Zero)
m_type = TempSummonType.DeadDespawn;
else if (m_Properties != null && m_Properties.HasFlag(SummonPropertiesFlags.UseDemonTimeout))
m_type = TempSummonType.TimedDespawnOutOfCombat;
else
m_type = TempSummonType.TimedDespawn;
}
if (summoner != null && summoner.IsPlayer())
{