Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
CharacterReader.hpp File Reference
#include <string>
#include <vector>
Include dependency graph for CharacterReader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SpawnCoordinateBounds
 Contains the spawn coordinate bounds for a character. More...
 
struct  PlayerData
 Contains all the player data. This is used to load player assets into memory and spawn players on the map. More...
 
struct  NPCData
 Contains all the NPCData data. This is used to load NPCData assets into memory and spawn NPCs on the map. More...
 
struct  GameCharacters
 Contains all the character data. This is used to load character assets into memory and spawn characters on the map. More...
 

Functions

GameCharacters readCharacterData ()
 Reads the character data from JSON file. More...
 
void validSpawnCoordinateBounds (SpawnCoordinateBounds spawnCoordinateBounds, int worldWidth, int worldHeight)
 Check if SpawnCoordinateBounds is valid. Throws error if not. More...
 

Variables

struct {
   const std::string   Passive = "PASSIVE"
 
   const std::string   Aggressive = "AGGRESSIVE"
 
   const std::string   Peaceful = "PEACEFUL"
 
AggressionType
 Has all the possible NPCData aggression types as strings. More...
 

Function Documentation

◆ readCharacterData()

GameCharacters readCharacterData ( )

Reads the character data from JSON file.

Returns
GameCharacters
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validSpawnCoordinateBounds()

void validSpawnCoordinateBounds ( SpawnCoordinateBounds  spawnCoordinateBounds,
int  worldWidth,
int  worldHeight 
)

Check if SpawnCoordinateBounds is valid. Throws error if not.

Parameters
spawnCoordinateBoundsSpawnCoordinateBounds
worldWidthin tiles
worldHeightin tiles
Here is the caller graph for this function:

Variable Documentation

◆ 

const { ... } AggressionType

Has all the possible NPCData aggression types as strings.

◆ Aggressive

const std::string Aggressive = "AGGRESSIVE"

◆ Passive

const std::string Passive = "PASSIVE"

◆ Peaceful

const std::string Peaceful = "PEACEFUL"