CreatureLib/CInterface/Battling/HistoryHandler.cpp

25 lines
1.1 KiB
C++
Raw Normal View History

#include "../../src/Battling/History/HistoryElements/AttackUseHistory.hpp"
#include "../../src/Battling/History/HistoryHolder.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Battling;
2022-04-02 10:33:26 +00:00
export_func const HistoryElement* CreatureLib_HistoryHandler_GetTopElement(const HistoryHolder* p) {
return p->GetTopElement().GetValue();
}
2022-04-02 10:33:26 +00:00
export_func const HistoryElement* CreatureLib_HistoryHandler_GetLastUsedAttack(const HistoryHolder* p) {
return p->GetLastUsedAttack().GetValue();
}
2022-04-02 10:33:26 +00:00
export_func const HistoryElement* CreatureLib_HistoryHandler_GetLastDamageOnTarget(const HistoryHolder* p,
const Creature* c) {
return p->GetLastDamageOnTarget(c).GetValue();
}
2022-04-02 10:33:26 +00:00
export_func HistoryElementKind CreatureLib_HistoryElement_GetKind(const HistoryElement* p) { return p->GetKind(); }
export_func const HistoryElement* CreatureLib_HistoryElement_GetPrevious(const HistoryElement* p) {
return p->GetPrevious().GetValue();
}
2022-04-02 10:33:26 +00:00
export_func const ExecutingAttack* CreatureLib_AttackUseHistory_GetAttack(const AttackUseHistory* p) {
return p->GetAttack().GetRaw();
}