Bazaar developer reference

CvPlayerAI::GreatMerchantWantsCash()

Defined in
CvPlayerAI.cpp, line 1440
Class
CvPlayerAI
Hook name
CivHooks::CvPlayerAI_GreatMerchantWantsCash

Hooks

static bool BeforeCvPlayerAI_GreatMerchantWantsCash(CvPlayerAI* self, bool& result);static void AfterCvPlayerAI_GreatMerchantWantsCash(CvPlayerAI* self, bool& result);static bool ReplaceCvPlayerAI_GreatMerchantWantsCash(bool (*original)(CvPlayerAI*), CvPlayerAI* self);CivRegisterBefore<CivHooks::CvPlayerAI_GreatMerchantWantsCash>(host, &BeforeCvPlayerAI_GreatMerchantWantsCash);CivRegisterAfter<CivHooks::CvPlayerAI_GreatMerchantWantsCash>(host, &AfterCvPlayerAI_GreatMerchantWantsCash);CivRegisterReplace<CivHooks::CvPlayerAI_GreatMerchantWantsCash>(host, &ReplaceCvPlayerAI_GreatMerchantWantsCash);

Code

1440bool CvPlayerAI::GreatMerchantWantsCash()1441{1442	// slewis - everybody wants cash . . .1443	// slewis - . . . except Venice. Venice wants to buy city states, unless it already has enough cities, then it doesn't want city states.1444	bool bIsVenice = GetPlayerTraits()->IsNoAnnexing();1445	if (bIsVenice)1446	{1447		if (getNumCities() >= 4)1448		{1449			return true;1450		}1451		else1452		{1453			return false;1454		}1455	}14561457	return true;1458}

Calls

Called by