#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(); \ castNext->hookName(__VA_ARGS__); \ } \ }