Bazaar developer reference

CvPlayer::changeHalfSpecialistFoodCount(int)

Defined in
CvPlayer.cpp, line 15736
Class
CvPlayer
Hook name
CivHooks::CvPlayer_changeHalfSpecialistFoodCount

Hooks

static bool BeforeCvPlayer_changeHalfSpecialistFoodCount(CvPlayer* self, int iChange);static void AfterCvPlayer_changeHalfSpecialistFoodCount(CvPlayer* self, int iChange);static void ReplaceCvPlayer_changeHalfSpecialistFoodCount(void (*original)(CvPlayer*, int), CvPlayer* self, int iChange);CivRegisterBefore<CivHooks::CvPlayer_changeHalfSpecialistFoodCount>(host, &BeforeCvPlayer_changeHalfSpecialistFoodCount);CivRegisterAfter<CivHooks::CvPlayer_changeHalfSpecialistFoodCount>(host, &AfterCvPlayer_changeHalfSpecialistFoodCount);CivRegisterReplace<CivHooks::CvPlayer_changeHalfSpecialistFoodCount>(host, &ReplaceCvPlayer_changeHalfSpecialistFoodCount);

Code

15736void CvPlayer::changeHalfSpecialistFoodCount(int iChange)15737{15738	if(iChange != 0)15739	{15740		m_iHalfSpecialistFoodCount = (m_iHalfSpecialistFoodCount + iChange);15741		CvAssert(getHalfSpecialistFoodCount() >= 0);15742	}15743}

Calls

Called by