RemoveDelayedDamageContext() public method

public RemoveDelayedDamageContext ( Mobile m ) : void
m Mobile
return void
Beispiel #1
0
            protected override void OnTick()
            {
                if (m_From is BaseCreature && m_Target != null)
                {
                    ((BaseCreature)m_From).AlterSpellDamageTo(m_Target, ref m_Damage);
                }

                if (m_Target is BaseCreature && m_From != null)
                {
                    ((BaseCreature)m_Target).AlterSpellDamageFrom(m_From, ref m_Damage);
                }

                WeightOverloading.DFA = m_DFA;
                AOS.Damage(m_Target, m_From, m_Damage, m_Phys, m_Fire, m_Cold, m_Pois, m_Nrgy);
                WeightOverloading.DFA = DFAlgorithm.Standard;

                if (m_Target is BaseCreature && m_From != null)
                {
                    ((BaseCreature)m_Target).OnDamagedBySpell(m_From);
                }

                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }
Beispiel #2
0
            protected override void OnTick()
            {
                WeightOverloading.DFA = m_DFA;

                m_Target.Damage(m_Damage, m_From);
                int damageGiven = m_Damage;

                if (m_From != null)   // sanity check
                {
                    DoLeech(damageGiven, m_From, m_Target);
                }

                WeightOverloading.DFA = DFAlgorithm.Standard;

                if (m_Target is BaseCreature && m_From != null)
                {
                    BaseCreature c = (BaseCreature)m_Target;

                    c.OnHarmfulSpell(m_From);
                    c.OnDamagedBySpell(m_From);
                }

                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }
Beispiel #3
0
        private static void DoDamage(
            Mobile attacker,
            Mobile defender,
            Spell spell,
            int damage,
            ElementalType damageType,
            DFAlgorithm dfa
            )
        {
            defender.FireHook(h => h.OnSpellDamage(attacker, defender, damageType, ref damage));

            WeightOverloading.DFA = dfa;

            defender.Damage(damage, attacker);

            if (attacker != null) // sanity check
            {
                DoLeech(damage, attacker, defender);
            }

            WeightOverloading.DFA = DFAlgorithm.Standard;

            if (defender is BaseCreature c && attacker != null)
            {
                c.OnHarmfulSpell(attacker);
                c.OnDamagedBySpell(attacker);
            }

            spell?.RemoveDelayedDamageContext(defender);
        }
Beispiel #4
0
            protected override void OnTick()
            {
                if (m_From is BaseCreature && m_Target != null)
                {
                    ((BaseCreature)m_From).AlterSpellDamageTo(m_Target, ref m_Damage);
                }

                if (m_Target is BaseCreature && m_From != null)
                {
                    ((BaseCreature)m_Target).AlterSpellDamageFrom(m_From, ref m_Damage);
                }

                WeightOverloading.DFA = m_DFA;

                m_From.Damage(m_Damage, m_Target);

                WeightOverloading.DFA = DFAlgorithm.Standard;

                if (m_Target is BaseCreature && m_From != null)
                {
                    BaseCreature c = (BaseCreature)m_Target;

                    c.OnHarmfulSpell(m_From);
                    c.OnDamagedBySpell(m_From);
                }

                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }
Beispiel #5
0
            protected override void OnTick()
            {
                if (m_From is BaseMobile bc && m_Target != null)
                {
                    bc.AlterSpellDamageTo(m_Target, ref m_Damage);
                }

                if (m_Target is BaseMobile tbc && m_From != null)
                {
                    tbc.AlterSpellDamageFrom(m_From, ref m_Damage);
                }

                WeightOverloading.DFA = m_DFA;

                int damageGiven = AOS.Damage(m_Target, m_From, m_Damage, m_Phys, m_Fire, m_Cold, m_Pois, m_Nrgy);

                if (m_From != null)                 // sanity check
                {
                    DoLeech(damageGiven, m_From, m_Target);
                }

                WeightOverloading.DFA = DFAlgorithm.Standard;

                if (m_Target is BaseMobile bm && m_From != null)
                {
                    bm.OnHarmfulSpell(m_From, m_Spell);
                    bm.OnDamagedBySpell(m_From, m_Spell, damageGiven);
                }

                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }
Beispiel #6
0
 protected override void OnTick()
 {
     m_Target.Damage(m_Damage);
     if (m_Spell != null)
     {
         m_Spell.RemoveDelayedDamageContext(m_Target);
     }
 }
Beispiel #7
0
            protected override void OnTick()
            {
                if (m_From is BaseCreature)
                {
                    ((BaseCreature)m_From).AlterSpellDamageTo(m_Target, ref m_Damage);
                }

                if (m_Target is BaseCreature)
                {
                    ((BaseCreature)m_Target).AlterSpellDamageFrom(m_From, ref m_Damage);
                }

                m_Target.Damage(m_Damage);
                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }
Beispiel #8
0
            protected override void OnTick()
            {
                if (m_From is BaseMobile bc)
                {
                    bc.AlterSpellDamageTo(m_Target, ref m_Damage);
                }

                if (m_Target is BaseMobile tbc)
                {
                    tbc.AlterSpellDamageFrom(m_From, ref m_Damage);
                }

                m_Target.Damage(m_Damage);
                if (m_Spell != null)
                {
                    m_Spell.RemoveDelayedDamageContext(m_Target);
                }
            }