Some misc cleansup.

This commit is contained in:
hondacrx
2023-10-06 17:33:20 -04:00
parent 85f37f6edf
commit ccb5341c21
13 changed files with 30 additions and 42 deletions
+1 -1
View File
@@ -1696,7 +1696,7 @@ namespace Game.Spells
// check spell triggering us
Spell spell = eventInfo.GetProcSpell();
if (spell)
if (spell != null)
{
// Do not allow auras to proc from effect triggered from itself
if (spell.IsTriggeredByAura(m_spellInfo))
+3 -3
View File
@@ -637,7 +637,7 @@ namespace Game.Spells
break;
case AuraType.ModCastingSpeedNotStack:
// skip melee hits and instant cast spells
if (!eventInfo.GetProcSpell() || eventInfo.GetProcSpell().GetCastTime() == 0)
if (eventInfo.GetProcSpell() == null || eventInfo.GetProcSpell().GetCastTime() == 0)
return false;
break;
case AuraType.ModSchoolMaskDamageFromCaster:
@@ -651,7 +651,7 @@ namespace Game.Spells
{
// Skip melee hits and spells with wrong school or zero cost
if (spellInfo == null || !Convert.ToBoolean((int)spellInfo.GetSchoolMask() & GetMiscValue()) // School Check
|| !eventInfo.GetProcSpell())
|| eventInfo.GetProcSpell() == null)
return false;
// Costs Check
@@ -1963,7 +1963,7 @@ namespace Game.Spells
for (var i = CurrentSpellTypes.Melee; i < CurrentSpellTypes.Max; ++i)
{
Spell spell = target.GetCurrentSpell(i);
if (spell)
if (spell != null)
if (spell.m_spellInfo.PreventionType.HasAnyFlag(SpellPreventionType.NoActions))
// Stop spells on prepare or casting state
target.InterruptSpell(i, false);