void HandleEffectCalcSpellMod(AuraEffect aurEff, ref SpellModifier spellMod) { if (spellMod == null) { spellMod = new SpellModifier(GetAura()); spellMod.op = (SpellModOp)aurEff.GetMiscValue(); spellMod.type = SpellModType.Pct; spellMod.spellId = GetId(); spellMod.mask = GetSpellInfo().GetEffect(aurEff.GetEffIndex()).SpellClassMask; } spellMod.value = aurEff.GetAmount(); }
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo) { DamageInfo damageInfo = eventInfo.GetDamageInfo(); if (damageInfo == null || !Convert.ToBoolean((int)damageInfo.GetSchoolMask() & aurEff.GetMiscValue())) { return(false); } if (!GetCaster()) { return(false); } return(true); }