Bazaar developer reference

CvDllNetMessageHandler::ResponseLeagueVoteEnact(LeagueTypes, int, PlayerTypes, int, int)

Defined in
CvDllNetMessageHandler.cpp, line 453
Class
CvDllNetMessageHandler
Hook name
CivHooks::CvDllNetMessageHandler_ResponseLeagueVoteEnact

Hooks

static bool BeforeCvDllNetMessageHandler_ResponseLeagueVoteEnact(CvDllNetMessageHandler* self, LeagueTypes eLeague, int iResolutionID, PlayerTypes eVoter, int iNumVotes, int iChoice);static void AfterCvDllNetMessageHandler_ResponseLeagueVoteEnact(CvDllNetMessageHandler* self, LeagueTypes eLeague, int iResolutionID, PlayerTypes eVoter, int iNumVotes, int iChoice);static void ReplaceCvDllNetMessageHandler_ResponseLeagueVoteEnact(void (*original)(CvDllNetMessageHandler*, LeagueTypes, int, PlayerTypes, int, int), CvDllNetMessageHandler* self, LeagueTypes eLeague, int iResolutionID, PlayerTypes eVoter, int iNumVotes, int iChoice);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueVoteEnact::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetMessageHandler_ResponseLeagueVoteEnact);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueVoteEnact::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetMessageHandler_ResponseLeagueVoteEnact);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseLeagueVoteEnact::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetMessageHandler_ResponseLeagueVoteEnact);

Code

453void CvDllNetMessageHandler::ResponseLeagueVoteEnact(LeagueTypes eLeague, int iResolutionID, PlayerTypes eVoter, int iNumVotes, int iChoice)454{455	CvAssertMsg(eLeague != NO_LEAGUE, "eLeague invalid");456	CvAssertMsg(eVoter != NO_PLAYER, "eVoter invalid");457458	CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetLeague(eLeague);459	CvAssertMsg(pLeague->CanVote(eVoter), "eVoter not allowed to vote. Please send Anton your save file and version.");460	pLeague->DoVoteEnact(iResolutionID, eVoter, iNumVotes, iChoice);461}

Calls