Add C Interface for Creature::GetActiveTalent.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-24 10:16:57 +02:00
parent a4faa1351b
commit 3f447a3e16
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 0 deletions

View File

@ -56,6 +56,9 @@ export uint8_t CreatureLib_Creature_Damage(Creature* p, uint32_t damage, DamageS
export uint8_t CreatureLib_Creature_Heal(Creature* p, uint32_t health, bool canRevive) { export uint8_t CreatureLib_Creature_Heal(Creature* p, uint32_t health, bool canRevive) {
Try(p->Heal(health, canRevive);) Try(p->Heal(health, canRevive);)
} }
export uint8_t CreatureLib_Creature_GetActiveTalent(const Creature* p, const char*& out) {
Try(out = p->GetActiveTalent().c_str();)
}
export uint8_t CreatureLib_Creature_OverrideActiveTalent(Creature* p, const char* talent) { export uint8_t CreatureLib_Creature_OverrideActiveTalent(Creature* p, const char* talent) {
Try(p->OverrideActiveTalent(ArbUt::StringView(talent));) Try(p->OverrideActiveTalent(ArbUt::StringView(talent));)
} }