/// <summary> /// Deal Heal, check abilities buff (heal bonus , etc ) /// </summary> public virtual void DealHeal(Unit Target, Ability Ab, uint Heal) { AbtInterface.OnDealHeals(Target, Ab, ref Heal); Target.AbtInterface.OnReceiveHeal(this, Ab, ref Heal); if (Ab != null) { Ab.SendSpellDamage(Target, Heal, true); Ab.SendSpellEffect(this, Target, (ushort)Heal, (ushort)Heal, Ab.Info); } DealHeal(Target, (uint)Heal); }
/// <summary> /// Deal Damages but check abilities buff reductions (absorb, invinsibility, etc) /// </summary> public virtual void DealDamages(Unit Target, Ability Ab, uint Damages) { AbtInterface.OnDealDamages(Target, Ab, ref Damages); Target.AbtInterface.OnReceiveDamages(this, Ab, ref Damages); if (Ab != null) // Ability Damage { Ab.SendSpellDamage(Target, Damages, false); Ab.SendSpellEffect(this, Target, (ushort)Damages, (ushort)Damages, Ab.Info); } else // Weapon { SendCastEffect(Target, 0, GameData.CombatEvent.COMBATEVENT_HIT, Damages); } DealDamages(Target, (uint)Damages); }