//------------------------------------------------------------------------------------- void Dbmgr::syncEntityStreamTemplate(Network::Channel* pChannel, KBEngine::MemoryStream& s) { int rpos = s.rpos(); EntityTables::ENTITY_TABLES_MAP::iterator iter = EntityTables::sEntityTables.begin(); for (; iter != EntityTables::sEntityTables.end(); ++iter) { KBEAccountTable* pTable = static_cast<KBEAccountTable*>(iter->second.findKBETable("kbe_accountinfos")); KBE_ASSERT(pTable); s.rpos(rpos); pTable->accountDefMemoryStream(s); } s.done(); }
//------------------------------------------------------------------------------------- void Dbmgr::onBroadcastGlobalDataChange(Mercury::Channel* pChannel, KBEngine::MemoryStream& s) { uint8 dataType; int32 slen; std::string key, value; bool isDelete; COMPONENT_TYPE componentType; s >> dataType; s >> isDelete; s >> slen; key.assign((char*)(s.data() + s.rpos()), slen); s.read_skip(slen); if(!isDelete) { s >> slen; value.assign((char*)(s.data() + s.rpos()), slen); s.read_skip(slen); }