Exemple #1
0
        public bool DropItem(short id, int amount, byte x = 255, byte y = 255) //255 means use character's current location
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Drop);

            pkt.AddShort(id);
            pkt.AddInt(amount);
            if (x == 255 && y == 255)
            {
                pkt.AddByte(x);
                pkt.AddByte(y);
            }
            else
            {
                pkt.AddChar(x);
                pkt.AddChar(y);
            }

            return(m_client.SendPacket(pkt));
        }