Implemented better script handling.

This commit is contained in:
2019-11-09 12:15:45 +01:00
parent c3bfbb569e
commit ee14efe22e
7 changed files with 121 additions and 15 deletions

View File

@@ -0,0 +1,14 @@
#define HOOK(hookName, sources, ... ) \
{ \
auto aggregator = CreatureLib::Battling::ScriptAggregator(); \
for (auto source: sources){ \
source -> GetActiveScripts(aggregator); \
} \
while (aggregator.HasNext()){ \
auto next = aggregator.GetNext(); \
if (next == nullptr) continue; \
next->hookName(__VA_ARGS__); \
} \
}