Move ScriptIterator reset to get call instead of inside Macro.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f898698f49
commit
dba1275813
@ -1,7 +1,6 @@
|
||||
#define HOOK(hookName, source, ...) \
|
||||
{ \
|
||||
auto aggregator = source->GetScriptIterator(); \
|
||||
aggregator.Reset(); \
|
||||
while (aggregator.HasNext()) { \
|
||||
auto next = aggregator.GetNext(); \
|
||||
if (next == nullptr) \
|
||||
@ -13,7 +12,6 @@
|
||||
#define HOOK_LOCAL(hookName, source, ...) \
|
||||
{ \
|
||||
auto aggregator = source.GetScriptIterator(); \
|
||||
aggregator.Reset(); \
|
||||
while (aggregator.HasNext()) { \
|
||||
auto next = aggregator.GetNext(); \
|
||||
if (next == nullptr) \
|
||||
|
@ -24,6 +24,7 @@ namespace CreatureLib::Battling {
|
||||
_scriptsIterator = ScriptAggregator(_scripts);
|
||||
_areScriptsInitialized = true;
|
||||
}
|
||||
_scriptsIterator.Reset();
|
||||
return _scriptsIterator;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user