Otclient  14/8/2020
CreatureType Class Reference

#include <creatures.h>

Inheritance diagram for CreatureType:
Collaboration diagram for CreatureType:

Public Member Functions

 CreatureType ()=default
 
 CreatureType (const std::string &name)
 
void setSpawnTime (int32 spawnTime)
 
int32 getSpawnTime ()
 
void setName (const std::string &name)
 
std::string getName ()
 
void setOutfit (const Outfit &o)
 
Outfit getOutfit ()
 
void setDirection (Otc::Direction dir)
 
Otc::Direction getDirection ()
 
void setRace (CreatureRace race)
 
CreatureRace getRace ()
 
CreaturePtr cast ()
 
- Public Member Functions inherited from LuaObject
 LuaObject ()
 
virtual ~LuaObject ()
 
template<typename T >
void connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false)
 
template<typename... T>
int luaCallLuaField (const std::string &field, const T &... args)
 
template<typename R , typename... T>
callLuaField (const std::string &field, const T &... args)
 
template<typename... T>
void callLuaField (const std::string &field, const T &... args)
 
bool hasLuaField (const std::string &field)
 Returns true if the lua field exists. More...
 
template<typename T >
void setLuaField (const std::string &key, const T &value)
 Sets a field in this lua object. More...
 
template<typename T >
getLuaField (const std::string &key)
 Gets a field from this lua object. More...
 
void releaseLuaFieldsTable ()
 Release fields table reference. More...
 
void luaSetField (const std::string &key)
 Sets a field from this lua object, the value must be on the stack. More...
 
void luaGetField (const std::string &key)
 Gets a field from this lua object, the result is pushed onto the stack. More...
 
void luaGetMetatable ()
 Get object's metatable. More...
 
void luaGetFieldsTable ()
 Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More...
 
int getUseCount ()
 
std::string getClassName ()
 Returns the derived class name, its the same name used in Lua. More...
 
LuaObjectPtr asLuaObject ()
 
void operator= (const LuaObject &)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Detailed Description

Definition at line 79 of file creatures.h.

Constructor & Destructor Documentation

◆ CreatureType() [1/2]

CreatureType::CreatureType ( )
default

◆ CreatureType() [2/2]

CreatureType::CreatureType ( const std::string &  name)
inline

Definition at line 83 of file creatures.h.

Here is the call graph for this function:

Member Function Documentation

◆ cast()

CreaturePtr CreatureType::cast ( )

Definition at line 155 of file creatures.cpp.

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

◆ getDirection()

Otc::Direction CreatureType::getDirection ( )
inline

Definition at line 95 of file creatures.h.

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

◆ getName()

std::string CreatureType::getName ( )
inline

Definition at line 89 of file creatures.h.

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

◆ getOutfit()

Outfit CreatureType::getOutfit ( )
inline

Definition at line 92 of file creatures.h.

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

◆ getRace()

CreatureRace CreatureType::getRace ( )
inline

Definition at line 98 of file creatures.h.

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

◆ getSpawnTime()

int32 CreatureType::getSpawnTime ( )
inline

Definition at line 86 of file creatures.h.

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

◆ setDirection()

void CreatureType::setDirection ( Otc::Direction  dir)
inline

Definition at line 94 of file creatures.h.

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

◆ setName()

void CreatureType::setName ( const std::string &  name)
inline

Definition at line 88 of file creatures.h.

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

◆ setOutfit()

void CreatureType::setOutfit ( const Outfit o)
inline

Definition at line 91 of file creatures.h.

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

◆ setRace()

void CreatureType::setRace ( CreatureRace  race)
inline

Definition at line 97 of file creatures.h.

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

◆ setSpawnTime()

void CreatureType::setSpawnTime ( int32  spawnTime)
inline

Definition at line 85 of file creatures.h.

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: