Bazaar developer reference

CvUnitPromotions::Read(FDataStream &)

Defined in
CvPromotionClasses.cpp, line 2188
Class
CvUnitPromotions
Hook name
CivHooks::CvUnitPromotions_Read

Hooks

static bool BeforeCvUnitPromotions_Read(CvUnitPromotions* self, FDataStream& kStream);static void AfterCvUnitPromotions_Read(CvUnitPromotions* self, FDataStream& kStream);static void ReplaceCvUnitPromotions_Read(void (*original)(CvUnitPromotions*, FDataStream&), CvUnitPromotions* self, FDataStream& kStream);CivRegisterBefore<CivHooks::CvUnitPromotions_Read>(host, &BeforeCvUnitPromotions_Read);CivRegisterAfter<CivHooks::CvUnitPromotions_Read>(host, &AfterCvUnitPromotions_Read);CivRegisterReplace<CivHooks::CvUnitPromotions_Read>(host, &ReplaceCvUnitPromotions_Read);

Code

2187/// Serialization read2188void CvUnitPromotions::Read(FDataStream& kStream)2189{2190	Reset();21912192	// Version number to maintain backwards compatibility2193	uint uiVersion;2194	kStream >> uiVersion;2195	MOD_SERIALIZE_INIT_READ(kStream);21962197	// Read number of promotions2198	int iNumPromotions;2199	kStream >> iNumPromotions;2200	CvAssertMsg(m_pPromotions != NULL && m_pPromotions->GetNumPromotions() > 0, "Number of promotions to serialize is expected to greater than 0");22012202	PromotionArrayHelpers::Read(kStream, m_kHasPromotion);2203}

Calls

Called by