Core/Spells: Defined new spell attributes

Port From (https://github.com/TrinityCore/TrinityCore/commit/b2ddf547ff7acd3dab7c93579d8a44fe825c7ecf)
This commit is contained in:
hondacrx
2021-01-19 13:46:59 -05:00
parent 94705b782c
commit fc475c4338
4 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -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
});
+1 -1
View File
@@ -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);
+5 -1
View File
@@ -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();