1 #ifndef EVENT_FACTORY_H
2 #define EVENT_FACTORY_H
4 #include "../../include/event.h"
5 #include "../../include/nlohmann/json.hpp"
6 #include "../../include/types.h"
7 #include "../game/position.h"
11 static Event initialize_map(
const nlohmann::json& map_data,
12 const nlohmann::json& player_data);
14 static Event update_map(
const nlohmann::json& position_data);
16 static Event notify_new_map();
18 static Event change_map(ClientId client_id,
19 const nlohmann::json& player_data);
21 static Event update_entities(
const nlohmann::json& entity_data);
23 static Event update_items(
const nlohmann::json& items_data);
25 static Event chat_message(
const std::string& message);
27 static Event disconnect();
29 static Event drop_client(ClientId client_id);
31 static Event dealt_damage(
int damage, EntityId to_id);
33 static Event received_damage(
int damage);
35 static Event damage_evaded(EntityId to_id);
37 static Event evaded_damage();
39 static Event inventory_update(
const nlohmann::json& inventory_data);
41 static Event pickup_event(ClientId client_id);
43 static Event drop_event(ClientId client_id, SlotId slot, uint32_t amount);
45 static Event unequip_all_event(ClientId client_id);
47 static Event resuscitate_event(ClientId client_id);
51 static Event name_not_found();
53 static Event name_already_online();
55 static Event name_taken();
57 static Event sell_event(ClientId client_id,
position_t target, SlotId slot,
60 static Event buy_event(ClientId client_id,
position_t target, SlotId slot,
65 static Event special_ability(
const nlohmann::json& cast_info);
68 SlotId slot, uint32_t amount);
71 SlotId slot, uint32_t amount);
73 static Event deposit_gold_event(ClientId client_id,
position_t target, uint32_t amount);
75 static Event withdraw_gold_event(ClientId client_id,
position_t target, uint32_t amount);
77 static Event meditate_event(ClientId client_id);
79 static Event resuscitate();
82 #endif // EVENT_FACTORY_H