예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
파일: Unit.cs 프로젝트: dzikun/WarEmu
        /// <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);
        }
예제 #4
0
파일: Unit.cs 프로젝트: dzikun/WarEmu
        /// <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);
        }