当前位置: 首页>>代码示例>>C++>>正文


C++ DBWriteSet类代码示例

本文整理汇总了C++中DBWriteSet的典型用法代码示例。如果您正苦于以下问题:C++ DBWriteSet类的具体用法?C++ DBWriteSet怎么用?C++ DBWriteSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DBWriteSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

bool CGoods::tagAddonProperty::Serialize(DBWriteSet& setWriteDB, bool b)
{
	setWriteDB.AddToByteArray( static_cast<ulong>(gapType) );
	setWriteDB.AddToByteArray(lValues[0]);
	setWriteDB.AddToByteArray(lValues[1]);
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:7,代码来源:CGoods.cpp

示例2: CodeToDataBlock

//// 添加到CByteArray
bool CGate::CodeToDataBlock(DBWriteSet& setWriteDB, bool bExData)
{
	CBuild::CodeToDataBlock(setWriteDB,bExData);
	setWriteDB.AddToByteArray(m_strOpenSound.c_str());
	setWriteDB.AddToByteArray(m_strCloseSound.c_str());
	return true;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:8,代码来源:CityGate.cpp

示例3: GetGame

//! 响应物品移除
GoodsAllPurposeOpt::eOptResult GoodsAllPurposeOpt::OnGoodsPop(DWORD dwIdx)
{
	if(m_dwMaxPushNum > dwIdx || 0xFFFFFFFF == dwIdx)
	{
		CPlayer *pPlayer = GetGame()->FindPlayer(m_OwnerGuid);
		if(NULL != pPlayer)
		{
			if(CanOpt(pPlayer))
			{
				if(0xFFFFFFFF == dwIdx)
					memset(m_arrGoodsGuid, 0, sizeof(CGUID) * MAX_ALLPURPOSE_CONTAINER_SIZE);
				else
					m_arrGoodsGuid[dwIdx] = NULL_GUID;
				CMessage msg(MSG_S2C_GOODS_AllPurpose_RePop);
				DBWriteSet dbWriteSet;
				msg.GetDBWriteSet(dbWriteSet);
				dbWriteSet.AddToByteArray(dwIdx);
				msg.SendToPlayer(m_OwnerGuid, false);

				CMessage msgTxt(MSG_S2C_GOODS_AllPurpose_UpdateTxt);
				DBWriteSet TxtdbWriteSet;
				msgTxt.GetDBWriteSet(TxtdbWriteSet);
				TxtdbWriteSet.AddToByteArray(m_szText);
				msgTxt.SendToPlayer(m_OwnerGuid, false);

				return eOR_Succeed;
			}
		}
	}

	return eOR_Lawless;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:33,代码来源:GoodsAllPurposeOpt.cpp

示例4: CodeToDataBlock

//!						±àÂë
void MedalContainer::CodeToDataBlock(DBWriteSet& setWriteDB)
{
	setWriteDB.AddToByteArray( (LONG)m_setHold.size());
	for (set<LONG>::iterator ite = m_setHold.begin(); ite != m_setHold.end(); ++ite)
	{
		setWriteDB.AddToByteArray(*ite);
	}
}
开发者ID:yuanxiubin1128,项目名称:mmo-resourse,代码行数:9,代码来源:MedalContainer.cpp

示例5: CodeToDataBlock

BOOL CRoleRecord::CodeToDataBlock(DBWriteSet& setWriteDB)
{
	setWriteDB.AddToByteArray(m_lRoleID);
	setWriteDB.AddToByteArray(m_cRoleStep);
	setWriteDB.AddToByteArray(m_cAimNum);
	setWriteDB.AddToByteArray(m_Param,sizeof(sRoleParam)*m_cAimNum);
	return TRUE;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:8,代码来源:RoleRecord.cpp

示例6:

BOOL CGoodsBaseProperties::tagSuitProperty::Serialize(DBWriteSet& setWriteDB, BOOL b )
{
	setWriteDB.AddToByteArray( static_cast<DWORD>(gapType));
	setWriteDB.AddToByteArray( static_cast<DWORD>( vValues.size() ) );
	for( size_t i = 0; i < vValues.size(); i ++ )
	{
		vValues[i].Serialize( setWriteDB );
	}
	return TRUE;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:10,代码来源:CGoodsBaseProperties.cpp

示例7:

bool CGoodsBaseProperties::tagSuitProperty::Serialize(DBWriteSet& setWriteDB, bool b )
{
	setWriteDB.AddToByteArray(static_cast<ulong>(gapType));
	setWriteDB.AddToByteArray(static_cast<ulong>(vValues.size()));
	for(size_t i = 0; i < vValues.size(); i++)
	{
		vValues[i].Serialize(setWriteDB);
	}
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:10,代码来源:GoodsBaseProperties.cpp

示例8: Code

//! 编码到数据集
BOOL CGameInfo::Code(DBWriteSet &setWriteDB) const
{
	setWriteDB.AddToByteArray(m_dwType);
	setWriteDB.AddToByteArray((LONG)m_vGameInfoData.size());

	for (LONG i = 0; i < m_vGameInfoData.size(); ++i)
	{
		setWriteDB.AddToByteArray((void*)&m_vGameInfoData[i], sizeof(tagGameInfoData));
	}

	return TRUE;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:13,代码来源:CGameInfo.cpp

示例9: Serialize

BOOL CSilverWallet::Serialize( DBWriteSet& setWriteDB, BOOL b  )
{
	if( m_pSilverCoins )
	{
		setWriteDB.AddToByteArray( static_cast<BYTE>(1) );
		m_pSilverCoins -> Serialize( setWriteDB ,b );
	}
	else
	{
		setWriteDB.AddToByteArray( static_cast<BYTE>(0) );
	}
	return TRUE;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:13,代码来源:CSilverWallet.cpp

示例10: EncodeForGS

	void CPackage::EncodeForGS( DBWriteSet &db )
	{
		if( m_pGoods != NULL )
		{
			db.AddToByteArray( (BYTE)1 );
			m_pGoods->Serialize( db );
			m_pContainer->Serialize( db );
		}
		else
		{
			db.AddToByteArray( (BYTE)0 );
		}
	}
开发者ID:yuanxiubin1128,项目名称:mmo-resourse,代码行数:13,代码来源:BusinessPackage.cpp

示例11: Serialize

BOOL CJiFen::Serialize( DBWriteSet& setWriteDB, BOOL b  )
{
	if( m_pGoldCoins )
	{
		setWriteDB.AddToByteArray( static_cast<BYTE>(1) );
		m_pGoldCoins -> Serialize( setWriteDB, b );
	}
	else
	{
		setWriteDB.AddToByteArray( static_cast<BYTE>(0) );
	}
	return TRUE;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:13,代码来源:CJiFen.cpp

示例12: Encode

	void CConfiger::Encode( DBWriteSet &db ) const
	{
		db.AddToByteArray( (long) m_BuyGoodsList.size() );
		for( BuyGoodsListT::const_iterator it = m_BuyGoodsList.begin();
			it != m_BuyGoodsList.end(); ++ it )
		{
			const BuyGoods &goods = *it;
			db.AddToByteArray( const_cast<BuyGoods*>( &goods ), sizeof( goods ) );
		}
		db.AddToByteArray( const_cast<GlobalCfg*>( &m_GlobalCfg ), sizeof( m_GlobalCfg ) );
		db.AddToByteArray( (long) m_ShopTable.size() );
		for( ShopTableT::const_iterator it = m_ShopTable.begin();
			it != m_ShopTable.end(); ++ it )
		{
			db.AddToByteArray( (long) it->first );
			db.AddToByteArray( it->second.npcOrigName );
			const SellGoodsListT *sellgoods_list = it->second.SellList;
			db.AddToByteArray( (long) sellgoods_list->size() );
			for( SellGoodsListT::const_iterator sit = sellgoods_list->begin();
				sit != sellgoods_list->end(); ++ sit )
			{
				const SellGoods &goods = *sit;
				db.AddToByteArray( const_cast<SellGoods*>( &goods ), sizeof( goods ) );
			}
		}
	}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:26,代码来源:Configer.cpp

示例13: GetCacheAllInfo

//! 发送自身信息到所有客户端
VOID HardInfoList::SendInfoToAll(VOID)
{
	tagHardInfoGroup HardInfoGroup;
	GetCacheAllInfo(HardInfoGroup);

	CMessage msg(MSG_SCC2SUC_INFO_Notify_HardInfoList);
	DBWriteSet setWriteSet;
	msg.GetDBWriteSet(setWriteSet);

	setWriteSet.AddToByteArray(m_dwSMID);
	setWriteSet.AddToByteArray(HardInfoGroup.dwUseNum);
	setWriteSet.AddToByteArray(HardInfoGroup.pHardwareInfo, sizeof(tagHardwareInfo) * HardInfoGroup.dwUseNum);

	UserManage::GetInstance().SendToAll(ePT_Scout2, msg);
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:16,代码来源:HardInfoList.cpp

示例14: CodeToDataBlock

//编码
void CAutoFightData::CodeToDataBlock(DBWriteSet& setWriteDB)
{
    //由于不需要保存稳定挂机和普通挂机的状态,不需要发给GS,需要是启用
    //setWriteDB.AddToByteArray(m_AutoFightSetup,DATA_SIZE);
    //给GS传稳定时间
    setWriteDB.AddToByteArray((DWORD)GetStableTime());
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:8,代码来源:AutoFightData.cpp

示例15: ConfigEnCode

void  SkillAttribute::ConfigEnCode(DBWriteSet& dbWrite)
{
     dbWrite.AddToByteArray( (long) m_SkillAttriTable.size() );

     for ( SkillIter Iter( m_SkillAttriTable.begin()) ; Iter != m_SkillAttriTable.end() ; Iter ++ )
     {
         /// skill id
         dbWrite.AddToByteArray( Iter->first );
         dbWrite.AddToByteArray( (long)Iter->second.size() );
         for ( SkillTable::iterator it = Iter->second.begin() ; it != Iter->second.end() ; it++)
         {                
             /// add level
             dbWrite.AddToByteArray( it->first );
             dbWrite.AddToByteArray( &it->second, sizeof(tagSkillAttr) );
         }
     }
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:17,代码来源:SkillAttriSetup.cpp


注:本文中的DBWriteSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。