Bazaar developer reference

CvUnit::maxXPValue() const

Defined in
CvUnit.cpp, line 13967
Class
CvUnit
Hook name
CivHooks::CvUnit_maxXPValue

Hooks

static bool BeforeCvUnit_maxXPValue(const CvUnit* self, int& result);static void AfterCvUnit_maxXPValue(const CvUnit* self, int& result);static int ReplaceCvUnit_maxXPValue(int (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_maxXPValue>(host, &BeforeCvUnit_maxXPValue);CivRegisterAfter<CivHooks::CvUnit_maxXPValue>(host, &AfterCvUnit_maxXPValue);CivRegisterReplace<CivHooks::CvUnit_maxXPValue>(host, &ReplaceCvUnit_maxXPValue);

Code

13967int CvUnit::maxXPValue() const13968{13969	VALIDATE_OBJECT13970	int iMaxValue;1397113972	iMaxValue = INT_MAX;1397313974	if(isBarbarian())13975	{13976		iMaxValue = std::min(iMaxValue, GC.getBARBARIAN_MAX_XP_VALUE());13977	}1397813979	return iMaxValue;13980}

Calls

Called by