Core/Spells: Defined new spell attributes
Port From (https://github.com/TrinityCore/TrinityCore/commit/b2ddf547ff7acd3dab7c93579d8a44fe825c7ecf)
This commit is contained in:
@@ -3744,7 +3744,7 @@ namespace Game.Entities
|
||||
RemoveAppliedAuras(aurApp =>
|
||||
{
|
||||
Aura aura = aurApp.GetBase();
|
||||
return !aura.GetSpellInfo().HasAttribute(SpellAttr4.Unk21) // don't remove stances, shadowform, pally/hunter auras
|
||||
return !aura.GetSpellInfo().HasAttribute(SpellAttr4.DontRemoveInArena) // don't remove stances, shadowform, pally/hunter auras
|
||||
&& !aura.IsPassive() // don't remove passive auras
|
||||
&& (aurApp.IsPositive() || !aura.GetSpellInfo().HasAttribute(SpellAttr3.DeathPersistent)); // not negative death persistent auras
|
||||
});
|
||||
|
||||
@@ -881,7 +881,7 @@ namespace Game.Spells
|
||||
return true;
|
||||
}
|
||||
|
||||
bool refresh = stackAmount >= GetStackAmount();
|
||||
bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo.StackAmount != 0 || !m_spellInfo.HasAttribute(SpellAttr1.DontRefreshDurationOnRecast));
|
||||
|
||||
// Update stack amount
|
||||
SetStackAmount((byte)stackAmount);
|
||||
|
||||
@@ -2539,6 +2539,9 @@ namespace Game.Spells
|
||||
|
||||
Log.outDebug(LogFilter.Spells, "Spell.prepare: spell id {0} source {1} caster {2} customCastFlags {3} mask {4}", m_spellInfo.Id, m_caster.GetEntry(), m_originalCaster != null ? (int)m_originalCaster.GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
|
||||
|
||||
if (m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart))
|
||||
SendSpellCooldown();
|
||||
|
||||
//Containers for channeled spells have to be set
|
||||
// @todoApply this to all casted spells if needed
|
||||
// Why check duration? 29350: channelled triggers channelled
|
||||
@@ -2823,7 +2826,8 @@ namespace Game.Spells
|
||||
}
|
||||
|
||||
// CAST SPELL
|
||||
SendSpellCooldown();
|
||||
if (!m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart))
|
||||
SendSpellCooldown();
|
||||
|
||||
PrepareScriptHitHandlers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user