Functions to set Creature Held Item, and helper function to check whether Creature is holding a specific held item.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -82,7 +82,13 @@ namespace CreatureLib::Battling {
|
||||
inline uint32_t GetExperience() const { return _experience; }
|
||||
inline Library::Gender GetGender() const { return _gender; }
|
||||
inline uint8_t GetColoring() const { return _coloring; }
|
||||
inline const bool HasHeldItem(const std::string& name) const {
|
||||
return _heldItem != nullptr && _heldItem->GetName() == name;
|
||||
}
|
||||
inline const Library::Item* GetHeldItem() const { return _heldItem; }
|
||||
void SetHeldItem(const std::string& itemName);
|
||||
inline void SetHeldItem(Library::Item* item) { _heldItem = item; };
|
||||
|
||||
inline uint32_t GetCurrentHealth() const { return _currentHealth; }
|
||||
|
||||
void SetBattleData(Battle* battle, BattleSide* side);
|
||||
|
||||
Reference in New Issue
Block a user