Argentum Online - Servidor
mob_factory.h
1 #ifndef MOB_FACTORY_H
2 #define MOB_FACTORY_H
3 
4 #include <string>
5 #include <unordered_map>
6 
7 #include "../../../include/types.h"
8 #include "monster.h"
9 #include "npc.h"
10 
11 class MobFactory {
12  private:
13  std::unordered_map<std::string, MobId> monsters_names;
14  std::unordered_map<MobId, nlohmann::json> monsters_info;
15  std::unordered_map<npc_proffesion_t, MobId> npcs_by_profession;
16  std::unordered_map<MobId, nlohmann::json> npcs_info;
17 
18  public:
19  MobFactory(const char* mobs_path_file);
20  ~MobFactory();
21 
22  Monster* create_monster(EntityId entity_id, const std::string& monster_name,
23  Map& map);
24  Monster* create_monster(EntityId entity_id, MobId monster_id, Map& map);
25  Npc* create_npc(EntityId entity_id, npc_proffesion_t npc_profession,
26  Map& map);
27  Npc* create_npc(EntityId entity_id, MobId npc_id, Map& map);
28 };
29 
30 #endif // MOB_FACTORY_H
Monster
Definition: monster.h:10
Npc
Definition: npc.h:10
Map
Definition: map.h:47
MobFactory
Definition: mob_factory.h:11