本文整理汇总了C++中CMoveShape::GetDirEx方法的典型用法代码示例。如果您正苦于以下问题:C++ CMoveShape::GetDirEx方法的具体用法?C++ CMoveShape::GetDirEx怎么用?C++ CMoveShape::GetDirEx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMoveShape
的用法示例。
在下文中一共展示了CMoveShape::GetDirEx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSkillMessage
//.........这里部分代码省略.........
if (pPet->IsMainPlayerPet())
{
if(lSkillKey == pPet->GetIntonateKey()
&& lSkillID == pPet->GetIntonateState())
{
GetGame()->GetMainPlayer()->SetCurIntonateTime(0,0);
GetGame()->GetMainPlayer()->SetIntonateSkillKey(0);
}
tagPetSkillInfo *pPetSkill = pPet->GetPetSkillInfoByID(lSkillID);
if(pPetSkill)
pPetSkill->bIsSkillUsingEnd = true;
}
}
}
}
break;
case SKILL_USE_RESULT_FAILED:
CGUID ID;
pMsg->GetGUID(ID);
long lSkillID = pMsg->GetLong();
long lLevel = pMsg->GetByte();
long lSkillKey = pMsg->GetLong();
long lFaildRet = pMsg->GetByte();
// 将该技能结束
CMoveShape* pMoveShape = (CMoveShape*)pMsg->GetRegion()->FindChildObject(ID);
if(pMoveShape)
{
long lType = pMoveShape->GetType();
CSkillXml* pSkill = pMoveShape->GetCurSkill(lSkillKey);
if(pSkill)
{
pSkill->StepEnd(lSkillID, lLevel, lType, ID, pMoveShape->GetDirEx());
pMoveShape->DeleteCurSkill(lSkillKey);
}
if(pMoveShape->GetType() == TYPE_PET)
{
CPet *pPet = (CPet*)pMoveShape;
tagPetSkillInfo *pPetSkill = pPet->GetPetSkillInfoByID(lSkillID);
if(pPetSkill)
pPetSkill->bIsSkillUsingEnd = true;
pPet->SkillFailReceived();
}
// 其他对象的技能,不提示
if( pMoveShape == GetGame()->GetMainPlayer())
{
// 自动攻击累计发送次数清0
GetGame()->GetGameControl()->SetSendedUseSkillMsgCount(0);
// 如果是本玩家释放的技能,且失败技能为连续技能,停止本玩家自动攻击状态
CSkillListXml::tagSkill *pS = CSkillListXml::GetProperty(lSkillID);
if(pS && pS->bLockSkill)
{
// 连续攻击技能的mp不足,切换到基本攻击
if(lFaildRet == SKILL_USE_FAILED_INVALID_MP)
{
DWORD dwID = GetGame()->GetMainPlayer()->GetDefaultAttackSkillID();
GetGame()->GetGameControl()->SetBufferSkillID(dwID);
CPlayer::tagSkill * pPlayerSkill = GetGame()->GetMainPlayer()->GetSkill(dwID);
if(pPlayerSkill)
pPlayerSkill->dwUseingStartTime = timeGetTime();
}
if(lFaildRet == SKILL_USE_FAILED_INVALID_HP || lFaildRet == SKILL_USE_FAILED_INVALID_RP)
GetGame()->GetGameControl()->AutoAttactStop();
}
// 光环类技能重设使用状态