Files
PkmnLib/src/Battling/PkmnScriptHook.hpp
Deukhoofd bb90d3db87
All checks were successful
continuous-integration/drone/push Build is passing
Update CreatureLib.
2020-06-05 18:19:28 +02:00

14 lines
1.2 KiB
C++

#include "PkmnScript.hpp"
#define PKMN_HOOK(hookName, source, ...) \
{ \
auto aggregator = source->GetScriptIterator(); \
while (aggregator.HasNext()) { \
auto next = aggregator.GetNext(); \
if (next == nullptr) \
continue; \
auto castNext = next.ForceAs<PkmnLib::Battling::PkmnScript>(); \
castNext->hookName(__VA_ARGS__); \
} \
}