本文整理汇总了C++中CMoveShape::InitActionAudio方法的典型用法代码示例。如果您正苦于以下问题:C++ CMoveShape::InitActionAudio方法的具体用法?C++ CMoveShape::InitActionAudio怎么用?C++ CMoveShape::InitActionAudio使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMoveShape
的用法示例。
在下文中一共展示了CMoveShape::InitActionAudio方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOtherMessage
//.........这里部分代码省略.........
}
break;
// 播放仪态动作 - add by lpf(2008.04.11)
case MSG_S2C_OTHER_EXPATC:
{
//string sChatMsg;
CMoveShape * pSourceMoveShape = NULL;
CMoveShape * pTargetMoveShape = NULL;
tagFaceAction * stpFaceAction = NULL;
// 得到服务器数据
DWORD dwFaceActionID = pMsg->GetDWord();
long lSourceObjType = pMsg->GetLong();
CGUID SourceObjGUID;
pMsg->GetGUID(SourceObjGUID);
long lTargetObjType = pMsg->GetLong();
CGUID TargetObjGUID;
pMsg->GetGUID(TargetObjGUID);
// 得到需要处理的对象
CClientRegion * pRegion = GetGame()->GetRegion();
if (pRegion == NULL)
break;
pSourceMoveShape = dynamic_cast<CMoveShape *>(pRegion->FindChildObject(lSourceObjType, SourceObjGUID));
pTargetMoveShape = dynamic_cast<CMoveShape *>(pRegion->FindChildObject(lTargetObjType, TargetObjGUID));
// 设定表情动画
GetGame()->GetFaceActionList()->SetupFaceAction(dwFaceActionID, pSourceMoveShape, lSourceObjType, pTargetMoveShape, lTargetObjType);
if(pSourceMoveShape)
{
pSourceMoveShape->InitActionAudio(dwFaceActionID);
}
}
break;
// 物品信息回复
case MSG_S2C_OTHER_GoodsInfo_Re:
{
CGUID PlayerGUID;
pMsg->GetGUID(PlayerGUID);
CGUID GUID;
pMsg->GetGUID(GUID);
DWORD dwSize=pMsg->GetDWord();
if( dwSize==0 )
break;
BYTE *pBuff=new BYTE[dwSize];
pMsg->GetEx(pBuff,dwSize);
CGoods *pGoods=new CGoods();
LONG lPos=0;
pGoods->DecordFromByteArray(pBuff,lPos);
SAFE_DELETE_ARRAY(pBuff);
list<CGame::stChatGoodsInfo> * pChatGoodsInfo = GetGame()->GetChatGoodsInfoList();
if(pChatGoodsInfo)
{
if(pChatGoodsInfo->size() >= 120)
{
SAFE_DELETE(pChatGoodsInfo->front().pGoods);
pChatGoodsInfo->erase(pChatGoodsInfo->begin());
}
CGame::stChatGoodsInfo info;
info.idEx = GUID;
info.pGoods = pGoods;
pChatGoodsInfo->push_back(info);
}