Bazaar developer reference

CvPlayer::SetMinorFriendshipAnchorMod(int)

Defined in
CvPlayer.cpp, line 16052
Class
CvPlayer
Hook name
CivHooks::CvPlayer_SetMinorFriendshipAnchorMod

Hooks

static bool BeforeCvPlayer_SetMinorFriendshipAnchorMod(CvPlayer* self, int iValue);static void AfterCvPlayer_SetMinorFriendshipAnchorMod(CvPlayer* self, int iValue);static void ReplaceCvPlayer_SetMinorFriendshipAnchorMod(void (*original)(CvPlayer*, int), CvPlayer* self, int iValue);CivRegisterBefore<CivHooks::CvPlayer_SetMinorFriendshipAnchorMod>(host, &BeforeCvPlayer_SetMinorFriendshipAnchorMod);CivRegisterAfter<CivHooks::CvPlayer_SetMinorFriendshipAnchorMod>(host, &AfterCvPlayer_SetMinorFriendshipAnchorMod);CivRegisterReplace<CivHooks::CvPlayer_SetMinorFriendshipAnchorMod>(host, &ReplaceCvPlayer_SetMinorFriendshipAnchorMod);

Code

16052void CvPlayer::SetMinorFriendshipAnchorMod(int iValue)16053{16054	if (iValue < GC.getMINOR_FRIENDSHIP_AT_WAR())16055	{16056		CvAssertMsg(false, "Minor friendship anchor mod should not be lower than the War friendship level. Please send Anton your save file and version.");16057		m_iMinorFriendshipMinimum = GC.getMINOR_FRIENDSHIP_AT_WAR();16058		return;16059	}1606016061	m_iMinorFriendshipMinimum = iValue;16062}

Calls

Called by