示例#1
0
        private void dropStackToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // https://opensvn.csie.org/traccgi/l2jc4/browser/trunk/L2_Gameserver/java/net/sf/l2j/gameserver/clientpackets/RequestDropItem.java
            //drop an item from inventory
            //probably safest to drop it on our own location
            //although perhaps we can drop things in the sky kekeke
            try
            {
                uint objID = Util.GetUInt32(listView_inventory.Items[listView_inventory.SelectedIndices[0]].SubItems[4].Text);
                uint count = Util.GetUInt32(listView_inventory.Items[listView_inventory.SelectedIndices[0]].SubItems[1].Text);
                int  x     = Util.Float_Int32(Globals.gamedata.my_char.X);
                int  y     = Util.Float_Int32(Globals.gamedata.my_char.Y);
                int  z     = Util.Float_Int32(Globals.gamedata.my_char.Z);

                ServerPackets.DropItem(objID, count, x, y, z);
            }
            catch
            {
            }
        }