Add C interface for secondary effect data.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
340520e0e3
commit
9ff5df1b70
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue