Core/Spells: Named and implemented most of SpellAttr7
Port From (https://github.com/TrinityCore/TrinityCore/commit/4e87bd7942d932225436940f62e26d48719a42dd)
This commit is contained in:
@@ -3597,7 +3597,7 @@ namespace Game.Spells
|
||||
if (effectHandleMode == SpellEffectHandleMode.HitTarget)
|
||||
{
|
||||
// not all charge effects used in negative spells
|
||||
if (!m_spellInfo.IsPositive() && m_caster.IsTypeId(TypeId.Player))
|
||||
if (m_spellInfo.HasAttribute(SpellAttr7.AttackOnChargeToUnit))
|
||||
unitCaster.Attack(unitTarget, true);
|
||||
|
||||
if (effectInfo.TriggerSpell != 0)
|
||||
@@ -4389,7 +4389,7 @@ namespace Game.Spells
|
||||
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
|
||||
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) . 50% chance to dispell
|
||||
// Polymorph instead of 1 / (5 + 1) . 16%.
|
||||
bool dispelCharges = aura.GetSpellInfo().HasAttribute(SpellAttr7.DispelCharges);
|
||||
bool dispelCharges = aura.GetSpellInfo().HasAttribute(SpellAttr7.DispelRemovesCharges);
|
||||
byte charges = dispelCharges ? aura.GetCharges() : aura.GetStackAmount();
|
||||
if (charges > 0)
|
||||
stealList.Add(new DispelableAura(aura, chance, charges));
|
||||
@@ -4864,7 +4864,7 @@ namespace Game.Spells
|
||||
if (!player.HasSpell(spell_id) || player.GetSpellHistory().HasCooldown(spell_id))
|
||||
continue;
|
||||
|
||||
if (!spellInfo.HasAttribute(SpellAttr9.SummonPlayerTotem))
|
||||
if (!spellInfo.HasAttribute(SpellAttr7.CanBeMultiCast))
|
||||
continue;
|
||||
|
||||
CastSpellExtraArgs args = new(TriggerCastFlags.IgnoreGCD | TriggerCastFlags.IgnoreCastInProgress | TriggerCastFlags.CastDirectly | TriggerCastFlags.DontReportCastError);
|
||||
|
||||
Reference in New Issue
Block a user