CustomMods::eventHook(const char *, const char *, ...)
- Defined in
- CustomMods.cpp, line 16
- Class
- CustomMods
- Not a hook point
- variadic
Code
15// I would rather have all of this shit here (where it need never be read more than once) to make the calling of events cleaner in the main code16int CustomMods::eventHook(const char* szName, const char* p, ...) {17 CvLuaArgsHandle args;1819 va_list vl;20 va_start(vl, p);2122 for (const char* it = p; *it; ++it) {23 if (*it == 'b') {24 // It's a boolean25 args->Push(va_arg(vl, bool));26 } else if (*it == 'i') {27 // It's an int28 args->Push(va_arg(vl, int));29 } else {30 // Assume it's a string (char *)31 char* s = va_arg(vl, char*);32 args->Push(s, strlen(s));33 break;34 }35 }3637 va_end(vl);3839 return eventHook(szName, args);40}
Calls
- CustomMods::eventHook(const char *, CvLuaArgsHandle &)
- CvLuaArgsHandle::CvLuaArgsHandle()
- CvLuaArgsHandle::operator->() const
ICvEngineScriptSystemArgs1::PushICvEngineScriptSystemArgs1::PushICvEngineScriptSystemArgs1::Pushstrlen
Called by
94 functions in 19 files
- CvBarbarians::DoBarbCampCleared(CvPlot *, PlayerTypes)
- CvBarbarians::DoCamps()
- CvBarbarians::DoSpawnBarbarianUnit(CvPlot *, bool, bool)
- CvBeliefHelpers::ConvertBarbarianUnit(const CvUnit *, UnitHandle)
- CvCity::BuyPlot(int, int)
- CvCity::DoJONSCultureLevelIncrease()
- CvCity::Purchase(UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvCity::init(int, PlayerTypes, int, int, bool, bool, ReligionTypes, const char *)
- CvCity::popOrder(int, bool, bool)
- CvDiplomacyAI::WantAILeaderMessage(DiploMessageTypes, PlayerTypes, DiploUIStateTypes, LeaderheadAnimationTypes, int)
- CvDllNetMessageHandler::ResponseSellBuilding(PlayerTypes, int, BuildingTypes)
- CvCityEspionage::SetSpyResult(PlayerTypes, int, int)
- CvEspionageSpy::SetSpyState(PlayerTypes, int, CvSpyState)
- CvGame::DoFromUIDiploEvent(FromUIDiploEventTypes, PlayerTypes, int, int)
- CvGame::init2()
- CvMap::Read(FDataStream &)
- CvMinorCivAI::DoBuyout(PlayerTypes, bool)
- CvMinorCivAI::DoChangeProtectionFromMajor(PlayerTypes, bool, bool)
- CvMinorCivAI::DoFirstContactWithMajor(TeamTypes, bool)
- CvMinorCivAI::DoFriendshipChangeEffects(PlayerTypes, int, int, bool, bool)
- CvMinorCivAI::DoGoldGiftFromMajor(PlayerTypes, int)
- CvMinorCivAI::DoMajorBullyGold(PlayerTypes, int)
- CvMinorCivAI::DoMajorBullyUnit(PlayerTypes, UnitTypes)
- CvMinorCivAI::DoTileImprovementGiftFromMajor(PlayerTypes, int, int)
- CvMinorCivAI::DoUnitGiftFromMajor(PlayerTypes, CvUnit *, bool)
- CvMinorCivQuest::DoCancelQuest()
- CvMinorCivQuest::DoFinishQuest()
- CvMinorCivQuest::DoStartQuest(int)
- CvMinorCivQuest::DoStartQuestUsingExistingData(CvMinorCivQuest *)
- CvPlayer::DoGreatPersonExpended(UnitTypes, CvUnit *)
- CvPlayer::DoLiberatePlayer(PlayerTypes, int)
- CvPlayer::acquireCity(CvCity *, bool, bool, bool)
- CvPlayer::changeGoldenAgeTurns(int)
- CvPlayer::findNewCapital()
- CvPlayer::found(int, int, ReligionTypes)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvPlayer::setTurnActive(bool, bool)
- CvPlot::SetContinentType(const char)
- CvPlot::SetImprovementPillaged(bool, bool)
- CvPlot::SetRoutePillaged(bool, bool)
- CvPlot::setArea(int)
- CvPlot::setFeatureType(FeatureTypes, int)
- CvPlot::setImprovementType(ImprovementTypes, PlayerTypes)
- CvPlot::setLandmass(int)
- CvPlot::setNEOfRiver(bool, FlowDirectionTypes)
- CvPlot::setNWOfRiver(bool, FlowDirectionTypes)
- CvPlot::setOwner(PlayerTypes, int, bool, bool)
- CvPlot::setPlotCity(CvCity *)
- CvPlot::setPlotType(PlotTypes, bool, bool, bool)
- CvPlot::setRevealed(TeamTypes, bool, CvUnit *, bool, TeamTypes)
- CvPlot::setRouteType(RouteTypes)
- CvPlot::setTerrainType(TerrainTypes, bool, bool)
- CvPlot::setWOfRiver(bool, FlowDirectionTypes)
- CvGameReligions::AddReformationBelief(PlayerTypes, ReligionTypes, BeliefTypes)
- CvGameReligions::EnhanceReligion(PlayerTypes, ReligionTypes, BeliefTypes, BeliefTypes, bool)
- CvGameReligions::FoundPantheon(PlayerTypes, BeliefTypes)
- CvGameReligions::FoundReligion(PlayerTypes, ReligionTypes, const char *, BeliefTypes, BeliefTypes, BeliefTypes, BeliefTypes, CvCity *)
- CvCombatInfo::setCity(BattleUnitTypes, CvCity *)
- CvCombatInfo::setUnit(BattleUnitTypes, CvUnit *)
- CvTeam::DoDeclareWar(PlayerTypes, bool, TeamTypes, bool, bool)
- CvTeam::DoMakePeace(PlayerTypes, bool, TeamTypes, bool, bool)
- CvTeam::SetCurrentEra(EraTypes)
- CvTeam::testCircumnavigated()
- CvPlayerTrade::PlunderTradeRoute(int, CvUnit *)
- CvPlayerTraits::AddUniqueLuxuries(CvCity *)
- CvPlayerTraits::ConvertBarbarianCamp(CvUnit *, CvPlot *)
- CvPlayerTraits::ConvertBarbarianNavalUnit(CvUnit *, UnitHandle)
- CvUnit::DoUpgradeTo(UnitTypes, bool)
- CvUnit::build(BuildTypes)
- CvUnit::changeExperienceTimes100(int, int, bool, bool, bool)
- CvUnit::found()
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- 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::GenerateAirCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateAirSweepCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateMeleeCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateNuclearCombatInfo(CvUnit &, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateNuclearExplosionDamage(CvPlot *, int, CvUnit *, CvCombatMemberEntry *, int *, int)
- CvUnitCombat::GenerateRangedCombatInfo(CvCity &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateRangedCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::ParadropIntercept(CvUnit &, CvPlot &)
- CvUnitCombat::ResolveAirSweep(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveAirUnitVsCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveCityMeleeCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveMeleeCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveNuclearCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveRangedCityVsUnitCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveRangedUnitVsCombat(const CvCombatInfo &, uint)
- CvLeague::NotifyProposalResult(CvEnactProposal *)
- CvLeague::NotifyProposalResult(CvRepealProposal *)