Otclient  14/8/2020
House Class Reference

#include <houses.h>

Inheritance diagram for House:
Collaboration diagram for House:

Public Member Functions

 House ()
 
 House (uint32 hId, const std::string &name="", const Position &pos=Position())
 
 ~House ()
 
void setTile (const TilePtr &tile)
 
TilePtr getTile (const Position &pos)
 
void setName (const std::string &name)
 
std::string getName ()
 
void setId (uint32 hId)
 
uint32 getId ()
 
void setTownId (uint32 tid)
 
uint32 getTownId ()
 
void setSize (uint32 s)
 
uint32 getSize ()
 
void setRent (uint32 r)
 
uint32 getRent ()
 
void setEntry (const Position &p)
 
Position getEntry ()
 
void addDoor (const ItemPtr &door)
 
void removeDoor (const ItemPtr &door)
 
void removeDoorById (uint32 doorId)
 
- 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 (const TiXmlElement *elem)
 
void save (TiXmlElement *elem)
 

Friends

class HouseManager
 

Detailed Description

Definition at line 41 of file houses.h.

Constructor & Destructor Documentation

◆ House() [1/2]

House::House ( )

Definition at line 29 of file houses.cpp.

◆ House() [2/2]

House::House ( uint32  hId,
const std::string &  name = "",
const Position pos = Position() 
)

Definition at line 33 of file houses.cpp.

Here is the call graph for this function:

◆ ~House()

House::~House ( )
inline

Definition at line 46 of file houses.h.

Member Function Documentation

◆ addDoor()

void House::addDoor ( const ItemPtr door)

Definition at line 56 of file houses.cpp.

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

◆ getEntry()

Position House::getEntry ( )
inline

Definition at line 67 of file houses.h.

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

◆ getId()

uint32 House::getId ( )
inline

Definition at line 55 of file houses.h.

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

◆ getName()

std::string House::getName ( )
inline

Definition at line 52 of file houses.h.

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

◆ getRent()

uint32 House::getRent ( )
inline

Definition at line 64 of file houses.h.

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

◆ getSize()

uint32 House::getSize ( )
inline

Definition at line 61 of file houses.h.

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

◆ getTile()

TilePtr House::getTile ( const Position pos)

Definition at line 48 of file houses.cpp.

Here is the caller graph for this function:

◆ getTownId()

uint32 House::getTownId ( )
inline

Definition at line 58 of file houses.h.

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

◆ load()

void House::load ( const TiXmlElement elem)
protected

Definition at line 71 of file houses.cpp.

Here is the call graph for this function:

◆ removeDoor()

void House::removeDoor ( const ItemPtr door)
inline

Definition at line 70 of file houses.h.

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

◆ removeDoorById()

void House::removeDoorById ( uint32  doorId)

Definition at line 63 of file houses.cpp.

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

◆ save()

void House::save ( TiXmlElement elem)
protected

Definition at line 90 of file houses.cpp.

Here is the call graph for this function:

◆ setEntry()

void House::setEntry ( const Position p)
inline

Definition at line 66 of file houses.h.

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

◆ setId()

void House::setId ( uint32  hId)
inline

Definition at line 54 of file houses.h.

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

◆ setName()

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

Definition at line 51 of file houses.h.

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

◆ setRent()

void House::setRent ( uint32  r)
inline

Definition at line 63 of file houses.h.

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

◆ setSize()

void House::setSize ( uint32  s)
inline

Definition at line 60 of file houses.h.

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

◆ setTile()

void House::setTile ( const TilePtr tile)

Definition at line 41 of file houses.cpp.

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

◆ setTownId()

void House::setTownId ( uint32  tid)
inline

Definition at line 57 of file houses.h.

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

Friends And Related Function Documentation

◆ HouseManager

friend class HouseManager
friend

Definition at line 84 of file houses.h.


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