Class Player

Inheritance Relationships

Base Types

  • public game::environment::Object (Class Object)

  • public std::enable_shared_from_this< Player >

Class Documentation

class game::environment::Player : public game::environment::Object, public std::enable_shared_from_this<Player>

Public Functions

Player(uint32_t id, uint32_t vid, std::shared_ptr<core::networking::Connection> connection)
~Player()
std::shared_ptr<core::networking::Connection> GetConnection()
void SetConnection(std::shared_ptr<core::networking::Connection> &&connection)
uint32_t GetID()
void Logout(bool close = false)
void Load(const std::function<void()> &cb)
void Show(const std::shared_ptr<core::networking::Connection> &connection) override
void Remove(const std::shared_ptr<core::networking::Connection> &connection) override
void Update(uint32_t elapsedTime) override
void TakeDamage(const std::shared_ptr<Object> &object, int damage) override
std::shared_ptr<Object> GetPointer() override
int32_t GetHP() override
int32_t GetMaxHP() override
void OnSpawned() override
void ObjectEnteredView(std::shared_ptr<Object> object) override
void ObjectLeftView(std::shared_ptr<Object> object) override
ObjectType GetObjectType() const override
void Persist()
void Move(int32_t x, int32_t y)
void Goto(int32_t x, int32_t y)
void Teleport(int32_t x, int32_t y)
uint8_t GetClassStatusBonus() const
uint32_t GetHitRate() const
uint32_t CalculateAttackDamage(uint32_t weaponDamage) const
uint32_t GetPoint(uint8_t point) const
void SetPoint(uint8_t point, uint32_t value)
void Attack(const std::shared_ptr<Object> &target)
void Dead() override
void Respawn(bool town = false)
std::shared_ptr<item::Item> GetItem(uint8_t window, uint16_t position)
bool HasSpace(uint8_t window, uint16_t position, uint8_t size)
bool HasSpace(uint8_t size)
bool RemoveItem(const std::shared_ptr<item::Item> &item, bool send = true)
bool SetItem(uint8_t window, uint16_t position, const std::shared_ptr<item::Item> &item, bool send = true)
bool GiveItem(const std::shared_ptr<item::Item> &item)
bool FindSpace(uint8_t window, uint8_t size, uint16_t &position)
bool FindSpace(uint8_t size, uint16_t &position)
bool SwapItem(const std::shared_ptr<item::Item> &item1, const std::shared_ptr<item::Item> &item2)
bool AddItem(const std::shared_ptr<item::Item> &item)
bool AddItem(uint8_t window, const std::shared_ptr<item::Item> &item)
bool EquipItem(const std::shared_ptr<item::Item> &item)
void ClearWindow(uint8_t window)
void SendBasicData()
void SendPoints()
void SendInventory()
void SendCharacter(const std::shared_ptr<core::networking::Connection> &connection)
void SendCharacterAdditional(const std::shared_ptr<core::networking::Connection> &connection)
void SendCharacterUpdate(const std::shared_ptr<core::networking::Connection> &connection)
void SendChatMessage(uint8_t messageType, const std::string &message)
void SendTarget()
void OnItemMove(const std::shared_ptr<core::networking::Packet> &packet)
void OnItemUse(const std::shared_ptr<core::networking::Packet> &packet)
void OnChat(const std::shared_ptr<core::networking::Packet> &packet)
void OnMove(const std::shared_ptr<core::networking::Packet> &packet)
void OnAttack(const std::shared_ptr<core::networking::Packet> &packet)
void OnTarget(const std::shared_ptr<core::networking::Packet> &packet)
void OnDrop(const std::shared_ptr<core::networking::Packet> &packet)
void OnOverInItem(const std::shared_ptr<core::networking::Packet> &packet)
void DebugView()
std::string GetLanguage()
void SendConnectionAround(const std::function<void(const std::shared_ptr<core::networking::Connection>&)> &function)
const std::string &GetName() const override
uint8_t GetLevel() const
void SetLevel(uint8_t level)
void SetTarget(const std::shared_ptr<Object> &target)