Bazaar developer reference

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

Defined in
CustomMods.cpp, line 120
Class
CustomMods
Hook name
CivHooks::CustomMods_eventHook

Hooks

static bool BeforeCustomMods_eventHook(CustomMods* self, const char* szName, CvLuaArgsHandle & args, int& result);static void AfterCustomMods_eventHook(CustomMods* self, const char* szName, CvLuaArgsHandle & args, int& result);static int ReplaceCustomMods_eventHook(int (*original)(CustomMods*, const char*, CvLuaArgsHandle &), CustomMods* self, const char* szName, CvLuaArgsHandle & args);CivRegisterBefore<CivHooks::CustomMods_eventHook>(host, &BeforeCustomMods_eventHook);CivRegisterAfter<CivHooks::CustomMods_eventHook>(host, &AfterCustomMods_eventHook);CivRegisterReplace<CivHooks::CustomMods_eventHook>(host, &ReplaceCustomMods_eventHook);

Code

120int CustomMods::eventHook(const char* szName, CvLuaArgsHandle &args) {121	ICvEngineScriptSystem1* pkScriptSystem = gDLL->GetScriptSystem();122	if (pkScriptSystem) {123		bool bResult;124		if (LuaSupport::CallHook(pkScriptSystem, szName, args.get(), bResult)) {125			return GAMEEVENTRETURN_HOOK;126		}127	}128129	return GAMEEVENTRETURN_NONE;130}

Calls

Called by