Otclient  14/8/2020
Thing Class Reference

#include <thing.h>

Inheritance diagram for Thing:
Collaboration diagram for Thing:

Public Member Functions

 Thing ()
 
virtual ~Thing ()
 
virtual void draw (const Point &, float, bool, LightView *=nullptr)
 
virtual void setId (uint32)
 
void setPosition (const Position &position)
 
virtual uint32 getId ()
 
Position getPosition ()
 
int getStackPriority ()
 
const TilePtrgetTile ()
 
ContainerPtr getParentContainer ()
 
int getStackPos ()
 
virtual bool isItem ()
 
virtual bool isEffect ()
 
virtual bool isMissile ()
 
virtual bool isCreature ()
 
virtual bool isNpc ()
 
virtual bool isMonster ()
 
virtual bool isPlayer ()
 
virtual bool isLocalPlayer ()
 
virtual bool isAnimatedText ()
 
virtual bool isStaticText ()
 
virtual const ThingTypePtrgetThingType ()
 
virtual ThingTyperawGetThingType ()
 
Size getSize ()
 
int getWidth ()
 
int getHeight ()
 
virtual Point getDisplacement ()
 
virtual int getDisplacementX ()
 
virtual int getDisplacementY ()
 
virtual int getExactSize (int layer, int xPattern, int yPattern, int zPattern, int animationPhase)
 
int getLayers ()
 
int getNumPatternX ()
 
int getNumPatternY ()
 
int getNumPatternZ ()
 
int getAnimationPhases ()
 
AnimatorPtr getAnimator ()
 
int getGroundSpeed ()
 
int getMaxTextLength ()
 
Light getLight ()
 
int getMinimapColor ()
 
int getLensHelp ()
 
int getClothSlot ()
 
int getElevation ()
 
bool isGround ()
 
bool isGroundBorder ()
 
bool isOnBottom ()
 
bool isOnTop ()
 
bool isContainer ()
 
bool isStackable ()
 
bool isForceUse ()
 
bool isMultiUse ()
 
bool isWritable ()
 
bool isChargeable ()
 
bool isWritableOnce ()
 
bool isFluidContainer ()
 
bool isSplash ()
 
bool isNotWalkable ()
 
bool isNotMoveable ()
 
bool blockProjectile ()
 
bool isNotPathable ()
 
bool isPickupable ()
 
bool isHangable ()
 
bool isHookSouth ()
 
bool isHookEast ()
 
bool isRotateable ()
 
bool hasLight ()
 
bool isDontHide ()
 
bool isTranslucent ()
 
bool hasDisplacement ()
 
bool hasElevation ()
 
bool isLyingCorpse ()
 
bool isAnimateAlways ()
 
bool hasMiniMapColor ()
 
bool hasLensHelp ()
 
bool isFullGround ()
 
bool isIgnoreLook ()
 
bool isCloth ()
 
bool isMarketable ()
 
bool isUsable ()
 
bool isWrapable ()
 
bool isUnwrapable ()
 
bool isTopEffect ()
 
MarketData getMarketData ()
 
virtual void onPositionChange (const Position &, const Position &)
 
virtual void onAppear ()
 
virtual void onDisappear ()
 
- 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 Attributes

Position m_position
 
uint16 m_datId
 

Detailed Description

Definition at line 33 of file thing.h.

Constructor & Destructor Documentation

◆ Thing()

Thing::Thing ( )

Definition at line 31 of file thing.cpp.

◆ ~Thing()

virtual Thing::~Thing ( )
inlinevirtual

Definition at line 37 of file thing.h.

Member Function Documentation

◆ blockProjectile()

bool Thing::blockProjectile ( )
inline

Definition at line 100 of file thing.h.

Here is the call graph for this function:

◆ draw()

virtual void Thing::draw ( const Point ,
float  ,
bool  ,
LightView = nullptr 
)
inlinevirtual

Reimplemented in Item, Creature, and Missile.

Definition at line 39 of file thing.h.

◆ getAnimationPhases()

int Thing::getAnimationPhases ( )
inline

Definition at line 76 of file thing.h.

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

◆ getAnimator()

AnimatorPtr Thing::getAnimator ( )
inline

Definition at line 77 of file thing.h.

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

◆ getClothSlot()

int Thing::getClothSlot ( )
inline

Definition at line 83 of file thing.h.

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

◆ getDisplacement()

virtual Point Thing::getDisplacement ( )
inlinevirtual

Reimplemented in Creature.

Definition at line 68 of file thing.h.

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

◆ getDisplacementX()

virtual int Thing::getDisplacementX ( )
inlinevirtual

Reimplemented in Creature.

Definition at line 69 of file thing.h.

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

◆ getDisplacementY()

virtual int Thing::getDisplacementY ( )
inlinevirtual

Reimplemented in Creature.

Definition at line 70 of file thing.h.

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

◆ getElevation()

int Thing::getElevation ( )
inline

Definition at line 84 of file thing.h.

Here is the call graph for this function:

◆ getExactSize()

virtual int Thing::getExactSize ( int  layer,
int  xPattern,
int  yPattern,
int  zPattern,
int  animationPhase 
)
inlinevirtual

Reimplemented in Item, and Creature.

Definition at line 71 of file thing.h.

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

◆ getGroundSpeed()

int Thing::getGroundSpeed ( )
inline

Definition at line 78 of file thing.h.

Here is the call graph for this function:

◆ getHeight()

int Thing::getHeight ( )
inline

Definition at line 67 of file thing.h.

Here is the call graph for this function:

◆ getId()

virtual uint32 Thing::getId ( )
inlinevirtual

Reimplemented in Item, Creature, Missile, and Effect.

Definition at line 44 of file thing.h.

Here is the caller graph for this function:

◆ getLayers()

int Thing::getLayers ( )
inline

Definition at line 72 of file thing.h.

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

◆ getLensHelp()

int Thing::getLensHelp ( )
inline

Definition at line 82 of file thing.h.

Here is the call graph for this function:

◆ getLight()

Light Thing::getLight ( )
inline

Definition at line 80 of file thing.h.

Here is the call graph for this function:

◆ getMarketData()

MarketData Thing::getMarketData ( )
inline

Definition at line 124 of file thing.h.

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

◆ getMaxTextLength()

int Thing::getMaxTextLength ( )
inline

Definition at line 79 of file thing.h.

Here is the call graph for this function:

◆ getMinimapColor()

int Thing::getMinimapColor ( )
inline

Definition at line 81 of file thing.h.

Here is the call graph for this function:

◆ getNumPatternX()

int Thing::getNumPatternX ( )
inline

Definition at line 73 of file thing.h.

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

◆ getNumPatternY()

int Thing::getNumPatternY ( )
inline

Definition at line 74 of file thing.h.

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

◆ getNumPatternZ()

int Thing::getNumPatternZ ( )
inline

Definition at line 75 of file thing.h.

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

◆ getParentContainer()

ContainerPtr Thing::getParentContainer ( )

Definition at line 67 of file thing.cpp.

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

◆ getPosition()

Position Thing::getPosition ( )
inline

Definition at line 45 of file thing.h.

Here is the caller graph for this function:

◆ getSize()

Size Thing::getSize ( )
inline

Definition at line 65 of file thing.h.

Here is the call graph for this function:

◆ getStackPos()

int Thing::getStackPos ( )

Definition at line 76 of file thing.cpp.

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

◆ getStackPriority()

int Thing::getStackPriority ( )

Definition at line 46 of file thing.cpp.

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

◆ getThingType()

const ThingTypePtr & Thing::getThingType ( )
virtual

Reimplemented in Item, Creature, Missile, and Effect.

Definition at line 88 of file thing.cpp.

Here is the call graph for this function:

◆ getTile()

const TilePtr & Thing::getTile ( )

Definition at line 62 of file thing.cpp.

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

◆ getWidth()

int Thing::getWidth ( )
inline

Definition at line 66 of file thing.h.

Here is the call graph for this function:

◆ hasDisplacement()

bool Thing::hasDisplacement ( )
inline

Definition at line 110 of file thing.h.

Here is the call graph for this function:

◆ hasElevation()

bool Thing::hasElevation ( )
inline

Definition at line 111 of file thing.h.

Here is the call graph for this function:

◆ hasLensHelp()

bool Thing::hasLensHelp ( )
inline

Definition at line 115 of file thing.h.

Here is the call graph for this function:

◆ hasLight()

bool Thing::hasLight ( )
inline

Definition at line 107 of file thing.h.

Here is the call graph for this function:

◆ hasMiniMapColor()

bool Thing::hasMiniMapColor ( )
inline

Definition at line 114 of file thing.h.

Here is the call graph for this function:

◆ isAnimateAlways()

bool Thing::isAnimateAlways ( )
inline

Definition at line 113 of file thing.h.

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

◆ isAnimatedText()

virtual bool Thing::isAnimatedText ( )
inlinevirtual

Reimplemented in AnimatedText.

Definition at line 59 of file thing.h.

Here is the caller graph for this function:

◆ isChargeable()

bool Thing::isChargeable ( )
inline

Definition at line 94 of file thing.h.

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

◆ isCloth()

bool Thing::isCloth ( )
inline

Definition at line 118 of file thing.h.

Here is the call graph for this function:

◆ isContainer()

bool Thing::isContainer ( )
inline

Definition at line 89 of file thing.h.

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

◆ isCreature()

virtual bool Thing::isCreature ( )
inlinevirtual

Reimplemented in Creature.

Definition at line 54 of file thing.h.

Here is the caller graph for this function:

◆ isDontHide()

bool Thing::isDontHide ( )
inline

Definition at line 108 of file thing.h.

Here is the call graph for this function:

◆ isEffect()

virtual bool Thing::isEffect ( )
inlinevirtual

Reimplemented in Effect.

Definition at line 52 of file thing.h.

Here is the caller graph for this function:

◆ isFluidContainer()

bool Thing::isFluidContainer ( )
inline

Definition at line 96 of file thing.h.

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

◆ isForceUse()

bool Thing::isForceUse ( )
inline

Definition at line 91 of file thing.h.

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

◆ isFullGround()

bool Thing::isFullGround ( )
inline

Definition at line 116 of file thing.h.

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

◆ isGround()

bool Thing::isGround ( )
inline

Definition at line 85 of file thing.h.

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

◆ isGroundBorder()

bool Thing::isGroundBorder ( )
inline

Definition at line 86 of file thing.h.

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

◆ isHangable()

bool Thing::isHangable ( )
inline

Definition at line 103 of file thing.h.

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

◆ isHookEast()

bool Thing::isHookEast ( )
inline

Definition at line 105 of file thing.h.

Here is the call graph for this function:

◆ isHookSouth()

bool Thing::isHookSouth ( )
inline

Definition at line 104 of file thing.h.

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

◆ isIgnoreLook()

bool Thing::isIgnoreLook ( )
inline

Definition at line 117 of file thing.h.

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

◆ isItem()

virtual bool Thing::isItem ( )
inlinevirtual

Reimplemented in Item.

Definition at line 51 of file thing.h.

Here is the caller graph for this function:

◆ isLocalPlayer()

virtual bool Thing::isLocalPlayer ( )
inlinevirtual

Reimplemented in LocalPlayer.

Definition at line 58 of file thing.h.

Here is the caller graph for this function:

◆ isLyingCorpse()

bool Thing::isLyingCorpse ( )
inline

Definition at line 112 of file thing.h.

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

◆ isMarketable()

bool Thing::isMarketable ( )
inline

Definition at line 119 of file thing.h.

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

◆ isMissile()

virtual bool Thing::isMissile ( )
inlinevirtual

Reimplemented in Missile.

Definition at line 53 of file thing.h.

Here is the caller graph for this function:

◆ isMonster()

virtual bool Thing::isMonster ( )
inlinevirtual

Reimplemented in Monster.

Definition at line 56 of file thing.h.

Here is the caller graph for this function:

◆ isMultiUse()

bool Thing::isMultiUse ( )
inline

Definition at line 92 of file thing.h.

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

◆ isNotMoveable()

bool Thing::isNotMoveable ( )
inline

Definition at line 99 of file thing.h.

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

◆ isNotPathable()

bool Thing::isNotPathable ( )
inline

Definition at line 101 of file thing.h.

Here is the call graph for this function:

◆ isNotWalkable()

bool Thing::isNotWalkable ( )
inline

Definition at line 98 of file thing.h.

Here is the call graph for this function:

◆ isNpc()

virtual bool Thing::isNpc ( )
inlinevirtual

Reimplemented in Npc.

Definition at line 55 of file thing.h.

Here is the caller graph for this function:

◆ isOnBottom()

bool Thing::isOnBottom ( )
inline

Definition at line 87 of file thing.h.

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

◆ isOnTop()

bool Thing::isOnTop ( )
inline

Definition at line 88 of file thing.h.

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

◆ isPickupable()

bool Thing::isPickupable ( )
inline

Definition at line 102 of file thing.h.

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

◆ isPlayer()

virtual bool Thing::isPlayer ( )
inlinevirtual

Reimplemented in Player.

Definition at line 57 of file thing.h.

Here is the caller graph for this function:

◆ isRotateable()

bool Thing::isRotateable ( )
inline

Definition at line 106 of file thing.h.

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

◆ isSplash()

bool Thing::isSplash ( )
inline

Definition at line 97 of file thing.h.

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

◆ isStackable()

bool Thing::isStackable ( )
inline

Definition at line 90 of file thing.h.

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

◆ isStaticText()

virtual bool Thing::isStaticText ( )
inlinevirtual

Reimplemented in StaticText.

Definition at line 60 of file thing.h.

Here is the caller graph for this function:

◆ isTopEffect()

bool Thing::isTopEffect ( )
inline

Definition at line 123 of file thing.h.

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

◆ isTranslucent()

bool Thing::isTranslucent ( )
inline

Definition at line 109 of file thing.h.

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

◆ isUnwrapable()

bool Thing::isUnwrapable ( )
inline

Definition at line 122 of file thing.h.

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

◆ isUsable()

bool Thing::isUsable ( )
inline

Definition at line 120 of file thing.h.

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

◆ isWrapable()

bool Thing::isWrapable ( )
inline

Definition at line 121 of file thing.h.

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

◆ isWritable()

bool Thing::isWritable ( )
inline

Definition at line 93 of file thing.h.

Here is the call graph for this function:

◆ isWritableOnce()

bool Thing::isWritableOnce ( )
inline

Definition at line 95 of file thing.h.

Here is the call graph for this function:

◆ onAppear()

virtual void Thing::onAppear ( )
inlinevirtual

Reimplemented in Creature, LocalPlayer, AnimatedText, and Effect.

Definition at line 127 of file thing.h.

◆ onDisappear()

virtual void Thing::onDisappear ( )
inlinevirtual

Reimplemented in Creature.

Definition at line 128 of file thing.h.

◆ onPositionChange()

virtual void Thing::onPositionChange ( const Position ,
const Position  
)
inlinevirtual

Reimplemented in Creature, and LocalPlayer.

Definition at line 126 of file thing.h.

Here is the caller graph for this function:

◆ rawGetThingType()

ThingType * Thing::rawGetThingType ( )
virtual

Reimplemented in Item, Creature, Missile, and Effect.

Definition at line 93 of file thing.cpp.

Here is the call graph for this function:

◆ setId()

virtual void Thing::setId ( uint32  )
inlinevirtual

Reimplemented in Item, Creature, Effect, and Missile.

Definition at line 41 of file thing.h.

Here is the caller graph for this function:

◆ setPosition()

void Thing::setPosition ( const Position position)

Definition at line 36 of file thing.cpp.

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

Member Data Documentation

◆ m_datId

uint16 Thing::m_datId
protected

Definition at line 132 of file thing.h.

◆ m_position

Position Thing::m_position
protected

Definition at line 131 of file thing.h.


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