Otclient  14/8/2020
Monster Class Reference

#include <creature.h>

Inheritance diagram for Monster:
Collaboration diagram for Monster:

Public Member Functions

bool isMonster ()
 
- Public Member Functions inherited from Creature
 Creature ()
 
virtual void draw (const Point &dest, float scaleFactor, bool animate, LightView *lightView=nullptr)
 
void internalDrawOutfit (Point dest, float scaleFactor, bool animateWalk, bool animateIdle, Otc::Direction direction, LightView *lightView=nullptr)
 
void drawOutfit (const Rect &destRect, bool resize)
 
void drawInformation (const Point &point, bool useGray, const Rect &parentRect, int drawFlags)
 
void setId (uint32 id)
 
void setName (const std::string &name)
 
void setHealthPercent (uint8 healthPercent)
 
void setDirection (Otc::Direction direction)
 
void setOutfit (const Outfit &outfit)
 
void setOutfitColor (const Color &color, int duration)
 
void setLight (const Light &light)
 
void setSpeed (uint16 speed)
 
void setBaseSpeed (double baseSpeed)
 
void setSkull (uint8 skull)
 
void setShield (uint8 shield)
 
void setEmblem (uint8 emblem)
 
void setType (uint8 type)
 
void setIcon (uint8 icon)
 
void setSkullTexture (const std::string &filename)
 
void setShieldTexture (const std::string &filename, bool blink)
 
void setEmblemTexture (const std::string &filename)
 
void setTypeTexture (const std::string &filename)
 
void setIconTexture (const std::string &filename)
 
void setPassable (bool passable)
 
void setSpeedFormula (double speedA, double speedB, double speedC)
 
void addTimedSquare (uint8 color)
 
void removeTimedSquare ()
 
void showStaticSquare (const Color &color)
 
void hideStaticSquare ()
 
uint32 getId ()
 
std::string getName ()
 
uint8 getHealthPercent ()
 
Otc::Direction getDirection ()
 
Outfit getOutfit ()
 
Light getLight ()
 
uint16 getSpeed ()
 
double getBaseSpeed ()
 
uint8 getSkull ()
 
uint8 getShield ()
 
uint8 getEmblem ()
 
uint8 getType ()
 
uint8 getIcon ()
 
bool isPassable ()
 
Point getDrawOffset ()
 
int getStepDuration (bool ignoreDiagonal=false, Otc::Direction dir=Otc::InvalidDirection)
 
Point getWalkOffset ()
 
Position getLastStepFromPosition ()
 
Position getLastStepToPosition ()
 
float getStepProgress ()
 
float getStepTicksLeft ()
 
ticks_t getWalkTicksElapsed ()
 
double getSpeedFormula (Otc::SpeedFormula formula)
 
bool hasSpeedFormula ()
 
std::array< double, Otc::LastSpeedFormulagetSpeedFormulaArray ()
 
virtual Point getDisplacement ()
 
virtual int getDisplacementX ()
 
virtual int getDisplacementY ()
 
virtual int getExactSize (int layer=0, int xPattern=0, int yPattern=0, int zPattern=0, int animationPhase=0)
 
PointF getJumpOffset ()
 
void updateShield ()
 
void turn (Otc::Direction direction)
 
void jump (int height, int duration)
 
virtual void walk (const Position &oldPos, const Position &newPos)
 
virtual void stopWalk ()
 
void allowAppearWalk ()
 
bool isWalking ()
 
bool isRemoved ()
 
bool isInvisible ()
 
bool isDead ()
 
bool canBeSeen ()
 
bool isCreature ()
 
const ThingTypePtrgetThingType ()
 
ThingTyperawGetThingType ()
 
virtual void onPositionChange (const Position &newPos, const Position &oldPos)
 
virtual void onAppear ()
 
virtual void onDisappear ()
 
virtual void onDeath ()
 
- Public Member Functions inherited from Thing
 Thing ()
 
virtual ~Thing ()
 
void setPosition (const Position &position)
 
Position getPosition ()
 
int getStackPriority ()
 
const TilePtrgetTile ()
 
ContainerPtr getParentContainer ()
 
int getStackPos ()
 
virtual bool isItem ()
 
virtual bool isEffect ()
 
virtual bool isMissile ()
 
virtual bool isNpc ()
 
virtual bool isPlayer ()
 
virtual bool isLocalPlayer ()
 
virtual bool isAnimatedText ()
 
virtual bool isStaticText ()
 
Size getSize ()
 
int getWidth ()
 
int getHeight ()
 
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 ()
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from Creature
enum  { SHIELD_BLINK_TICKS = 500, VOLATILE_SQUARE_DURATION = 1000 }
 
- Protected Member Functions inherited from Creature
virtual void updateWalkAnimation (int totalPixelsWalked)
 
virtual void updateWalkOffset (int totalPixelsWalked)
 
void updateWalkingTile ()
 
virtual void nextWalkUpdate ()
 
virtual void updateWalk ()
 
virtual void terminateWalk ()
 
void updateOutfitColor (Color color, Color finalColor, Color delta, int duration)
 
void updateJump ()
 
- Protected Attributes inherited from Creature
uint32 m_id
 
std::string m_name
 
uint8 m_healthPercent
 
Otc::Direction m_direction
 
Outfit m_outfit
 
Light m_light
 
int m_speed
 
double m_baseSpeed
 
uint8 m_skull
 
uint8 m_shield
 
uint8 m_emblem
 
uint8 m_type
 
uint8 m_icon
 
TexturePtr m_skullTexture
 
TexturePtr m_shieldTexture
 
TexturePtr m_emblemTexture
 
TexturePtr m_typeTexture
 
TexturePtr m_iconTexture
 
stdext::boolean< true > m_showShieldTexture
 
stdext::boolean< false > m_shieldBlink
 
stdext::boolean< false > m_passable
 
Color m_timedSquareColor
 
Color m_staticSquareColor
 
stdext::boolean< false > m_showTimedSquare
 
stdext::boolean< false > m_showStaticSquare
 
stdext::boolean< true > m_removed
 
CachedText m_nameCache
 
Color m_informationColor
 
Color m_outfitColor
 
ScheduledEventPtr m_outfitColorUpdateEvent
 
Timer m_outfitColorTimer
 
std::array< double, Otc::LastSpeedFormulam_speedFormula
 
int m_walkAnimationPhase
 
int m_walkedPixels
 
uint m_footStep
 
Timer m_walkTimer
 
Timer m_footTimer
 
TilePtr m_walkingTile
 
stdext::boolean< false > m_walking
 
stdext::boolean< false > m_allowAppearWalk
 
stdext::boolean< false > m_footStepDrawn
 
ScheduledEventPtr m_walkUpdateEvent
 
ScheduledEventPtr m_walkFinishAnimEvent
 
EventPtr m_disappearEvent
 
Point m_walkOffset
 
Otc::Direction m_walkTurnDirection
 
Otc::Direction m_lastStepDirection
 
Position m_lastStepFromPosition
 
Position m_lastStepToPosition
 
Position m_oldPosition
 
float m_jumpHeight
 
float m_jumpDuration
 
PointF m_jumpOffset
 
Timer m_jumpTimer
 
- Protected Attributes inherited from Thing
Position m_position
 
uint16 m_datId
 

Detailed Description

Definition at line 217 of file creature.h.

Member Function Documentation

◆ isMonster()

bool Monster::isMonster ( )
inlinevirtual

Reimplemented from Thing.

Definition at line 220 of file creature.h.


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