Example #1
0
        public void OnHit(Mobile hit, Mobile hitter)
        {
            if (hit == null)
            {
                return;
            }

            // now check for any conditions as well
            // check for any condition that must be met for this entry to be processed
            if (!BaseXmlSpawner.CheckCondition(Condition, hitter, hit))
            {
                return;
            }

            BaseXmlSpawner.ExecuteActions(hitter, hit, Action);
        }
Example #2
0
        public override void OnKilled(Mobile killed, Mobile killer)
        {
            base.OnKilled(killed, killer);

            if (killed == null)
            {
                return;
            }

            // now check for any conditions as well
            // check for any condition that must be met for this entry to be processed
            if (!BaseXmlSpawner.CheckCondition(Condition, killer, killed) || killed == null)
            {
                return;
            }

            BaseXmlSpawner.ExecuteActions(killer, killed, Action);
        }
Example #3
0
        public override void OnKilled(Mobile killed, Mobile killer)
        {
            base.OnKilled(killed, killer);

            if (killed == null || killed.Corpse == null)
            {
                return;
            }

            // now check for any conditions as well
            // check for any condition that must be met for this entry to be processed
            if (!BaseXmlSpawner.CheckCondition(Condition, killer, killed))
            {
                return;
            }

            // proxy corpses: appear to be for things (like "Peasant" that have a human bodyvalue)
            // do the actions on both of them
            BaseXmlSpawner.ExecuteActions(killer, killed.Corpse, Action);
            if (killed.Corpse is Corpse && ((Corpse)killed.Corpse).ProxyCorpse != null)
            {
                BaseXmlSpawner.ExecuteActions(killer, ((Corpse)killed.Corpse).ProxyCorpse, Action);
            }
        }
Example #4
0
 public void ExecuteActions(Mobile mob, object target, string actions)
 {
     BaseXmlSpawner.ExecuteActions(mob, target, actions);
 }