Bazaar developer reference

CustomMods::eventTestAny(const char *, CvLuaArgsHandle &)

Defined in
CustomMods.cpp, line 148
Class
CustomMods
Hook name
CivHooks::CustomMods_eventTestAny

Hooks

static bool BeforeCustomMods_eventTestAny(CustomMods* self, const char* szName, CvLuaArgsHandle & args, int& result);static void AfterCustomMods_eventTestAny(CustomMods* self, const char* szName, CvLuaArgsHandle & args, int& result);static int ReplaceCustomMods_eventTestAny(int (*original)(CustomMods*, const char*, CvLuaArgsHandle &), CustomMods* self, const char* szName, CvLuaArgsHandle & args);CivRegisterBefore<CivHooks::CustomMods_eventTestAny>(host, &BeforeCustomMods_eventTestAny);CivRegisterAfter<CivHooks::CustomMods_eventTestAny>(host, &AfterCustomMods_eventTestAny);CivRegisterReplace<CivHooks::CustomMods_eventTestAny>(host, &ReplaceCustomMods_eventTestAny);

Code

148int CustomMods::eventTestAny(const char* szName, CvLuaArgsHandle &args) {149	ICvEngineScriptSystem1* pkScriptSystem = gDLL->GetScriptSystem();150	if (pkScriptSystem) {151		bool bResult = false;152		if (LuaSupport::CallTestAny(pkScriptSystem, szName, args.get(), bResult)) {153			if (bResult) {154				return GAMEEVENTRETURN_TRUE;155			} else {156				return GAMEEVENTRETURN_FALSE;157			}158		}159	}160161	return GAMEEVENTRETURN_NONE;162}

Calls

Called by