コード例 #1
0
 protected override void OnTarget(Mobile from, object targeted)
 {
     if (!(from is PlayerMobile))
     {
         return;
     }
     if (targeted is Item && backpack.AddCurrency(targeted as Item))
     {
         from.SendMessage("You added the currency.");
         MasterLooterLedgerGump.SendGump(from, backpack);
         from.Target = new MasterLooterAddCurrencyTarget(from, backpack);
     }
     else
     {
         from.SendMessage("Unable to add that.");
     }
 }
コード例 #2
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            Item item = (Item)targeted;

            if (targeted is DDCopper || targeted is DDSilver || targeted is Gold)
            {
                return;
            }

            if (!(from is PlayerMobile))
            {
                return;
            }
            if (item.IsChildOf(from.Backpack) && backpack.AddCurrency(item))
            {
                from.SendMessage("You added the currency.");
                MasterLooterLedgerGump.SendGump(from, backpack);
                from.Target = new MasterLooterAddCurrencyTarget(from, backpack);
            }
            else
            {
                from.SendMessage("Unable to add that.");
            }
        }