本文整理汇总了C++中CCrywolfUtil::SendCrywolfChattingMsg方法的典型用法代码示例。如果您正苦于以下问题:C++ CCrywolfUtil::SendCrywolfChattingMsg方法的具体用法?C++ CCrywolfUtil::SendCrywolfChattingMsg怎么用?C++ CCrywolfUtil::SendCrywolfChattingMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrywolfUtil
的用法示例。
在下文中一共展示了CCrywolfUtil::SendCrywolfChattingMsg方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyElementHealGroup
BOOL TMonsterAIElement::ApplyElementHealGroup(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-그룹치료");
TMonsterAIGroupMember * pMemb = TMonsterAIGroup::FindGroupMemberToHeal(lpObj->m_Index, lpObj->m_iGroupNumber, lpObj->m_iGroupMemberGuid, 6);
if ( pMemb )
{
LPOBJ lpTargetObj = &gObj[pMemb->m_iObjIndex];
if ( lpTargetObj->Live == 0 )
return FALSE;
TMonsterSkillUnit * lpSkillUnit = TMonsterSkillManager::FindMonsterSkillUnit(lpObj->m_Index, 21);
if ( lpSkillUnit )
{
lpSkillUnit->RunSkill(iIndex, lpTargetObj->m_Index);
}
UTIL.SendCrywolfChattingMsg(iIndex, "그룹치료 HP : %d", (int)lpTargetObj->Life);
UTIL.SendCrywolfChattingMsg(lpTargetObj->m_Index, "HP : %d", (int)lpTargetObj->Life);
}
return FALSE;
}
示例2: ApplyElementHealSelf
BOOL TMonsterAIElement::ApplyElementHealSelf(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-셀프치료");
lpObj->Life += lpObj->Life * 60.0f / 100.0f;
UTIL.SendCrywolfChattingMsg(iIndex, "HP : %d", (int)lpObj->Life);
gObjAddBuffEffect(lpObj,BUFF_ADD_DEFENSE,0,0,0,0,-10);
return FALSE;
}
示例3: ApplyElementHealSelf
BOOL TMonsterAIElement::ApplyElementHealSelf(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-셀프치료");
lpObj->Life += lpObj->Life * 20.0f / 100.0f;
UTIL.SendCrywolfChattingMsg(iIndex, "HP : %d", (int)lpObj->Life);
lpObj->m_ViewSkillState |= 8;
GCStateInfoSend(lpObj, 1, lpObj->m_ViewSkillState);
return FALSE;
}
示例4: UpdateCurrentAIUnit
BOOL TMonsterAI::UpdateCurrentAIUnit(int iIndex)
{
LPOBJ lpObj = &gObj[iIndex];
if ( lpObj->Live == FALSE )
return FALSE;
int iOldCurrentAI = lpObj->m_iCurrentAI;
int iCurrentAI = TMonsterAIRule::GetCurrentAIUnit(lpObj->Class);
if ( iCurrentAI == 0 )
{
if ( lpObj->m_iBasicAI != 0 )
{
iCurrentAI = lpObj->m_iBasicAI;
}
}
lpObj->m_iCurrentAI = iCurrentAI;
if ( iOldCurrentAI != iCurrentAI )
{
UTIL.SendCrywolfChattingMsg(lpObj->m_Index, "AI Old Name %s IA Current Name %s ", TMonsterAIUnit::FindAIUnit(iOldCurrentAI)->m_szUnitName, TMonsterAIUnit::FindAIUnit(iCurrentAI)->m_szUnitName);
}
return TRUE;
}
示例5: ApplyElementAvoid
BOOL TMonsterAIElement::ApplyElementAvoid(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-회피");
KANTURU_UTIL.SendKanturuChattingMsg(iIndex, "Element-회피");
BOOL bFindXY = MONSTER_UTIL.GetXYToEascape(lpObj);
if ( bFindXY )
{
MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, 1);
}
return FALSE;
}
示例6: ApplyElementAttackArea
BOOL TMonsterAIElement::ApplyElementAttackArea(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-영역공격");
int iTargetX = this->m_iX + (rand()%5) * ((rand()%2==0)?1:-1 ) ;
int iTargetY = this->m_iY + (rand()%5) * ((rand()%2==0)?1:-1 ) ;
for (int i= OBJ_STARTUSERINDEX;i<OBJMAX;i++)
{
if ( !gObjIsConnected(i))
continue;
LPOBJ lpTargetObj = &gObj[i];
if ( !lpObj->Live )
continue;
if ( lpObj->MapNumber != lpTargetObj->MapNumber )
continue;
int iTargetDistance = (int)sqrt(double(((lpTargetObj->X - iTargetX)*(lpTargetObj->X - iTargetX)) + ((lpTargetObj->Y - iTargetY)*(lpTargetObj->Y - iTargetY))));
if ( iTargetDistance < 10 )
{
PMSG_NOTIFY_REGION_MONSTER_ATTACK pMsg;
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x0C, sizeof(pMsg));
pMsg.btObjClassH = SET_NUMBERH(lpObj->Class);
pMsg.btObjClassL = SET_NUMBERL(lpObj->Class);
pMsg.btSourceX = lpObj->X;
pMsg.btSourceY = lpObj->Y;
pMsg.btPointX = iTargetX;
pMsg.btPointY = iTargetY;
DataSend(lpTargetObj->m_Index, (LPBYTE)&pMsg, sizeof(pMsg));
}
if ( iTargetDistance < 6 )
{
gObjAttack(lpObj, lpTargetObj, 0, 0, 0, 0, 0,0,0);
}
}
return FALSE;
}
示例7: ApplyElementGroupMove
BOOL TMonsterAIElement::ApplyElementGroupMove(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-그룹이동");
if ( lpObj->PathStartEnd )
return FALSE;
BOOL bFindXY = FALSE;
BOOL bFoundLeader = TRUE;
int iLeaderIndex = -1;
iLeaderIndex = TMonsterAIGroup::FindGroupLeader(lpObj->m_iGroupNumber);
if ( iLeaderIndex == -1 || gObj[iLeaderIndex].Live == FALSE )
bFoundLeader = FALSE;
if ( bFoundLeader && gObjCalDistance(lpObj, &gObj[iLeaderIndex]) > 6 )
{
lpObj->TargetNumber = iLeaderIndex;
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
}
else if ( pAIState->m_iTransitionType == 2 )
{
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
}
else
{
bFindXY = MONSTER_UTIL.GetXYToPatrol(lpObj);
}
if ( bFindXY )
{
if ( MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, TRUE) )
{
}
else
{
MONSTER_UTIL.GetXYToPatrol(lpObj);
MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, TRUE);
}
}
return FALSE;
}
示例8: ApplyElementMove
BOOL TMonsterAIElement::ApplyElementMove(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-이동");
KANTURU_UTIL.SendKanturuChattingMsg(iIndex, "Element-이동");
if ( lpObj->PathStartEnd )
return FALSE;
BOOL bFindXY = FALSE;
if ( pAIState->m_iTransitionType == 2 )
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
else
bFindXY = MONSTER_UTIL.GetXYToPatrol(lpObj);
if ( bFindXY )
MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, 1);
return FALSE;
}
示例9: ApplyElementSpecialSommon
BOOL TMonsterAIElement::ApplyElementSpecialSommon(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-특수소환");
TMonsterAIGroupMember * pMemb = TMonsterAIGroup::FindGroupMemberToSommon(lpObj->m_Index, lpObj->m_iGroupNumber, lpObj->m_iGroupMemberGuid);
if ( pMemb )
{
LPOBJ lpTargetObj = &gObj[pMemb->m_iObjIndex];
if ( lpTargetObj->Live != 0 )
return FALSE;
TMonsterSkillUnit * lpSkillUnit = TMonsterSkillManager::FindMonsterSkillUnit(lpObj->m_Index, 30);
if ( lpSkillUnit )
{
lpSkillUnit->RunSkill(iIndex, lpTargetObj->m_Index);
}
}
return FALSE;
}
示例10: ApplyElementAttack
BOOL TMonsterAIElement::ApplyElementAttack(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-공격");
if ( TMonsterSkillManager::CheckMonsterSkill(lpObj->Class) )
{
BOOL bEnableAttack = TRUE;
if ( lpObj->TargetNumber < 0 )
{
lpObj->TargetNumber = -1;
lpObj->m_ActState.Emotion = 0;
lpObj->m_ActState.Attack = 0;
lpObj->m_ActState.Move = 0;
lpObj->NextActionTime = 1000;
return FALSE;
}
if ( !gObj[lpObj->TargetNumber].Live || gObj[lpObj->TargetNumber].Teleport )
bEnableAttack = FALSE;
if ( gObj[lpObj->TargetNumber].Connected <= PLAYER_LOGGED ||
gObj[lpObj->TargetNumber].CloseCount != -1 )
{
bEnableAttack = FALSE;
}
if ( !bEnableAttack )
{
lpObj->TargetNumber = -1;
lpObj->m_ActState.Emotion = 0;
lpObj->m_ActState.Attack = 0;
lpObj->m_ActState.Move = 0;
lpObj->NextActionTime = 1000;
return FALSE;
}
LPOBJ lpTargetObj = &gObj[lpObj->TargetNumber];
lpObj->Dir = GetPathPacketDirPos(lpTargetObj->X - lpObj->X, lpTargetObj->Y - lpObj->Y);
if ( (rand()%4) == 0 )
{
PMSG_ATTACK pAttackMsg;
pAttackMsg.AttackAction = 0x78;
pAttackMsg.DirDis = lpObj->Dir;
pAttackMsg.NumberH = SET_NUMBERH(lpObj->TargetNumber);
pAttackMsg.NumberL = SET_NUMBERL(lpObj->TargetNumber);
GCActionSend(lpObj, 0x78, lpObj->m_Index, 0);
gObjAttack(lpObj, &gObj[lpObj->TargetNumber], 0, 0, 0, 0, 0,0,0);
}
else
{
TMonsterSkillManager::UseMonsterSkill(lpObj->m_Index, lpObj->TargetNumber, 0, -1, 0);
}
lpObj->m_ActState.Attack = 0;
return FALSE;
}
else
{
if( lpObj->TargetNumber < 0 )
return FALSE;
LPOBJ lpTargetObj = &gObj[lpObj->TargetNumber];
lpObj->Dir = GetPathPacketDirPos(lpTargetObj->X - lpObj->X, lpTargetObj->Y - lpObj->Y);
PMSG_ATTACK pAttackMsg;
pAttackMsg.AttackAction = 0x78;
pAttackMsg.DirDis = lpObj->Dir;
pAttackMsg.NumberH = SET_NUMBERH(lpObj->TargetNumber);
pAttackMsg.NumberL = SET_NUMBERL(lpObj->TargetNumber);
CGAttack((PMSG_ATTACK *)&pAttackMsg, lpObj->m_Index);
GCActionSend(lpObj, 0x78, lpObj->m_Index, lpTargetObj->m_Index);
gObjAttack(lpObj, &gObj[lpObj->TargetNumber], 0, 0, 0, 0, 0,0,0);
return FALSE;
}
}
示例11: ApplyElementMoveTarget
BOOL TMonsterAIElement::ApplyElementMoveTarget(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-MoveTarget");
#if (__CUSTOM__ == 0)
KANTURU_UTIL.SendKanturuChattingMsg(iIndex, "Element-타겟이동");
#endif
if ( lpObj->PathStartEnd )
return FALSE;
if ( lpObj->X == this->m_iX &&
lpObj->Y == this->m_iY )
{
this->ApplyElementMove(iIndex, iTargetIndex, pAIState);
return FALSE;
}
BOOL bFindXY = TRUE;
int iTargetX = this->m_iX;
int iTargetY = this->m_iY;
int iTargetDistance = (int)sqrt(double(((lpObj->X - iTargetX)*(lpObj->X - iTargetX))+ ((lpObj->Y - iTargetY)*(lpObj->Y - iTargetY))));
if ( TMonsterAIElement::s_MonsterAIMovePath[lpObj->MapNumber].m_bDataLoad )
{
if ( iTargetDistance > 10 )
{
int iMinCost = 1000000;
int iMidX = -1;
int iMidY = -1;
int iSpotNum = -1;
for ( int i=0;i<MAX_MONSTER_AI_MOVE_PATH;i++)
{
TMonsterAIMovePathInfo & PathInfo = TMonsterAIElement::s_MonsterAIMovePath[lpObj->MapNumber].m_MovePathInfo[i];
float fDistX = (float)(lpObj->X - PathInfo.m_iPathX);
float fDistY = (float)(lpObj->Y - PathInfo.m_iPathY);
int iPathSpotDist = (int)sqrt( (fDistX*fDistX) + (fDistY*fDistY) );
if ( iPathSpotDist < 20 )
{
fDistX = (float)(iTargetX - PathInfo.m_iPathX);
fDistY = (float)(iTargetY - PathInfo.m_iPathY);
int iMidDist = (int)sqrt( (fDistX*fDistX) + (fDistY*fDistY) );
if ( iMinCost > iMidDist )
{
if ( iMidDist )
{
iMinCost = iMidDist;
iMidX = PathInfo.m_iPathX;
iMidY = PathInfo.m_iPathY;
iSpotNum = i;
}
}
}
}
if ( iMinCost != 1000000 )
{
iTargetX = iMidX;
iTargetY = iMidY;
}
}
}
if ( bFindXY )
{
if ( MONSTER_UTIL.FindPathToMoveMonster(lpObj, iTargetX, iTargetY, 7, FALSE) )
lpObj->PathStartEnd = 1;
else
lpObj->PathStartEnd = 0;
}
return FALSE;
}