fix(Core/PlayerScript): Fix adding XP on quest completion and other overlooks. (#18728)

* fix(Core/PlayerScript): Fix adding XP on quest completion.

* Fix other overlooks.
This commit is contained in:
Anton Popovichenko
2024-04-12 17:12:57 +02:00
committed by GitHub
parent 0e1888ac92
commit c796d9291e
6 changed files with 13 additions and 7 deletions

View File

@@ -79,4 +79,10 @@ inline bool ReturnValidBool(Optional<bool> ret, bool need = false)
for (auto const& script : ScriptRegistry<scriptType>::EnabledHooks[hookType]) { if (action) return false; } \
return true;
#define CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(scriptType, hookType, action) \
if (ScriptRegistry<scriptType>::EnabledHooks[hookType].empty()) \
return false; \
for (auto const& script : ScriptRegistry<scriptType>::EnabledHooks[hookType]) { if (action) return false; } \
return false;
#endif // _SCRIPT_MGR_MACRO_H_