Bazaar developer reference

CvPlayer::getHandicapInfo() const

Defined in
CvPlayer.cpp, line 18448
Class
CvPlayer
Hook name
CivHooks::CvPlayer_getHandicapInfo

Hooks

static bool BeforeCvPlayer_getHandicapInfo(const CvPlayer* self, CvHandicapInfo*& result);static void AfterCvPlayer_getHandicapInfo(const CvPlayer* self, CvHandicapInfo*& result);static CvHandicapInfo& ReplaceCvPlayer_getHandicapInfo(CvHandicapInfo& (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_getHandicapInfo>(host, &BeforeCvPlayer_getHandicapInfo);CivRegisterAfter<CivHooks::CvPlayer_getHandicapInfo>(host, &AfterCvPlayer_getHandicapInfo);CivRegisterReplace<CivHooks::CvPlayer_getHandicapInfo>(host, &ReplaceCvPlayer_getHandicapInfo);

Code

18448CvHandicapInfo& CvPlayer::getHandicapInfo() const18449{18450	CvHandicapInfo* pkHandicapInfo = GC.getHandicapInfo(getHandicapType());18451	if(pkHandicapInfo == NULL)18452	{18453		const char* szError = "ERROR: Player does not contain valid handicap!!";18454		GC.LogMessage(szError);18455		CvAssertMsg(false, szError);18456	}1845718458#pragma warning ( push )18459#pragma warning ( disable : 6011 ) // Dereferencing NULL pointer18460	return *pkHandicapInfo;18461#pragma warning ( pop )18462}

Calls

Called by