invertika_game.Game.GameHandler.handleDrop C# (CSharp) Method

handleDrop() private method

private handleDrop ( GameClient client, ISL.Server.Network.MessageIn message ) : void
client GameClient
message ISL.Server.Network.MessageIn
return void
        void handleDrop(GameClient client, MessageIn message)
        {
            //const int slot = message.readInt16();
            //const int amount = message.readInt16();
            //Inventory inv(client.character);

            //if (ItemClass *ic = itemManager.getItem(inv.getItem(slot)))
            //{
            //    int nb = inv.removeFromSlot(slot, amount);
            //    Item *item = new Item(ic, amount - nb);
            //    item.setMap(client.character.getMap());
            //    item.setPosition(client.character.getPosition());
            //    if (!GameState::insert(item))
            //    {
            //        // The map is full. Put back into inventory.
            //        inv.insert(ic.getDatabaseID(), amount - nb);
            //        delete item;
            //        return;
            //    }

            //    Point pt = client.character.getPosition();

            //    // We store the item in database only when the floor items are meant
            //    // to be persistent between two server restarts.
            //    if (!Configuration::getValue("game_floorItemDecayTime", 0))
            //    {
            //        // Create the floor item on map
            //        accountHandler.createFloorItems(client.character.getMap().getID(),
            //                                        ic.getDatabaseID(),
            //                                        amount, pt.x, pt.y);
            //    }

            //    // log transaction
            //    std::stringstream str;
            //    str << "User dropped item " << ic.getDatabaseID()
            //        << " at " << pt.x << "x" << pt.y;
            //    accountHandler.sendTransaction(client.character.getDatabaseID(),
            //                                    TRANS_ITEM_DROP, str.str());
            //}
        }