public TrinitySpell(Unit caster, TrinitySpellInfo info, TriggerCastFlags triggerFlags, Guid originalCasterId, bool skipCheck = false) { SpellValue = new SpellValue(info); Caster = caster; SpellInfo = info; CastId = Guid.NewGuid(); OriginalCastId = CastId; SkipCheck = skipCheck; ExecutedCurrently = false; ApplyMultiplierMask = 0; DamageMultipliers = new float[3]; ReferencedFromCurrentSpell = false; SpellSchoolMask = SpellInfo.SchoolMask; if (originalCasterId != Guid.Empty) { OriginalCasterGuid = originalCasterId; } else { OriginalCasterGuid = caster.Character.Id; } if (OriginalCasterGuid == caster.Character.Id) { OriginalCaster = caster; } else { OriginalCaster = ArenaManager.ArenaUnits.Find(unit => unit.Character.Id == OriginalCasterGuid); } SpellState = SpellState.NONE; TriggerCastFlags = triggerFlags; UnitTarget = null; DestTarget = null; Damage = 0; Variance = 0.0f; EffectHandleMode = SpellEffectHandleMode.LAUNCH; EffectInfo = null; DiminishLevel = DiminishingLevels.LEVEL_1; DiminishGroup = DiminishingGroup.NONE; EffectDamage = 0; EffectHealing = 0; SpellAura = null; SpellVisual = SpellInfo.VisualId; CanReflect = SpellInfo.DamageClass == SpellDamageClass.MAGIC && !SpellInfo.HasAttribute(SpellAttributes.CANT_BE_REFLECTED) && !SpellInfo.IsPassive() && !SpellInfo.IsPositive(); UniqueTargets = new List <TargetInfo>(); SpellEffects = new List <TrinitySpellEffectInfo>(SpellInfo.SpellEffectInfos); }
public void HandleCooldowns(TrinitySpellInfo spellInfo, TrinitySpell spell) { if (spellInfo.IsPassive() || (spell != null && spell.IsIgnoringCooldowns())) { return; } StartCooldown(spellInfo, spell); }