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

HandleWareHouse() защищенный Метод

protected HandleWareHouse ( int itemid ) : void
itemid int
Результат void
        void HandleWareHouse(int itemid)
        {
            try
            {
                //First we check the itemid (To make sure its not altered!).
                //TOD: Add anti item hack check(Class for itemid check).

                //If the user allready used one of these items before.
                if (Character.Account.StorageSlots > 151)
                {
                    //Need to check error message if item allready used.
                    //TMP message
                    client.Send(Packet.ChatPacket(7, Character.Information.UniqueID, "Allready expanded.", ""));
                }
                //If not continue to expand the storage
                else
                {
                    //We dont use reader info since we use static info 30 slots increase.
                    byte warehouseslots = Character.Account.StorageSlots += 30;
                    //Update sql database information
                    MsSQL.UpdateData("UPDATE users SET warehouse_slots='" + warehouseslots + "' WHERE id='" + Player.AccountName + "'");
                    //Need to check official message
                    client.Send(Packet.ChatPacket(7, Character.Information.UniqueID, "Your storage has been upgraded.", ""));
                    //Reload characters
                    PlayerDataLoad();
                }
            }
            catch (Exception ex)
            {
                Systems.Debugger.Write(ex);
            }
        }
Systems