Argentum Online - Servidor
event_factory.h
1 #ifndef EVENT_FACTORY_H
2 #define EVENT_FACTORY_H
3 
4 #include "../../include/event.h"
5 #include "../../include/nlohmann/json.hpp"
6 #include "../../include/types.h"
7 #include "../game/position.h"
8 
9 class EventFactory {
10  public:
11  static Event initialize_map(const nlohmann::json& map_data,
12  const nlohmann::json& player_data);
13 
14  static Event update_map(const nlohmann::json& position_data);
15 
16  static Event notify_new_map();
17 
18  static Event change_map(ClientId client_id,
19  const nlohmann::json& player_data);
20 
21  static Event update_entities(const nlohmann::json& entity_data);
22 
23  static Event update_items(const nlohmann::json& items_data);
24 
25  static Event chat_message(const std::string& message);
26 
27  static Event disconnect();
28 
29  static Event drop_client(ClientId client_id);
30 
31  static Event dealt_damage(int damage, EntityId to_id);
32 
33  static Event received_damage(int damage);
34 
35  static Event damage_evaded(EntityId to_id);
36 
37  static Event evaded_damage();
38 
39  static Event inventory_update(const nlohmann::json& inventory_data);
40 
41  static Event pickup_event(ClientId client_id);
42 
43  static Event drop_event(ClientId client_id, SlotId slot, uint32_t amount);
44 
45  static Event unequip_all_event(ClientId client_id);
46 
47  static Event resuscitate_event(ClientId client_id);
48 
49  static Event heal_event(ClientId client_id, position_t target);
50 
51  static Event name_not_found();
52 
53  static Event name_already_online();
54 
55  static Event name_taken();
56 
57  static Event sell_event(ClientId client_id, position_t target, SlotId slot,
58  uint32_t amount);
59 
60  static Event buy_event(ClientId client_id, position_t target, SlotId slot,
61  uint32_t amount);
62 
63  static Event list_event(ClientId client_id, position_t target);
64 
65  static Event special_ability(const nlohmann::json& cast_info);
66 
67  static Event deposit_item_event(ClientId client_id, position_t target,
68  SlotId slot, uint32_t amount);
69 
70  static Event withdraw_item_event(ClientId client_id, position_t target,
71  SlotId slot, uint32_t amount);
72 
73  static Event deposit_gold_event(ClientId client_id, position_t target, uint32_t amount);
74 
75  static Event withdraw_gold_event(ClientId client_id, position_t target, uint32_t amount);
76 
77  static Event meditate_event(ClientId client_id);
78 
79  static Event resuscitate();
80 };
81 
82 #endif // EVENT_FACTORY_H
Event
Definition: event.h:55
EventFactory
Definition: event_factory.h:9
position
Definition: position.h:8