Bazaar developer reference

CorrectWeight(int)

Defined in
CvBuilderTaskingAI.cpp, line 634
Hook name
CivHooks::CorrectWeight

Hooks

static bool BeforeCorrectWeight(int iWeight, int& result);static void AfterCorrectWeight(int iWeight, int& result);static int ReplaceCorrectWeight(int (*original)(int), int iWeight);CivRegisterBefore<CivHooks::CorrectWeight>(host, &BeforeCorrectWeight);CivRegisterAfter<CivHooks::CorrectWeight>(host, &AfterCorrectWeight);CivRegisterReplace<CivHooks::CorrectWeight>(host, &ReplaceCorrectWeight);

Code

634int CorrectWeight(int iWeight)635{636	if(iWeight < -1000)637	{638		return MAX_INT;639	}640	else641	{642		return iWeight;643	}644}

Called by