Bazaar developer reference

CvDllNetMessageHandler::ResponseLeagueVoteAbstain(LeagueTypes, PlayerTypes, int)

Defined in
CvDllNetMessageHandler.cpp, line 473
Class
CvDllNetMessageHandler
Hook name
CivHooks::CvDllNetMessageHandler_ResponseLeagueVoteAbstain

Hooks

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

Code

473void CvDllNetMessageHandler::ResponseLeagueVoteAbstain(LeagueTypes eLeague, PlayerTypes eVoter, int iNumVotes)474{475	CvAssertMsg(eLeague != NO_LEAGUE, "eLeague invalid");476	CvAssertMsg(eVoter != NO_PLAYER, "eVoter invalid");477478	CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetLeague(eLeague);479	CvAssertMsg(pLeague->CanVote(eVoter), "eVoter not allowed to vote. Please send Anton your save file and version.");480	pLeague->DoVoteAbstain(eVoter, iNumVotes);481}

Calls