Bazaar developer reference

CvPlayer::ChangeEnablesSSPartPurchaseCount(int)

Defined in
CvPlayer.cpp, line 15854
Class
CvPlayer
Hook name
CivHooks::CvPlayer_ChangeEnablesSSPartPurchaseCount

Hooks

static bool BeforeCvPlayer_ChangeEnablesSSPartPurchaseCount(CvPlayer* self, int iChange);static void AfterCvPlayer_ChangeEnablesSSPartPurchaseCount(CvPlayer* self, int iChange);static void ReplaceCvPlayer_ChangeEnablesSSPartPurchaseCount(void (*original)(CvPlayer*, int), CvPlayer* self, int iChange);CivRegisterBefore<CivHooks::CvPlayer_ChangeEnablesSSPartPurchaseCount>(host, &BeforeCvPlayer_ChangeEnablesSSPartPurchaseCount);CivRegisterAfter<CivHooks::CvPlayer_ChangeEnablesSSPartPurchaseCount>(host, &AfterCvPlayer_ChangeEnablesSSPartPurchaseCount);CivRegisterReplace<CivHooks::CvPlayer_ChangeEnablesSSPartPurchaseCount>(host, &ReplaceCvPlayer_ChangeEnablesSSPartPurchaseCount);

Code

15854void CvPlayer::ChangeEnablesSSPartPurchaseCount(int iChange)15855{15856	if (iChange != 0)15857	{15858		m_iEnablesSSPartPurchaseCount = m_iEnablesSSPartPurchaseCount + iChange;15859		CvAssert(GetEnablesSSPartPurchaseCount() >= 0);15860	}15861}

Called by