Class Entity

Inheritance Relationships

Derived Types

Class Documentation

class simulator::entity::Entity

Subclassed by simulator::entity::EntityMonster, simulator::entity::EntityPlayer

Public Types

enum EntityType

Values:

enumerator ENTITY_MONSTER = 0
enumerator ENTITY_NPC = 1
enumerator ENTITY_PLAYER = 6
enumerator ENTITY_MAX_NUM
enumerator ENTITY_NONE = ENTITY_MAX_NUM
enum MovementTypes

Values:

enumerator WAIT = 0
enumerator MOVE = 1
enumerator ATTACK = 2
enumerator COMBO = 3
enumerator MOB_SKILL = 4
enumerator MAX
enumerator SKILL = 0x80

Public Functions

Entity(uint32_t vid, int32_t x, int32_t y, float angle, uint16_t objClass, uint8_t state, uint8_t movementSpeed, uint8_t attackSpeed)
~Entity() = default
int32_t GetX()
int32_t GetY()
void MoveTo(int32_t x, int32_t y)
void StopMove()
void SetMain(bool isMain)
bool UpdateMovement(uint32_t elapsedTime)
uint8_t GetType() const
std::shared_ptr<Entity> GetPointer() = 0

Protected Attributes

std::mutex _entityMutex
uint32_t _vid
int32_t _x
int32_t _y
float _rotation
uint16_t _class
uint8_t _state
uint8_t _movementSpeed
uint8_t _attackSpeed
int32_t _goingX
int32_t _goingY
int32_t _startX
int32_t _startY
uint32_t _movementAccumulator
uint32_t _movementDuration
bool _isMain
bool _isMoveUpdating

Protected Static Functions

void SendMovementPacket(int32_t x, int32_t y, uint8_t type, uint8_t arg, uint8_t rot)