Argentum Online - Cliente
event_factory.h
1 #ifndef __EVENT_FACTORY_H
2 #define __EVENT_FACTORY_H
3 #include <string>
4 #include <vector>
5 
6 #include "../../include/event.h"
7 #include "../../include/types.h"
8 
9 #ifndef MOVEMENT_ACTION_T
10 #define MOVEMENT_ACTION_T
11 enum mov_action_t { START, STOP };
12 #endif
13 
14 #ifndef DIRECTION_T
15 #define DIRECTION_T
16 enum direction_t { UP, DOWN, LEFT, RIGHT };
17 #endif
18 
19 class EventFactory {
20  public:
21  EventFactory();
22  ~EventFactory();
23 
31  static Event connect_event(std::string character_name,
32  std::string password);
33 
43  static Event chat_event(std::string message, int target_x, int target_y,
44  int inventory_slot);
45 
46  /* Evento de movimiento. Recibe si se esta comenzando o finalizando el
47  movimiento y en que direccion.*/
48 
56  static Event movement_event(mov_action_t action, direction_t direction);
57 
63  static Event disconnect();
64 
70  static Event attack_event();
71 
78  static Event inventory_event(SlotId slot);
79 
88  static Event create_event(std::string name, class_type_t class_type,
89  race_type_t race_type);
90 
96  static Event pickup_event();
97 
104  static Event drop_item_event(SlotId slot);
105 
112  static Event unequip_event(SlotId slot);
113 
114 
115  static Event use_ability_event(int target_x, int target_y);
116 
117 };
118 
119 #endif
EventFactory::create_event
static Event create_event(std::string name, class_type_t class_type, race_type_t race_type)
Evento de creacion de personaje.
Definition: event_factory.cpp:58
EventFactory::drop_item_event
static Event drop_item_event(SlotId slot)
Evento de tirar un item al suelo.
Definition: event_factory.cpp:72
EventFactory::movement_event
static Event movement_event(mov_action_t action, direction_t direction)
Evento de movimiento.
Definition: event_factory.cpp:37
EventFactory::unequip_event
static Event unequip_event(SlotId slot)
Evento de desequipar.
Definition: event_factory.cpp:77
Event
Definition: event.h:55
EventFactory::disconnect
static Event disconnect()
Evento de desconexion.
Definition: event_factory.cpp:43
EventFactory::attack_event
static Event attack_event()
Evento de ataque.
Definition: event_factory.cpp:48
EventFactory::chat_event
static Event chat_event(std::string message, int target_x, int target_y, int inventory_slot)
Evento de chat.
Definition: event_factory.cpp:24
EventFactory
Definition: event_factory.h:19
EventFactory::connect_event
static Event connect_event(std::string character_name, std::string password)
Evento de conexion.
Definition: event_factory.cpp:16
EventFactory::pickup_event
static Event pickup_event()
Evento de levantar items del suelo.
Definition: event_factory.cpp:67
EventFactory::inventory_event
static Event inventory_event(SlotId slot)
Evento de uso del inventario.
Definition: event_factory.cpp:53