1 #ifndef COMMAND_HANDLER_H
2 #define COMMAND_HANDLER_H
7 #include "../../include/blocking_th_event_handler.h"
8 #include "../../include/event.h"
9 #include "../../include/types.h"
10 #include "../game/position.h"
16 std::function<bool(
const std::vector<std::string>&)> condition;
26 static const std::vector<command_case_t> commands;
29 std::vector<std::string> cmd;
31 void parse_line(
const std::string& cmd);
34 void handle(
Event& ev)
override;
40 void cmd_whisper(ClientId client_id,
position_t target, SlotId slot);
42 void cmd_message(ClientId client_id,
position_t target, SlotId slot);
44 void cmd_help(ClientId client_id,
position_t target, SlotId slot);
46 void cmd_disconnect(ClientId client_id,
position_t target, SlotId slot);
48 void cmd_pickup(ClientId client_id,
position_t target, SlotId slot);
50 void cmd_drop(ClientId client_id,
position_t target, SlotId slot);
52 void cmd_resuscitate(ClientId client_id,
position_t target, SlotId slot);
54 void cmd_heal(ClientId client_id,
position_t target, SlotId slot);
56 void cmd_unequip_all(ClientId client_id,
position_t target, SlotId slot);
58 void cmd_list(ClientId client_id,
position_t target, SlotId slot);
60 void cmd_buy(ClientId client_id,
position_t target, SlotId slot);
62 void cmd_sell(ClientId client_id,
position_t target, SlotId slot);
64 void cmd_deposit_item(ClientId client_id,
position_t target, SlotId slot);
66 void cmd_withdraw_item(ClientId client_id,
position_t target, SlotId slot);
68 void cmd_deposit_gold(ClientId client_id,
position_t target, SlotId slot);
70 void cmd_withdraw_gold(ClientId client_id,
position_t target, SlotId slot);
72 void cmd_meditate(ClientId client_id,
position_t target, SlotId slot);
75 #endif // COMMAND_HANDLER_H