//------------------------------------------------------------------------------
void CvDllNetMessageHandler::ResponseLeagueVoteEnact(LeagueTypes eLeague, int iResolutionID, PlayerTypes eVoter, int iNumVotes, int iChoice)
{
	CvAssertMsg(eLeague != NO_LEAGUE, "eLeague invalid");
	CvAssertMsg(eVoter != NO_PLAYER, "eVoter invalid");

	CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetLeague(eLeague);
	CvAssertMsg(pLeague->CanVote(eVoter), "eVoter not allowed to vote. Please send Anton your save file and version.");
	pLeague->DoVoteEnact(iResolutionID, eVoter, iNumVotes, iChoice);
}
예제 #2
0
//------------------------------------------------------------------------------
//void DoVoteEnact(int iProposal, PlayerTypes iPlayer, int iNumVotes, int iChoice);
int CvLuaLeague::lDoVoteEnact(lua_State* L)
{
	CvLeague* pLeague = GetInstance(L);
	const int iProposal = lua_tointeger(L, 2);
	const PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 3);
	const int iNumVotes = lua_tointeger(L, 4);
	const int iChoice = lua_tointeger(L, 5);

	pLeague->DoVoteEnact(iProposal, ePlayer, iNumVotes, iChoice);
	return 0;
}