Valkrionn
The Hamster King
CvUnit. In CvPlayer it is mostly just checking for Technologies and other things which are a quick way to eliminate the check for a lot of orders and make things faster. Once that has been checked, then the unit itself is checked (pretty sure you'll find that the CvPlayer one is called at the start of the CvUnit one actually)
Alright, thought I had it working (code compiled, at least


Error said:Index is -1 inside function
Uploaded a folder containing the three edited DLL files (CvInfos.h, .cpp, and CvUnit.cpp) and the schema (And the compiled DLL, though I'm not sure why... Can't use it without RifE, unlike the rest.

All of the code can be found by searching for 'Workers Paradise', same name as the folder.
Also, I'm sure this code chunk could be optimized... Not actually sure it works yet because of this error.

Code:
/*************************************************************************************************/
/** Workers Paradise 01/08/10 **/
/** **/
/** Allows promotions to affect build orders **/
/*************************************************************************************************/
bool bValid = true;
if (!(m_pUnitInfo->getBuilds(eBuild)))
{
bValid = false;
for (int iJ=0;iJ<GC.getNumPromotionInfos();iJ++)
{
if ((isHasPromotion((PromotionTypes)iJ)) && (GC.getPromotionInfo((PromotionTypes)iJ).getNumPromotionBuilds()>0))
{
for (int iI=0;iI<GC.getNumBuildInfos();iI++)
{
if (GC.getPromotionInfo((PromotionTypes)iJ).getPromotionBuilds(iI) == eBuild)
{
bValid = true;
}
}
}
}
if (!bValid)
{
return false;
}
}
/*************************************************************************************************/
/** Workers Paradise END **/
/*************************************************************************************************/
Code:
if (!(m_pUnitInfo->getBuilds(eBuild)))
{
return false;
}