Bazaar developer reference

CvGoodyHuts::IsCanPlayerReceiveGoody(PlayerTypes, GoodyTypes)

Defined in
CvGoodyHuts.cpp, line 36
Class
CvGoodyHuts
Hook name
CivHooks::CvGoodyHuts_IsCanPlayerReceiveGoody

Hooks

static bool BeforeCvGoodyHuts_IsCanPlayerReceiveGoody(PlayerTypes ePlayer, GoodyTypes eGoody, bool& result);static void AfterCvGoodyHuts_IsCanPlayerReceiveGoody(PlayerTypes ePlayer, GoodyTypes eGoody, bool& result);static bool ReplaceCvGoodyHuts_IsCanPlayerReceiveGoody(bool (*original)(PlayerTypes, GoodyTypes), PlayerTypes ePlayer, GoodyTypes eGoody);CivRegisterBefore<CivHooks::CvGoodyHuts_IsCanPlayerReceiveGoody>(host, &BeforeCvGoodyHuts_IsCanPlayerReceiveGoody);CivRegisterAfter<CivHooks::CvGoodyHuts_IsCanPlayerReceiveGoody>(host, &AfterCvGoodyHuts_IsCanPlayerReceiveGoody);CivRegisterReplace<CivHooks::CvGoodyHuts_IsCanPlayerReceiveGoody>(host, &ReplaceCvGoodyHuts_IsCanPlayerReceiveGoody);

Code

35/// Are we allowed to get this Goody right now?36bool CvGoodyHuts::IsCanPlayerReceiveGoody(PlayerTypes ePlayer, GoodyTypes eGoody)37{38	if (IsHasPlayerReceivedGoodyLately(ePlayer, eGoody))39	{40		return false;41	}4243	return true;44}

Calls

Called by