From 9193c25cde458aa454512012dc57be3e943cb27e Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 25 Aug 2024 00:16:51 -0400 Subject: [PATCH] Core/Spells: Implemented SummonPropertiesFlags::UseDemonTimeout Port From (https://github.com/TrinityCore/TrinityCore/commit/c15c8609f0b950804ce798369bd7c3f54b5ab221) --- Source/Framework/Constants/CliDBConst.cs | 2 +- Source/Game/Entities/TemporarySummon.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/CliDBConst.cs b/Source/Framework/Constants/CliDBConst.cs index d4f2b18de..b1cb7a348 100644 --- a/Source/Framework/Constants/CliDBConst.cs +++ b/Source/Framework/Constants/CliDBConst.cs @@ -2088,7 +2088,7 @@ namespace Framework.Constants DespawnOnSummonerDeath = 0x08, // NYI OnlyVisibleToSummoner = 0x10, CannotDismissPet = 0x20, // NYI - UseDemonTimeout = 0x40, // NYI + UseDemonTimeout = 0x40, UnlimitedSummons = 0x80, // NYI UseCreatureLevel = 0x100, JoinSummonerSpawnGroup = 0x200, // NYI diff --git a/Source/Game/Entities/TemporarySummon.cs b/Source/Game/Entities/TemporarySummon.cs index 3e3d71dfc..02827bb3b 100644 --- a/Source/Game/Entities/TemporarySummon.cs +++ b/Source/Game/Entities/TemporarySummon.cs @@ -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()) {