Exemplo n.º 1
0
        private void CharacterMenu_OnCharacterLogin(object sender, CharacterMenu.CharacterLoginEventArgs e)
        {
            var items = InventoryManager.DoesInventoryHaveItem(e.Character, typeof(BagItem));

            if (items.Length == 1)
            {
                BagItem item = (BagItem)items[0];
                NAPI.Player.SetPlayerClothes(e.Character.Player, 5, item.BagType, item.BagDesign);
            }
        }
Exemplo n.º 2
0
 private void InventoryManager_OnStorageGetItem(IStorage sender, InventoryManager.OnGetItemEventArgs args)
 {
     if (sender.GetType() == typeof(Character))
     {
         if (args.Item.GetType() == typeof(BagItem))
         {
             Character chr  = (Character)sender;
             BagItem   item = (BagItem)args.Item;
             NAPI.Player.SetPlayerClothes(chr.Player, 5, item.BagType, item.BagDesign);
         }
     }
 }