15 lines
1.3 KiB
C++
15 lines
1.3 KiB
C++
#include "PkmnScript.hpp"
|
|
|
|
#define PKMN_HOOK(hookName, source, ...) \
|
|
{ \
|
|
auto aggregator = source->GetScriptIterator(); \
|
|
ArbUt::BorrowedPtr<CreatureLib::Battling::BattleScript> next = (CreatureLib::Battling::BattleScript*)1; \
|
|
while (aggregator.GetNext(next)) { \
|
|
if (next->IsSuppressed()) { \
|
|
continue; \
|
|
} \
|
|
auto castNext = next.ForceAs<PkmnLib::Battling::PkmnScript>(); \
|
|
castNext->hookName(__VA_ARGS__); \
|
|
} \
|
|
}
|