Esempio n. 1
0
 private void requestItemUsage(int pos)
 {
     PlayerEquip.UpdatePlayerEquip(this);
     using (Packet packet = new Packet((int)ClientPackets.itemUse))
     {
         packet.Write(Client.instance.getCID());
         packet.Write(Client.instance.getSessionId());
         packet.Write(pos);
         packet.Write((int)window);
         Client.SendTCPData(packet);
     }
 }
Esempio n. 2
0
    private void requestItemMove(WINDOW target_window, int newPos)
    {
        PlayerEquip.UpdatePlayerEquip(this);
        if (PlayerEquip.hasWeaponEquipped && target_window != WINDOW.EQUIPABLES && window == WINDOW.EQUIPABLES && data.type == ITEM_TYPES.WEAPON)
        {
            PlayerEquip.DequipWeapon();
        }

        using (Packet packet = new Packet((int)ClientPackets.itemChangePosition))
        {
            packet.Write(Client.instance.getCID());
            packet.Write(Client.instance.getSessionId());
            packet.Write(iid);
            packet.Write(newPos);
            packet.Write((int)target_window);
            Client.SendTCPData(packet);
        }
    }