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); }
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); }
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); } }
// return true to allow use private bool CheckTargetCondition(Mobile from, object target) { return(BaseXmlSpawner.CheckCondition(TargetCondition, from, target)); }