Core/Spells: Rename SpellAttr0 to use official attribute names
Port From (https://github.com/TrinityCore/TrinityCore/commit/a31e6819447626cd7b6967665001ea89bf6a0298)
This commit is contained in:
@@ -434,7 +434,7 @@ namespace Game.Spells
|
||||
// set infinity cooldown state for spells
|
||||
if (caster != null && caster.IsTypeId(TypeId.Player))
|
||||
{
|
||||
if (m_spellInfo.HasAttribute(SpellAttr0.DisabledWhileActive))
|
||||
if (m_spellInfo.IsCooldownStartedOnEvent())
|
||||
{
|
||||
Item castItem = !m_castItemGuid.IsEmpty() ? caster.ToPlayer().GetItemByGuid(m_castItemGuid) : null;
|
||||
caster.GetSpellHistory().StartCooldown(m_spellInfo, castItem != null ? castItem.GetEntry() : 0, null, true);
|
||||
@@ -1009,7 +1009,7 @@ namespace Game.Spells
|
||||
return GetCasterGUID() == target.GetGUID()
|
||||
&& m_spellInfo.Stances != 0
|
||||
&& !m_spellInfo.HasAttribute(SpellAttr2.NotNeedShapeshift)
|
||||
&& !m_spellInfo.HasAttribute(SpellAttr0.NotShapeshift);
|
||||
&& !m_spellInfo.HasAttribute(SpellAttr0.NotShapeshifted);
|
||||
}
|
||||
|
||||
public bool CanBeSaved()
|
||||
|
||||
@@ -792,7 +792,7 @@ namespace Game.Spells
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pair.Key, Difficulty.None);
|
||||
if (spellInfo == null || !(spellInfo.IsPassive() || spellInfo.HasAttribute(SpellAttr0.HiddenClientside)))
|
||||
if (spellInfo == null || !(spellInfo.IsPassive() || spellInfo.HasAttribute(SpellAttr0.DoNotDisplaySpellbookAuraIconCombatLog)))
|
||||
continue;
|
||||
|
||||
if (Convert.ToBoolean(spellInfo.Stances & (1ul << (GetMiscValue() - 1))))
|
||||
@@ -3190,7 +3190,7 @@ namespace Game.Spells
|
||||
|
||||
// recalculate current HP/MP after applying aura modifications (only for spells with SPELL_ATTR0_ABILITY 0x00000010 flag)
|
||||
// this check is total bullshit i think
|
||||
if ((Convert.ToBoolean(GetMiscValueB() & 1 << (int)Stats.Stamina) || GetMiscValueB() == 0) && m_spellInfo.HasAttribute(SpellAttr0.Ability))
|
||||
if ((Convert.ToBoolean(GetMiscValueB() & 1 << (int)Stats.Stamina) || GetMiscValueB() == 0) && m_spellInfo.HasAttribute(SpellAttr0.IsAbility))
|
||||
target.SetHealth(Math.Max(MathFunctions.CalculatePct(target.GetMaxHealth(), healthPct), (zeroHealth ? 0 : 1ul)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user