本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
}
示例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;
}
示例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 ) );
}
}
}
示例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);
}
示例14: CodeToDataBlock
//编码
void CAutoFightData::CodeToDataBlock(DBWriteSet& setWriteDB)
{
//由于不需要保存稳定挂机和普通挂机的状态,不需要发给GS,需要是启用
//setWriteDB.AddToByteArray(m_AutoFightSetup,DATA_SIZE);
//给GS传稳定时间
setWriteDB.AddToByteArray((DWORD)GetStableTime());
}
示例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) );
}
}
}