本文整理汇总了C++中CKnights::InitializeValue方法的典型用法代码示例。如果您正苦于以下问题:C++ CKnights::InitializeValue方法的具体用法?C++ CKnights::InitializeValue怎么用?C++ CKnights::InitializeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKnights
的用法示例。
在下文中一共展示了CKnights::InitializeValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RecvCreateKnights
void CUdpSocket::RecvCreateKnights( char* pBuf )
{
int index = 0, send_index = 0, namelen = 0, idlen = 0, knightsindex = 0, nation = 0, community = 0;
char knightsname[MAX_ID_SIZE+1]; memset( knightsname, 0x00, MAX_ID_SIZE+1 );
char chiefname[MAX_ID_SIZE+1]; memset( chiefname, 0x00, MAX_ID_SIZE+1 );
CKnights* pKnights = NULL;
community = GetByte( pBuf, index );
knightsindex = GetShort( pBuf, index );
nation = GetByte( pBuf, index );
namelen = GetShort( pBuf, index );
GetString( knightsname, pBuf, namelen, index );
idlen = GetShort( pBuf, index );
GetString( chiefname, pBuf, idlen, index );
pKnights = new CKnights;
pKnights->InitializeValue();
pKnights->m_sIndex = knightsindex;
pKnights->m_byFlag = community;
pKnights->m_byNation = nation;
strcpy( pKnights->m_strName, knightsname );
strcpy( pKnights->m_strChief, chiefname );
memset( pKnights->m_strViceChief_1, 0x00, MAX_ID_SIZE+1);
memset( pKnights->m_strViceChief_2, 0x00, MAX_ID_SIZE+1);
memset( pKnights->m_strViceChief_3, 0x00, MAX_ID_SIZE+1);
pKnights->m_sMembers = 1;
pKnights->m_nMoney = 0;
pKnights->m_nPoints = 0;
pKnights->m_byGrade = 5;
pKnights->m_byRanking = 0;
for(int i=0; i<MAX_CLAN; i++) {
pKnights->m_arKnightsUser[i].byUsed = 0;
strcpy(pKnights->m_arKnightsUser[i].strUserName, "");
}
m_pMain->m_KnightsArray.PutData( pKnights->m_sIndex, pKnights );
// 클랜정보에 추가
m_pMain->m_KnightsManager.AddKnightsUser( knightsindex, chiefname );
//TRACE("UDP - RecvCreateKnights - knname=%s, name=%s, index=%d\n", knightsname, chiefname, knightsindex);
}