diff --git a/CInterface/Battling/Creature.cpp b/CInterface/Battling/Creature.cpp index 137b44d..a1819fa 100644 --- a/CInterface/Battling/Creature.cpp +++ b/CInterface/Battling/Creature.cpp @@ -56,6 +56,7 @@ OPTIONAL_GET_FUNC(Creature, GetBattle, Battle*); OPTIONAL_GET_FUNC(Creature, GetBattleSide, BattleSide*); SIMPLE_GET_FUNC(Creature, IsOnBattleField, bool); export const char* CreatureLib_Creature_GetNickname(Creature* p) { return p->GetNickname().data(); } +export void CreatureLib_Creature_SetNickname(Creature* p, const char* nickname) { p->SetNickname(nickname); } export bool CreatureLib_Creature_HasType(Creature* p, uint8_t type) { return p->HasType(type); } export size_t CreatureLib_Creature_GetTypeCount(Creature* p) { return p->GetTypes().size(); } export const uint8_t* CreatureLib_Creature_GetTypes(Creature* p) { return p->GetTypes().data(); } diff --git a/src/Battling/Models/Creature.hpp b/src/Battling/Models/Creature.hpp index e7fbeab..7730163 100644 --- a/src/Battling/Models/Creature.hpp +++ b/src/Battling/Models/Creature.hpp @@ -111,6 +111,7 @@ namespace CreatureLib::Battling { inline bool IsOnBattleField() const { return _onBattleField; } inline std::string_view GetNickname() const noexcept { return _nickname; } + inline void SetNickname(std::string nickname) noexcept { _nickname = nickname; } const CreatureLib::Library::TalentIndex& GetRealTalent() const noexcept { return _talentIndex; } const ArbUt::StringView& GetActiveTalent() const;