summaryrefslogtreecommitdiffstats
path: root/src/Window.hpp
blob: a6bccd95166e7769ebe9ffd5f917d41818925934 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <string>
#include <queue>

#include "Packet.hpp"

struct Window {
    unsigned char WindowId = 0;
    std::string type;
    
    SlotData handSlot;
    const short HandSlotId = -1;
    std::vector<SlotData> slots;

    short actions = 1;

    void MakeClick(short ClickedSlot, bool Lmb, bool dropMode = false);

    std::queue<PacketClickWindow> pendingTransactions;
    std::vector<std::pair<short,std::pair<short,short>>> transactions;

    void ConfirmTransaction(PacketConfirmTransactionCB packet);
};