Otclient  14/8/2020
Spawn Class Reference

#include <creatures.h>

Inheritance diagram for Spawn:
Collaboration diagram for Spawn:

Public Member Functions

 Spawn ()=default
 
 Spawn (int32 radius)
 
void setRadius (int32 r)
 
int32 getRadius ()
 
void setCenterPos (const Position &pos)
 
Position getCenterPos ()
 
std::vector< CreatureTypePtrgetCreatures ()
 
void addCreature (const Position &placePos, const CreatureTypePtr &cType)
 
void removeCreature (const Position &pos)
 
void clear ()
 
- 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 ()
 

Protected Member Functions

void load (TiXmlElement *node)
 
void save (TiXmlElement *node)
 

Friends

class CreatureManager
 

Detailed Description

Definition at line 52 of file creatures.h.

Constructor & Destructor Documentation

◆ Spawn() [1/2]

Spawn::Spawn ( )
default

◆ Spawn() [2/2]

Spawn::Spawn ( int32  radius)
inline

Definition at line 56 of file creatures.h.

Here is the call graph for this function:

Member Function Documentation

◆ addCreature()

void Spawn::addCreature ( const Position placePos,
const CreatureTypePtr cType 
)

Definition at line 121 of file creatures.cpp.

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

◆ clear()

void Spawn::clear ( )
inline

Definition at line 67 of file creatures.h.

◆ getCenterPos()

Position Spawn::getCenterPos ( )
inline

Definition at line 62 of file creatures.h.

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

◆ getCreatures()

std::vector< CreatureTypePtr > Spawn::getCreatures ( )

Definition at line 147 of file creatures.cpp.

Here is the caller graph for this function:

◆ getRadius()

int32 Spawn::getRadius ( )
inline

Definition at line 59 of file creatures.h.

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

◆ load()

void Spawn::load ( TiXmlElement node)
protected

Definition at line 50 of file creatures.cpp.

Here is the call graph for this function:

◆ removeCreature()

void Spawn::removeCreature ( const Position pos)

Definition at line 137 of file creatures.cpp.

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

◆ save()

void Spawn::save ( TiXmlElement node)
protected

Definition at line 90 of file creatures.cpp.

Here is the call graph for this function:

◆ setCenterPos()

void Spawn::setCenterPos ( const Position pos)
inline

Definition at line 61 of file creatures.h.

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

◆ setRadius()

void Spawn::setRadius ( int32  r)
inline

Definition at line 58 of file creatures.h.

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

Friends And Related Function Documentation

◆ CreatureManager

friend class CreatureManager
friend

Definition at line 76 of file creatures.h.


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