Cleans up HistoryHolder to be a lot less complicated (although possibly a bit slower), adds DamageHistory.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -4,19 +4,15 @@
|
||||
using namespace CreatureLib::Battling;
|
||||
|
||||
export const HistoryElement* CreatureLib_HistoryHandler_GetTopElement(const HistoryHolder* p) {
|
||||
return p->GetTopElement().GetRaw();
|
||||
return p->GetTopElement().GetValue();
|
||||
}
|
||||
export const HistoryElement* CreatureLib_HistoryHandler_GetLastUsedAttack(const HistoryHolder* p) {
|
||||
auto res = p->GetLastUsedAttack();
|
||||
if (res.has_value()) {
|
||||
return res.value();
|
||||
}
|
||||
return nullptr;
|
||||
return p->GetLastUsedAttack().GetValue();
|
||||
}
|
||||
|
||||
export HistoryElementKind CreatureLib_HistoryElement_GetKind(const HistoryElement* p) { return p->GetKind(); }
|
||||
export const HistoryElement* CreatureLib_HistoryElement_GetPrevious(const HistoryElement* p) {
|
||||
return p->GetPrevious().GetRaw();
|
||||
return p->GetPrevious().GetValue();
|
||||
}
|
||||
|
||||
export const ExecutingAttack* CreatureLib_AttackUseHistory_GetAttack(const AttackUseHistory* p) {
|
||||
|
||||
Reference in New Issue
Block a user