Otclient  14/8/2020
CreatureManager Class Reference

#include <creatures.h>

Public Member Functions

 CreatureManager ()
 
void clear ()
 
void clearSpawns ()
 
void terminate ()
 
void loadMonsters (const std::string &file)
 
void loadSingleCreature (const std::string &file)
 
void loadNpcs (const std::string &folder)
 
void loadCreatureBuffer (const std::string &buffer)
 
void loadSpawns (const std::string &fileName)
 
void saveSpawns (const std::string &fileName)
 
const CreatureTypePtrgetCreatureByName (std::string name)
 
const CreatureTypePtrgetCreatureByLook (int look)
 
std::vector< SpawnPtrgetSpawns ()
 
SpawnPtr getSpawn (const Position &centerPos)
 
SpawnPtr getSpawnForPlacePos (const Position &pos)
 
SpawnPtr addSpawn (const Position &centerPos, int radius)
 
void deleteSpawn (const SpawnPtr &spawn)
 
bool isLoaded ()
 
bool isSpawnLoaded ()
 
const std::vector< CreatureTypePtr > & getCreatures ()
 

Protected Member Functions

void internalLoadCreatureBuffer (TiXmlElement *attrib, const CreatureTypePtr &m)
 

Detailed Description

Definition at line 106 of file creatures.h.

Constructor & Destructor Documentation

◆ CreatureManager()

CreatureManager::CreatureManager ( )

Definition at line 170 of file creatures.cpp.

Member Function Documentation

◆ addSpawn()

SpawnPtr CreatureManager::addSpawn ( const Position centerPos,
int  radius 
)

Definition at line 392 of file creatures.cpp.

Here is the caller graph for this function:

◆ clear()

void CreatureManager::clear ( )
inline

Definition at line 110 of file creatures.h.

Here is the caller graph for this function:

◆ clearSpawns()

void CreatureManager::clearSpawns ( )

Definition at line 175 of file creatures.cpp.

Here is the caller graph for this function:

◆ deleteSpawn()

void CreatureManager::deleteSpawn ( const SpawnPtr spawn)

Definition at line 410 of file creatures.cpp.

Here is the caller graph for this function:

◆ getCreatureByLook()

const CreatureTypePtr & CreatureManager::getCreatureByLook ( int  look)

Definition at line 356 of file creatures.cpp.

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

◆ getCreatureByName()

const CreatureTypePtr & CreatureManager::getCreatureByName ( std::string  name)

Definition at line 343 of file creatures.cpp.

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

◆ getCreatures()

const std::vector<CreatureTypePtr>& CreatureManager::getCreatures ( )
inline

Definition at line 133 of file creatures.h.

Here is the caller graph for this function:

◆ getSpawn()

SpawnPtr CreatureManager::getSpawn ( const Position centerPos)

Definition at line 370 of file creatures.cpp.

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

◆ getSpawnForPlacePos()

SpawnPtr CreatureManager::getSpawnForPlacePos ( const Position pos)

Definition at line 379 of file creatures.cpp.

Here is the caller graph for this function:

◆ getSpawns()

std::vector< SpawnPtr > CreatureManager::getSpawns ( )

Definition at line 418 of file creatures.cpp.

Here is the caller graph for this function:

◆ internalLoadCreatureBuffer()

void CreatureManager::internalLoadCreatureBuffer ( TiXmlElement attrib,
const CreatureTypePtr m 
)
protected

Definition at line 314 of file creatures.cpp.

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

◆ isLoaded()

bool CreatureManager::isLoaded ( )
inline

Definition at line 130 of file creatures.h.

Here is the caller graph for this function:

◆ isSpawnLoaded()

bool CreatureManager::isSpawnLoaded ( )
inline

Definition at line 131 of file creatures.h.

Here is the caller graph for this function:

◆ loadCreatureBuffer()

void CreatureManager::loadCreatureBuffer ( const std::string &  buffer)

Definition at line 286 of file creatures.cpp.

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

◆ loadMonsters()

void CreatureManager::loadMonsters ( const std::string &  file)

Definition at line 182 of file creatures.cpp.

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

◆ loadNpcs()

void CreatureManager::loadNpcs ( const std::string &  folder)

Definition at line 210 of file creatures.cpp.

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

◆ loadSingleCreature()

void CreatureManager::loadSingleCreature ( const std::string &  file)

Definition at line 205 of file creatures.cpp.

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

◆ loadSpawns()

void CreatureManager::loadSpawns ( const std::string &  fileName)

Definition at line 224 of file creatures.cpp.

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

◆ saveSpawns()

void CreatureManager::saveSpawns ( const std::string &  fileName)

Definition at line 261 of file creatures.cpp.

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

◆ terminate()

void CreatureManager::terminate ( )

Definition at line 43 of file creatures.cpp.

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

The documentation for this class was generated from the following files: