本文整理汇总了C++中Obj_Character::IsActiveObj方法的典型用法代码示例。如果您正苦于以下问题:C++ Obj_Character::IsActiveObj方法的具体用法?C++ Obj_Character::IsActiveObj怎么用?C++ Obj_Character::IsActiveObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_Character
的用法示例。
在下文中一共展示了Obj_Character::IsActiveObj方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
VOID StdImpact059_T::SendLayerChangeMsg( OWN_IMPACT& rImp, Obj_Character& rMe ) const
{
__ENTER_FUNCTION
//通知客户端层数改变
// Info Other Impact
//通知其它客户端效果生效
Scene * pScene = rMe.getScene();
if(NULL==pScene||FALSE==rMe.IsActiveObj())
{
return;
}
GCCharBuff Msg2Other;
Msg2Other.SetReceiverID(rImp.GetCasterObjID());
Msg2Other.SetSenderID(rImp.GetCasterObjID());
Msg2Other.SetEnable(TRUE);
Msg2Other.SetSN(rImp.GetSN());
Msg2Other.SetBuffID(Impact_GetImpactID(rImp));
Msg2Other.SetSenderLogicCount(rImp.GetCasterLogicCount());
Msg2Other.SetSkillID( rImp.GetSkillID() );
Msg2Other.SetLayerCount( rImp.GetLayerCount() );
// 设置技能效果的持续时间 20100531 BLL
Msg2Other.SetContinuance( rImp.GetContinuance() );
if(INVALID_ID!=Impact_GetImpactID(rImp))
{
pScene->BroadCast(&Msg2Other, &rMe, TRUE);
}
__LEAVE_FUNCTION
}
示例2: ActiveSkillNow
BOOL SkillCore_T::ActiveSkillNow(Obj_Character& rMe) const
{
__ENTER_FUNCTION
SkillInfo_T& rSkillInfo = rMe.GetSkillInfo();
TargetingAndDepletingParams_T& rParams = rMe.GetTargetingAndDepletingParams();
if(FALSE==rMe.IsAlive()||FALSE==rMe.IsActiveObj())
{
rParams.SetErrCode(OR_DIE);
return FALSE;
}
rSkillInfo.Init();
if(FALSE==InstanceSkill(rSkillInfo, rMe, rParams.GetActivatedSkill(), rParams.GetSkillLevel()))
{
rParams.SetErrCode(OR_INVALID_SKILL);
rParams.SetErrParam(rParams.GetActivatedSkill());
return FALSE;
}
//refix skill instance
rMe.RefixSkill(rSkillInfo);
//perform checking
INT nLogicID = rSkillInfo.GetLogicID();
SkillLogic_T const* pLogic = g_SkillLogicList.GetLogicById(nLogicID);
if(NULL==pLogic)
{
rParams.SetErrCode(OR_INVALID_SKILL);
rParams.SetErrParam(rParams.GetActivatedSkill());
return FALSE;
}
if(TRUE == pLogic->IsPassive())
{
AssertEx(FALSE,"[SkillCore_T::HeartBeat]: Found passive Skill!!!Data error!!");
rParams.SetErrCode(OR_ERROR);
return FALSE;
}
if(TRUE == pLogic->CancelSkillEffect(rMe))
{
rParams.SetErrCode(OR_OK);
return TRUE;
}
//Prefix end
if(FALSE==rMe.Skill_IsSkillCooldowned(rParams.GetActivatedSkill())&& FALSE==rParams.GetIgnoreConditionCheckFlag())
{
rParams.SetErrCode(OR_COOL_DOWNING);
return FALSE;
}
if(TRUE == rSkillInfo.GetMustUseWeaponFlag())
{
if(Obj::OBJ_TYPE_HUMAN==rMe.GetObjType())
{
Obj_Human* pHuman = (Obj_Human*)&rMe;
Item* pItem=HumanItemLogic::GetEquip(pHuman, HEQUIP_WEAPON);
if(NULL==pItem)
{
rParams.SetErrCode(OR_NEED_A_WEAPON);
return FALSE;
}
else if(TRUE==pItem->IsEmpty())
{
rParams.SetErrCode(OR_NEED_A_WEAPON);
return FALSE;
}
}
}
if(FALSE==rParams.GetIgnoreConditionCheckFlag())
{
if(FALSE == pLogic->IsConditionSatisfied(rMe))
{
return FALSE;
}
if(FALSE==pLogic->SpecificOperationOnSkillStart(rMe))
{
return FALSE;
}
}
switch (rSkillInfo.GetSkillType())
{
case SKILL_INSTANT_LAUNCHING:
pLogic->StartLaunching(rMe);
break;
case SKILL_NEED_CHARGING:
pLogic->StartCharging(rMe);
break;
case SKILL_NEED_CHANNELING:
pLogic->StartChanneling(rMe);
break;
default:
AssertEx(FALSE,"[SkillCore_T::ActiveSkillNow]: Try to active a un-active skill!");
break;
}
return TRUE;
__LEAVE_FUNCTION
return FALSE ;
}