예제 #1
0
 public override void OnClick()
 {
     if (backpack == null || !backpack.IsOwner(player))
     {
         return;
     }
     MasterLooterLedgerGump.SendGump(player, backpack);
 }
 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.");
     }
 }
예제 #3
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.");
            }
        }