Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
ObjectReader.cpp File Reference
#include "rapidjson/document.h"
#include "rapidjson/filereadstream.h"
#include <filesystem>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include "../../Config.hpp"
#include "AnimationReader.hpp"
#include "ItemReader.hpp"
#include "ObjectReader.hpp"
#include "RehtiUtils.hpp"
#include "Utils.hpp"
Include dependency graph for ObjectReader.cpp:

Functions

std::string generateObjectInstanceId (ObjectLocation objectLocation)
 Generates a unique id for an object instance. More...
 
const std::vector< ObjectLocationreadObjectLocations ()
 Reads all the objects on the map. Server can use this to spawn objects on the map. More...
 
std::vector< YieldableItemfetchYieldableItemList (GameItems &gameItems, const rapidjson::Value &object)
 
GameObjects fetchObjects (GameItems &gameItems, std::map< int, GameSkill > &gameSkills)
 Reads objects defined in the objects.json file and returns them as a GameObjects struct. More...
 

Function Documentation

◆ fetchObjects()

GameObjects fetchObjects ( GameItems gameItems,
std::map< int, GameSkill > &  gameSkills 
)

Reads objects defined in the objects.json file and returns them as a GameObjects struct.

Parameters
gameItemsGameItems
gameSkillsGameSkills
Returns
GameObjects
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetchYieldableItemList()

std::vector<YieldableItem> fetchYieldableItemList ( GameItems gameItems,
const rapidjson::Value &  object 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateObjectInstanceId()

std::string generateObjectInstanceId ( ObjectLocation  objectLocation)

Generates a unique id for an object instance.

Parameters
objectLocationObjectLocation
Returns
unique id string
Here is the caller graph for this function:

◆ readObjectLocations()

const std::vector<ObjectLocation> readObjectLocations ( )

Reads all the objects on the map. Server can use this to spawn objects on the map.

Returns
List of ObjectLocation structs
Here is the call graph for this function:
Here is the caller graph for this function: