public override void OnKilledBy(Mobile m) { base.OnKilledBy(m); if (Utility.RandomDouble() < 0.1) { ExodusChest.GiveRituelItem(m); } }
public override void OnDeath(Mobile m) { base.OnDeath(m); if (m is BaseCreature bc && IsDropKeyMobile(bc) && !bc.Controlled && Utility.RandomDouble() < 0.1) { Mobile killer = m.LastKiller; if (killer != null) { if (killer is BaseCreature bct && bct.GetMaster() is PlayerMobile pm && bct.InRange(pm, 18)) { killer = bct.GetMaster(); } if (killer is PlayerMobile) { ExodusChest.GiveRituelItem(killer); } } } }