C Interface to get targets array from ExecutingAttack.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
73f48eab7a
commit
46ab060b99
|
@ -20,6 +20,10 @@ export uint8_t CreatureLib_ExecutingAttack_GetHitData(ExecutingAttack::HitData*&
|
||||||
export bool CreatureLib_ExecutingAttack_IsCreatureTarget(ExecutingAttack* p, Creature* target) {
|
export bool CreatureLib_ExecutingAttack_IsCreatureTarget(ExecutingAttack* p, Creature* target) {
|
||||||
return p->IsCreatureTarget(target);
|
return p->IsCreatureTarget(target);
|
||||||
}
|
}
|
||||||
|
export uint8_t CreatureLib_ExecutingAttack_GetTargetCount(ExecutingAttack* p) { return p->GetTargetCount(); }
|
||||||
|
export const Creature* const* CreatureLib_ExecutingAttack_GetTargets(ExecutingAttack* p) {
|
||||||
|
return reinterpret_cast<const Creature* const*>(p->GetTargets());
|
||||||
|
}
|
||||||
|
|
||||||
export Creature* CreatureLib_ExecutingAttack_GetUser(ExecutingAttack* p) { return p->GetUser().GetRaw(); }
|
export Creature* CreatureLib_ExecutingAttack_GetUser(ExecutingAttack* p) { return p->GetUser().GetRaw(); }
|
||||||
export LearnedAttack* CreatureLib_ExecutingAttack_GetAttack(ExecutingAttack* p) { return p->GetAttack().GetRaw(); }
|
export LearnedAttack* CreatureLib_ExecutingAttack_GetAttack(ExecutingAttack* p) { return p->GetAttack().GetRaw(); }
|
||||||
|
|
|
@ -88,6 +88,7 @@ namespace CreatureLib::Battling {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint8_t GetTargetCount() const noexcept { return _targetCount; }
|
inline uint8_t GetTargetCount() const noexcept { return _targetCount; }
|
||||||
|
|
||||||
inline const ArbUt::BorrowedPtr<Creature>* GetTargets() const noexcept { return _targets; }
|
inline const ArbUt::BorrowedPtr<Creature>* GetTargets() const noexcept { return _targets; }
|
||||||
inline uint8_t GetNumberOfHits() const noexcept { return _numberHits; }
|
inline uint8_t GetNumberOfHits() const noexcept { return _numberHits; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue