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


C++ CKnights::GetCapeID方法代码示例

本文整理汇总了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;
	}
开发者ID:sailei1,项目名称:knightonline,代码行数:61,代码来源:CharacterMovementHandler.cpp


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