Core/Auras: Implemented SPELL_ATTR7_DISABLE_AURA_WHILE_DEAD (suppress aura applications while dead without removing the aura)
Port From (https://github.com/TrinityCore/TrinityCore/commit/0f7dd4eadf90a5407fd232d083485430d725152f)
This commit is contained in:
@@ -1894,7 +1894,7 @@ namespace Framework.Constants
|
|||||||
{
|
{
|
||||||
Unk0 = 0x01, // 0 Shaman'S New Spells (Call Of The ...), Feign Death.
|
Unk0 = 0x01, // 0 Shaman'S New Spells (Call Of The ...), Feign Death.
|
||||||
IgnoreDurationMods = 0x02, // 1 Duration is not affected by duration modifiers
|
IgnoreDurationMods = 0x02, // 1 Duration is not affected by duration modifiers
|
||||||
ReactivateAtResurrect = 0x04, // 2 Paladin'S Auras And 65607 Only.
|
DisableAuraWhileDead = 0x04, // 2 Disable Aura While Dead
|
||||||
IsCheatSpell = 0x08, // 3 Cannot Cast If Caster Doesn'T Have Unitflag2 & UnitFlag2AllowCheatSpells
|
IsCheatSpell = 0x08, // 3 Cannot Cast If Caster Doesn'T Have Unitflag2 & UnitFlag2AllowCheatSpells
|
||||||
Unk4 = 0x10, // 4 Only 47883 (Soulstone Resurrection) And Test Spell.
|
Unk4 = 0x10, // 4 Only 47883 (Soulstone Resurrection) And Test Spell.
|
||||||
SummonTotem = 0x20, // 5 Only Shaman Player Totems.
|
SummonTotem = 0x20, // 5 Only Shaman Player Totems.
|
||||||
|
|||||||
@@ -2716,6 +2716,9 @@ namespace Game.Spells
|
|||||||
|
|
||||||
public override void FillTargetMap(ref Dictionary<Unit, uint> targets, Unit caster)
|
public override void FillTargetMap(ref Dictionary<Unit, uint> targets, Unit caster)
|
||||||
{
|
{
|
||||||
|
if (GetSpellInfo().HasAttribute(SpellAttr7.DisableAuraWhileDead) && !GetUnitOwner().IsAlive())
|
||||||
|
return;
|
||||||
|
|
||||||
Unit refe = caster;
|
Unit refe = caster;
|
||||||
if (refe == null)
|
if (refe == null)
|
||||||
refe = GetUnitOwner();
|
refe = GetUnitOwner();
|
||||||
|
|||||||
Reference in New Issue
Block a user