Core/Spells: Implemented SummonPropertiesFlags::UseDemonTimeout
Port From (https://github.com/TrinityCore/TrinityCore/commit/c15c8609f0b950804ce798369bd7c3f54b5ab221)
This commit is contained in:
@@ -2088,7 +2088,7 @@ namespace Framework.Constants
|
|||||||
DespawnOnSummonerDeath = 0x08, // NYI
|
DespawnOnSummonerDeath = 0x08, // NYI
|
||||||
OnlyVisibleToSummoner = 0x10,
|
OnlyVisibleToSummoner = 0x10,
|
||||||
CannotDismissPet = 0x20, // NYI
|
CannotDismissPet = 0x20, // NYI
|
||||||
UseDemonTimeout = 0x40, // NYI
|
UseDemonTimeout = 0x40,
|
||||||
UnlimitedSummons = 0x80, // NYI
|
UnlimitedSummons = 0x80, // NYI
|
||||||
UseCreatureLevel = 0x100,
|
UseCreatureLevel = 0x100,
|
||||||
JoinSummonerSpawnGroup = 0x200, // NYI
|
JoinSummonerSpawnGroup = 0x200, // NYI
|
||||||
|
|||||||
@@ -175,7 +175,14 @@ namespace Game.Entities
|
|||||||
m_lifetime = duration;
|
m_lifetime = duration;
|
||||||
|
|
||||||
if (m_type == TempSummonType.ManualDespawn)
|
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())
|
if (summoner != null && summoner.IsPlayer())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user