LuaSupport::CallHook(ICvEngineScriptSystem1 *, const char *, ICvEngineScriptSystemArgs1 *, bool &)
- Defined in
- Lua/CvLuaSupport.cpp, line 72
- Hook name
CivHooks::LuaSupport_CallHook
Hooks
static bool BeforeLuaSupport_CallHook(ICvEngineScriptSystem1* pkScriptSystem, const char* szName, ICvEngineScriptSystemArgs1* args, bool& value, bool& result);static void AfterLuaSupport_CallHook(ICvEngineScriptSystem1* pkScriptSystem, const char* szName, ICvEngineScriptSystemArgs1* args, bool& value, bool& result);static bool ReplaceLuaSupport_CallHook(bool (*original)(ICvEngineScriptSystem1*, const char*, ICvEngineScriptSystemArgs1*, bool&), ICvEngineScriptSystem1* pkScriptSystem, const char* szName, ICvEngineScriptSystemArgs1* args, bool& value);CivRegisterBefore<CivHooks::LuaSupport_CallHook>(host, &BeforeLuaSupport_CallHook);CivRegisterAfter<CivHooks::LuaSupport_CallHook>(host, &AfterLuaSupport_CallHook);CivRegisterReplace<CivHooks::LuaSupport_CallHook>(host, &ReplaceLuaSupport_CallHook);
Code
72bool LuaSupport::CallHook(ICvEngineScriptSystem1* pkScriptSystem, const char* szName, ICvEngineScriptSystemArgs1* args, bool& value)73{74 // Must release our lock so that if the main thread has the Lua lock and is waiting for the Game Core lock, we don't freeze75 bool bHadLock = gDLL->HasGameCoreLock();76 if(bHadLock)77 gDLL->ReleaseGameCoreLock();78 bool bResult = pkScriptSystem->CallHook(szName, args, value);79 if(bHadLock)80 gDLL->GetGameCoreLock();81 return bResult;82}
Calls
- CvGlobals::getDLLIFace()
ICvEngineScriptSystem1::CallHookICvEngineUtility1::GetGameCoreLockICvEngineUtility1::HasGameCoreLockICvEngineUtility1::ReleaseGameCoreLock
Called by
46 functions in 17 files
- CustomMods::eventHook(const char *, CvLuaArgsHandle &)
- CvCity::BuyPlot(int, int)
- CvCity::DoJONSCultureLevelIncrease()
- CvCity::Purchase(UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvCity::popOrder(int, bool, bool)
- CvCity::setPopulation(int, bool)
- CvDllNetMessageHandler::ResponseSellBuilding(PlayerTypes, int, BuildingTypes)
- CvGame::DoFromUIDiploEvent(FromUIDiploEventTypes, PlayerTypes, int, int)
- CvGame::testVictory()
- CvGame::update()
- CvHomelandAI::ExecuteExplorerMoves()
- CvMinorCivAI::DoFriendshipChangeEffects(PlayerTypes, int, int, bool, bool)
- CvMinorCivAI::SetAlly(PlayerTypes)
- CvPlayer::DoGreatPersonExpended(UnitTypes, CvUnit *)
- CvPlayer::DoUnitKilledCombat(CvUnit *, PlayerTypes, UnitTypes)
- CvPlayer::GatherPerTurnReplayStats(int)
- CvPlayer::acquireCity(CvCity *, bool, bool, bool)
- CvPlayer::doAdoptPolicy(PolicyTypes)
- CvPlayer::doTurn()
- CvPlayer::found(int, int, ReligionTypes)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvPlayerAI::AI_unitUpdate()
- CvPlot::changeBuildProgress(BuildTypes, int, PlayerTypes)
- CvPlot::setRevealed(TeamTypes, bool, CvUnit *, bool, TeamTypes)
- CvPolicyAI::DoChooseIdeology(CvPlayer *)
- CvPlayerPolicies::DoSwitchIdeologies(PolicyBranchTypes)
- CvPlayerPolicies::DoUnlockPolicyBranch(PolicyBranchTypes)
- CvCityReligions::CityConvertsReligion(ReligionTypes, ReligionTypes, PlayerTypes)
- CvGameReligions::EnhanceReligion(PlayerTypes, ReligionTypes, BeliefTypes, BeliefTypes, bool)
- CvGameReligions::FoundPantheon(PlayerTypes, BeliefTypes)
- CvGameReligions::FoundReligion(PlayerTypes, ReligionTypes, const char *, BeliefTypes, BeliefTypes, BeliefTypes, BeliefTypes, CvCity *)
- CvTeam::DoDeclareWar(PlayerTypes, bool, TeamTypes, bool, bool)
- CvTeam::DoMakePeace(PlayerTypes, bool, TeamTypes, bool, bool)
- CvTeam::SetCurrentEra(EraTypes)
- CvTeam::meet(TeamTypes, bool)
- CvTeam::processTech(TechTypes, int)
- CvTeam::testCircumnavigated()
- CvTeamTechs::SetHasTech(TechTypes, bool)
- CvUnit::DoUpgradeTo(UnitTypes, bool)
- CvUnit::kill(bool, PlayerTypes)
- CvUnit::paradrop(int, int)
- CvUnit::promote(PromotionTypes, int)
- CvUnit::rebase(int, int)
- CvUnit::setXY(int, int, bool, bool, bool, bool, bool)
- CvUnitCombat::GenerateNuclearCombatInfo(CvUnit &, CvPlot &, CvCombatInfo *)
- CvLuaGame::lSpewTestEvents(lua_State *)