public static void UpdatePlayerEquip(Item item) { if (hasWeaponEquipped && item.window == Item.WINDOW.EQUIPABLES && item.data.type == ITEM_TYPES.WEAPON) { PlayerEquip.DequipWeapon(); } }
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); } }