예제 #1
0
파일: MsgStorage.cs 프로젝트: Pircs/Yi
 private static void AddToStorage(Player player, ref MsgStorage packet)
 {
     if (!player.Inventory.TryGetItem(packet.Param, out var found))
     {
         return;
     }
     if (StorageSystem.PutIn(player, packet.UniqueId, found))
     {
         player.Send(packet);
         StorageSystem.ShowStock(player);
     }
 }
예제 #2
0
        private static void AddToStorage(Player player, ref MsgStorage packet)
        {
            var found = player.Inventory.FindByUID(packet.Param);

            if (found.UniqueId == packet.Param)
            {
                if (StorageSystem.PutIn(player, packet.UniqueId, found))
                {
                    player.Send(packet);
                    StorageSystem.ShowStock(player);
                }
            }
        }