Bazaar developer reference

CvLeagueAI::LogVoteChoiceConsidered(CvRepealProposal *, int, int)

Defined in
CvVotingClasses.cpp, line 9917
Class
CvLeagueAI
Hook name
CivHooks::CvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int

Hooks

static bool BeforeCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int(CvLeagueAI* self, CvRepealProposal* pProposal, int iChoice, int iScore);static void AfterCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int(CvLeagueAI* self, CvRepealProposal* pProposal, int iChoice, int iScore);static void ReplaceCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int(void (*original)(CvLeagueAI*, CvRepealProposal*, int, int), CvLeagueAI* self, CvRepealProposal* pProposal, int iChoice, int iScore);CivRegisterBefore<CivHooks::CvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int>(host, &BeforeCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int);CivRegisterAfter<CivHooks::CvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int>(host, &AfterCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int);CivRegisterReplace<CivHooks::CvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int>(host, &ReplaceCvLeagueAI_LogVoteChoiceConsidered_with_CvRepealProposal_int_int);

Code

9917void CvLeagueAI::LogVoteChoiceConsidered(CvRepealProposal* pProposal, int iChoice, int iScore)9918{9919	CvAssert(pProposal != NULL);9920	if (!(pProposal != NULL)) return;9921	CvString sMessage = "";99229923	sMessage += ",";9924	sMessage += GetPlayer()->getCivilizationShortDescription();9925	sMessage += ",- - -";9926	sMessage += ",Evaluating for Delegates";99279928	sMessage += ",";9929	CvAssert(pProposal != NULL);9930	if (pProposal != NULL)9931	{9932		sMessage += pProposal->GetProposalName(/*bForLogging*/ true);9933	}99349935	sMessage += ",";9936	CvAssert(iChoice != LeagueHelpers::CHOICE_NONE);9937	if (iChoice != LeagueHelpers::CHOICE_NONE)9938	{9939		sMessage += LeagueHelpers::GetTextForChoice(pProposal->GetRepealDecision()->GetType(), iChoice);9940	}99419942	sMessage += ",";9943	CvString sTemp;9944	sTemp.Format("%d", iScore);9945	sMessage += sTemp;99469947	GC.getGame().GetGameLeagues()->LogLeagueMessage(sMessage);9948}

Calls

Called by