/** * \brief Returns whether the entity is currently carrying an item in this state. * * This function returns true if get_carried_item() is not nullptr. * Redefine get_carried_item() if the entity is able to carry an item in this state. * * \return true if the entity is currently carrying an item in this state */ bool Entity::State::is_carrying_item() const { return get_carried_item() != nullptr; }
/** * \brief Returns whether the hero is currently carrying an item in this state. * * This function returns true if get_carried_item() is not NULL. * Redefine get_carried_item() if the hero is able to carry an item in this state. * * \return true if the hero is currently carrying an item in this state */ bool Hero::State::is_carrying_item() { return get_carried_item() != NULL; }