Add C interface for secondary effect data.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-06 12:53:49 +02:00
parent 340520e0e3
commit 9ff5df1b70
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,16 @@ SIMPLE_GET_FUNC(AttackData, GetBaseUsages, uint8_t);
SIMPLE_GET_FUNC(AttackData, GetTarget, AttackTarget);
SIMPLE_GET_FUNC(AttackData, GetPriority, int8_t);
export bool CreatureLib_AttackData_HasSecondaryEffect(const AttackData* p) { return p->HasSecondaryEffect(); }
export uint8_t CreatureLib_AttackData_GetSecondaryEffectChance(const AttackData* p) {
return p->GetSecondaryEffect().GetChance();
}
export const char* CreatureLib_AttackData_GetSecondaryEffectName(const AttackData* p) {
return p->GetSecondaryEffect().GetEffectName().c_str();
}
export bool CreatureLib_AttackData_HasFlag(const AttackData* p, const char* key) {
return p->HasFlag(ConstString::GetHash(key));
}