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

handlePickup() private method

private handlePickup ( GameClient client, ISL.Server.Network.MessageIn message ) : void
client GameClient
message ISL.Server.Network.MessageIn
return void
        void handlePickup(GameClient client, MessageIn message)
        {
            //const int x = message.readInt16();
            //const int y = message.readInt16();
            //const Point ppos = client.character.getPosition();

            //// TODO: use a less arbitrary value.
            //if (std::abs(x - ppos.x) + std::abs(y - ppos.y) < 48)
            //{
            //    MapComposite *map = client.character.getMap();
            //    Point ipos(x, y);
            //    for (FixedActorIterator i(map.getAroundPointIterator(ipos, 0)); i; ++i)
            //    {
            //        Actor *o = *i;
            //        Point opos = o.getPosition();
            //        if (o.getType() == OBJECT_ITEM && opos.x == x && opos.y == y)
            //        {
            //            Item *item = static_cast< Item * >(o);
            //            ItemClass *ic = item.getItemClass();
            //            int amount = item.getAmount();
            //            if (!Inventory(client.character).insert(ic.getDatabaseID(),
            //                                                   amount))
            //            {
            //                GameState::remove(item);

            //                // We only do this when items are to be kept in memory
            //                // between two server restart.
            //                if (!Configuration::getValue("game_floorItemDecayTime", 0))
            //                {
            //                    // Remove the floor item from map
            //                    accountHandler.removeFloorItems(map.getID(),
            //                                                    ic.getDatabaseID(),
            //                                                    amount, x, y);
            //                }

            //                // log transaction
            //                std::stringstream str;
            //                str << "User picked up item " << ic.getDatabaseID()
            //                    << " at " << opos.x << "x" << opos.y;
            //                accountHandler.sendTransaction(
            //                                          client.character.getDatabaseID(),
            //                                          TRANS_ITEM_PICKUP, str.str()
            //                                               );
            //            }
            //            break;
            //        }
            //    }
            //}
        }