Argentum Online - Servidor
map_log_factory.h
1 #ifndef MAP_LOG_FACTORY_H
2 #define MAP_LOG_FACTORY_H
3 
4 #include "../../include/nlohmann/json.hpp"
5 #include "position.h"
6 
7 typedef enum log_type {
8  LOG_INVENTORY,
9  LOG_INVENTORY_FULL,
10  LOG_DEAL_DAMAGE,
11  LOG_RECV_DAMAGE,
12  LOG_SPECIAL_ABILITY,
13  LOG_MESSAGE,
14  LOG_RESUSCITATE
15 } log_type_t;
16 
17 typedef struct map_log {
18  log_type_t type;
19  std::string player_name;
20  nlohmann::json info;
21 } map_log_t;
22 
32  public:
33  static map_log_t inventory_change(const std::string& player_name,
34  nlohmann::json inventory);
35 
36  static map_log_t inventory_full(const std::string& player_name);
37 
38  static map_log_t deal_damage(const std::string& player_name,
39  nlohmann::json damage_info);
40 
41  static map_log_t receive_damage(const std::string& player_name,
42  nlohmann::json damage_info);
43  static map_log_t message(const std::string& player_name,
44  nlohmann::json message_info);
45 
46  static map_log_t special_ability(const std::string& player_name,
47  uint32_t ability_id, position_t source,
48  position_t dest);
49 
50  static map_log_t resuscitate(const std::string& player_name,
51  nlohmann::json message_info);
52 };
53 
54 #endif // MAP_LOG_FACTORY_H
inventory
Definition: item_container.h:32
map_log
Definition: map_log_factory.h:17
MapLogFactory
Constructor de logs del mapa.
Definition: map_log_factory.h:31
position
Definition: position.h:8