示例#1
0
int XCampObjHero3::Serialize( XArchive& ar )
{
	XLOCK_OBJ;
	XCampObjBase::Serialize( ar );
	int sizeOld = ar.size();
	XBREAK( m_aryStages[0].size() > 0x7f );
	XBREAK( m_idxLastUnlock > 0x7f );
	//XBREAK( m_idxLastPlay > 0x7f );
	const int numFloor = m_aryStages.size();
	ar << (char)m_aryStages[0].size();		// 모든층은 스테이지 수가 똑같다고 가정.
	ar << (char)m_idxLastUnlock;
	ar << (char)numFloor; //m_idxLastPlay;
	ar << (char)m_cntTry;
	ar << m_timerOpen;
	for( auto& aryStages : m_aryStages ) {
		for( auto& spStageObj : aryStages ) {
			int size2 = ar.size();
			XArchive arStage;
			arStage.SetbForDB( ar.IsForDB() );
			spStageObj->Serialize( arStage );
			ar << arStage;			// 만약 스테이지가 사라지거나 해서 통째로 건너뛰려고 이렇게 함.
			int size22 = ar.size() - size2;
			//		TRACE("%d", size22 );
		}
	}
	int size = ar.size() - sizeOld;
	XBREAK( ar.IsForDB() && size >= 8000 );	
	ar << (short)m_idxFloorByOpen;
	ar << (short)0;
	return 1;
}
示例#2
0
int XCampObjCommon::sSerialize( XSPCampObjCommon& spCampObj,  XArchive& ar )
{
	if( spCampObj == nullptr ) {
		ar << 0;
		return 1;
	}
	ar << (BYTE)VER_CAMP_SERIALIZE;
	ar << (BYTE)spCampObj->GetType();
	ar << (BYTE)0;
	ar << (BYTE)0;
	ar << spCampObj->GetidProp();
	XArchive arCamp;	// 캠페인이 프로퍼티에서 없어질경우를 대비에 이렇게 함. 한꺼번에 건너뛰려고.
	arCamp.SetbForDB( ar.IsForDB() );
	spCampObj->Serialize( arCamp );
	ar << arCamp;
	return 1;
}
示例#3
0
int XCampObjCommon::Serialize( XArchive& ar )
{
	XLOCK_OBJ;
	XCampObjBase::Serialize( ar );
	int sizeOld = ar.size();
	// strIdentifier는 용량때문에 생략하고 idProp으로 대체
// 	ar << VER_CAMP_SERIALIZE;
// 	if( XBREAK( m_pProp == nullptr ) )
// 		return 0;
// 	ar << m_pProp->idProp;
// 	ar << m_snCampaign;
	XBREAK( m_aryStages[0].size() > 0x7f );
	XBREAK( m_idxLastUnlock > 0x7f );
	//XBREAK( m_idxLastPlay > 0x7f );
	ar << (char)m_aryStages[0].size();		// 모든층은 스테이지 수가 똑같다고 가정.
	ar << (char)m_idxLastUnlock;
	ar << (char)0; //m_idxLastPlay;
	ar << (char)m_cntTry;
	ar << m_idAccTrying;
	ar << m_strTryer;
	ar << m_timerEnter;
	ar << m_timerOpen;
	XBREAK( m_Grade > 0x7f );
	ar << (char)m_Grade;
	ar << (char)0;
	ar << (char)0;
	const int numFloor = m_aryStages.size();
	ar << (char)numFloor;
	for( auto& aryStages : m_aryStages ) {
		for( auto& spStageObj : aryStages ) {
			int size2 = ar.size();
			XArchive arStage;
			arStage.SetbForDB( ar.IsForDB() );
			spStageObj->Serialize( arStage );
			ar << arStage;			// 만약 스테이지가 사라지거나 해서 통째로 건너뛰려고 이렇게 함.
			int size22 = ar.size() - size2;
	//		TRACE("%d", size22 );
		}
	}
	int size = ar.size() - sizeOld;
	XBREAK( ar.IsForDB() && size >= 8000 );
	return 1;
}