Core/Spells: Defined and implemented some new spell attributes
Port From (https://github.com/TrinityCore/TrinityCore/commit/1912999b9e4b1f1b7503e404d359dfeac38c3d29)
This commit is contained in:
@@ -172,7 +172,7 @@ namespace Game.Entities
|
||||
return 1.0f;
|
||||
|
||||
// Some spells don't benefit from pct done mods
|
||||
if (spellProto.HasAttribute(SpellAttr6.NoDonePctDamageMods))
|
||||
if (spellProto.HasAttribute(SpellAttr6.IgnoreCasterDamageModifiers))
|
||||
return 1.0f;
|
||||
|
||||
// For totems pct done mods are calculated when its calculation is run on the player in SpellDamageBonusDone.
|
||||
@@ -3761,9 +3761,10 @@ namespace Game.Entities
|
||||
RemoveAppliedAuras(aurApp =>
|
||||
{
|
||||
Aura aura = aurApp.GetBase();
|
||||
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
|
||||
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
|
||||
aura.GetSpellInfo().HasAttribute(SpellAttr5.RemoveEnteringArena); // special marker, always remove
|
||||
});
|
||||
}
|
||||
public void RemoveAllAurasExceptType(AuraType type)
|
||||
|
||||
@@ -490,7 +490,6 @@ namespace Game.Entities
|
||||
|
||||
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map.RemoveAllObjectsInRemoveList
|
||||
CombatStop();
|
||||
GetThreatManager().ClearAllThreat();
|
||||
}
|
||||
public override void CleanupsBeforeDelete(bool finalCleanup = true)
|
||||
{
|
||||
@@ -2970,7 +2969,7 @@ namespace Game.Entities
|
||||
|
||||
if (damagetype != DamageEffectType.NoDamage)
|
||||
{
|
||||
if (victim != this && (spellProto == null || !spellProto.HasAttribute(SpellAttr7.NoPushbackOnDamage)))
|
||||
if (victim != this && (spellProto == null || !(spellProto.HasAttribute(SpellAttr7.NoPushbackOnDamage) || spellProto.HasAttribute(SpellAttr3.TreatAsPeriodic))))
|
||||
{
|
||||
if (damagetype != DamageEffectType.DOT)
|
||||
{
|
||||
@@ -3829,7 +3828,7 @@ namespace Game.Entities
|
||||
{
|
||||
// Some spells don't benefit from pct done mods
|
||||
// mods for SPELL_SCHOOL_MASK_NORMAL are already factored in base melee damage calculation
|
||||
if (!spellProto.HasAttribute(SpellAttr6.NoDonePctDamageMods) && !spellProto.GetSchoolMask().HasAnyFlag(SpellSchoolMask.Normal))
|
||||
if (!spellProto.HasAttribute(SpellAttr6.IgnoreCasterDamageModifiers) && !spellProto.GetSchoolMask().HasAnyFlag(SpellSchoolMask.Normal))
|
||||
{
|
||||
float maxModDamagePercentSchool = 0.0f;
|
||||
Player thisPlayer = ToPlayer();
|
||||
|
||||
Reference in New Issue
Block a user