Пример #1
0
        public override void OnKilledBy(Mobile m)
        {
            base.OnKilledBy(m);

            if (Utility.RandomDouble() < 0.1)
            {
                ExodusChest.GiveRituelItem(m);
            }
        }
Пример #2
0
        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);
                    }
                }
            }
        }