Hooks
static bool BeforeCvDllNetMessageHandler_ResponseLeagueProposeEnact(CvDllNetMessageHandler* self, LeagueTypes eLeague, ResolutionTypes eResolution, PlayerTypes eProposer, int iChoice);static void AfterCvDllNetMessageHandler_ResponseLeagueProposeEnact(CvDllNetMessageHandler* self, LeagueTypes eLeague, ResolutionTypes eResolution, PlayerTypes eProposer, int iChoice);static void ReplaceCvDllNetMessageHandler_ResponseLeagueProposeEnact(void (*original)(CvDllNetMessageHandler*, LeagueTypes, ResolutionTypes, PlayerTypes, int), CvDllNetMessageHandler* self, LeagueTypes eLeague, ResolutionTypes eResolution, PlayerTypes eProposer, int iChoice);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueProposeEnact::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetMessageHandler_ResponseLeagueProposeEnact);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueProposeEnact::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetMessageHandler_ResponseLeagueProposeEnact);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueProposeEnact::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetMessageHandler_ResponseLeagueProposeEnact);
Code
483void CvDllNetMessageHandler::ResponseLeagueProposeEnact(LeagueTypes eLeague, ResolutionTypes eResolution, PlayerTypes eProposer, int iChoice)484{485 CvAssertMsg(eLeague != NO_LEAGUE, "eLeague invalid");486 CvAssertMsg(eResolution != NO_RESOLUTION, "eResolution invalid");487 CvAssertMsg(eProposer != NO_PLAYER, "eProposer invalid");488489 CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetLeague(eLeague);490 CvAssertMsg(pLeague->CanProposeEnact(eResolution, eProposer, iChoice), "eProposer not allowed to enact Resolution. Please send Anton your save file and version.");491 pLeague->DoProposeEnact(eResolution, eProposer, iChoice);492}