本文整理汇总了C++中CKnights::GetCapeID方法的典型用法代码示例。如果您正苦于以下问题:C++ CKnights::GetCapeID方法的具体用法?C++ CKnights::GetCapeID怎么用?C++ CKnights::GetCapeID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKnights
的用法示例。
在下文中一共展示了CKnights::GetCapeID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetUserInfo
void CUser::GetUserInfo(Packet & pkt)
{
pkt.SByte();
pkt
<< GetName()
<< GetNation()
<< GetClanID()
<< GetFame();
CKnights * pKnights = g_pMain->GetClanPtr(GetClanID());
if (pKnights == nullptr)
{
//pkt /*<< uint8(0)*/ << uint16(0) << uint8(0) << uint8(0);
pkt << uint32(0) << uint16(0) << uint8(0) << uint16(-1);
}
else
{
pkt << pKnights->GetAllianceID()
<< pKnights->m_strName
<< pKnights->m_byGrade << pKnights->m_byRanking
<< uint16(pKnights->m_sMarkVersion) // symbol/mark version
<< pKnights->GetCapeID(pKnights); // cape ID
}
// There are two event-driven invisibility states; dispel on attack, and dispel on move.
// These are handled primarily server-side; from memory the client only cares about value 1 (which we class as 'dispel on move').
// As this is the only place where this flag is actually sent to the client, we'll just convert 'dispel on attack'
// back to 'dispel on move' as the client expects.
uint8 bInvisibilityType = m_bInvisibilityType;
if (bInvisibilityType != INVIS_NONE)
bInvisibilityType = INVIS_DISPEL_ON_MOVE;
pkt << GetLevel() << m_bRace << m_sClass
<< GetSPosX() << GetSPosZ() << GetSPosY()
<< m_bFace << m_nHair
<< m_bResHpType << uint32(m_bAbnormalType)//uint8(m_bAbnormalType)
<< m_bNeedParty
<< m_bAuthority
<< m_bPartyLeader // is party leader (bool)
<< bInvisibilityType // visibility state
//<< uint8(m_teamColour) // team colour (i.e. in soccer, 0=none, 1=blue, 2=red)
//<< m_bIsHidingHelmet // either this is correct and items are super buggy, or it causes baldness. You choose.
<< m_sDirection // direction
<< m_bIsChicken // chicken/beginner flag
<< m_bRank // king flag
<< m_bKnightsRank << m_bPersonalRank; // NP ranks (total, monthly)
uint8 equippedItems[] =
{
BREAST, LEG, HEAD, GLOVE, FOOT, SHOULDER, RIGHTHAND, LEFTHAND, CTOP, CHELMET
};
foreach_array(i, equippedItems)
{
_ITEM_DATA * pItem = GetItem(equippedItems[i]);
if (pItem == nullptr)
continue;
pkt << pItem->nNum << pItem->sDuration << pItem->bFlag;
}