本文整理汇总了C++中CMoveShape::RemoveStateEx方法的典型用法代码示例。如果您正苦于以下问题:C++ CMoveShape::RemoveStateEx方法的具体用法?C++ CMoveShape::RemoveStateEx怎么用?C++ CMoveShape::RemoveStateEx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMoveShape
的用法示例。
在下文中一共展示了CMoveShape::RemoveStateEx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSkillMessage
//.........这里部分代码省略.........
}
break;
case MSG_S2C_SKILL_ADD_EX_STATE: // 加入一个异常状态
{
// 状态承受着的类型和GUID
long lType = pMsg->GetLong();
CGUID ID;
pMsg->GetGUID(ID);
// 状态ID
DWORD dwStateID = pMsg->GetDWord();
DWORD dwLevel = pMsg->GetDWord(); // 状态等级
DWORD dwRemainedTime = pMsg->GetDWord();
BYTE bFlag = pMsg->GetByte();
CMoveShape *pMoveShape = (CMoveShape*)pMsg->GetRegion()->FindChildObject(lType, ID);
if (pMoveShape)
{
pMoveShape->AddStateEx(dwStateID, dwLevel, dwRemainedTime,0,bFlag);
}
}
break;
case MSG_S2C_SKILL_END_EX_STATE: // 结束一个异常状态
{
long lType = pMsg->GetLong();
CGUID ID;
pMsg->GetGUID(ID);
DWORD dwStateID = pMsg->GetDWord();
DWORD dwlev = pMsg->GetDWord();
CMoveShape *pMoveShape = (CMoveShape*)pMsg->GetRegion()->FindChildObject(lType, ID);
if (pMoveShape)
{
pMoveShape->RemoveStateEx(dwStateID,dwlev);
}
}
break;
case MSG_S2C_SKILL_EX_STATE_ADDITIONAL_DATA:
{
long lType = pMsg->GetLong();
CGUID ID;
pMsg->GetGUID(ID);
long lStateID = pMsg->GetLong();
DWORD dwValue = pMsg->GetDWord();
if( lStateID == STATE_TEAM )
{
CPlayer *pPlayer = dynamic_cast<CPlayer*>(pMsg->GetRegion()->FindChildObject(lType, ID));
if (pPlayer)
pPlayer->SetTeammateAmount(dwValue&0xffff);
}
}
break;
// 打开技能学习页面
case MSG_S2C_SKILL_STUDY_BEGIN:
{
CGUID guid;
pMsg->GetGUID(guid);
long num = pMsg->GetLong();
if(num > 0)
{
//GetGame()->GetCGuiEx()->GetLearnSkillPage()->Close();
for(long i=0; i<num; ++i)
{
BYTE bType = pMsg->GetByte();
DWORD dwSkillID = pMsg->GetDWord();