DarkEmu_GameServer.Systems.GetItem C# (CSharp) Метод

GetItem() статический приватный Метод

static private GetItem ( uint id, byte slot, int type ) : slotItem
id uint
slot byte
type int
Результат DarkEmu_GameServer.Global.slotItem
        static Global.slotItem GetItem(uint id, byte slot, int type)
        {
            #region Slot item info

            try
            {
                if (id != 0)
                {
                    Global.slotItem slotItem = new Global.slotItem();
                    int row = type;

                    MsSQL ms;
                    if (row == 1)
                    {
                        ms = new MsSQL("SELECT * FROM char_items WHERE itemnumber='item" + slot + "' AND storageacc='" + id + "' AND storagetype='" + row + "' AND slot='" + slot + "'");
                    }
                    else if (row == 3)
                    {
                        ms = new MsSQL("SELECT * FROM char_items WHERE itemnumber='item" + slot + "' AND storagetype='" + row + "' AND slot='" + slot + "'");
                    }
                    else
                    {
                        ms = new MsSQL("SELECT * FROM char_items WHERE itemnumber='item" + slot + "' AND owner='" + id + "' AND storagetype='" + row + "' AND slot='" + slot + "'");
                    }

                    using (System.Data.SqlClient.SqlDataReader reader = ms.Read())
                    {
                        while (reader.Read())
                        {
                            slotItem.dbID = reader.GetInt32(0);
                            slotItem.ID = reader.GetInt32(2);
                            slotItem.PlusValue = reader.GetByte(4);
                            slotItem.Amount = reader.GetInt16(6);
                            slotItem.Durability = reader.GetInt32(7);
                            slotItem.Slot = slot;
                            LoadBluesid(slotItem.dbID);
                        }
                    }
                    ms.Close();
                    return slotItem;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Data item load error {0}", ex);
                Systems.Debugger.Write(ex);
            }
            return null;
            #endregion
        }
Systems