@fedrock yo hice así (espanhol):
eu fiz isso (portuguese):
ComboSkill.cppint CComboSkill::GetSkillType(WORD skill) // OK
{
if(skill == SKILL_FALLING_SLASH || skill == SKILL_LUNGE || skill == SKILL_UPPERCUT || skill == SKILL_CYCLONE || skill == SKILL_SLASH || skill == SKILL_DRAIN_LIFE) //Summoner combo
{
return 0;
}
else if(skill == SKILL_TWISTING_SLASH || skill == SKILL_RAGEFUL_BLOW || skill == SKILL_DEATH_STAB || skill == SKILL_FROZEN_STAB || skill == SKILL_BLOOD_STORM || skill == SKILL_RED_STORM || skill == SKILL_CHAIN_LIGHTNING) //Summoner combo
{
return 1;
}
else
{
return -1;
}
}
SkillManager.hbool SkillChainLightning(int aIndex,int bIndex,CSkill* lpSkill,bool combo); //Combo teste summoner
bool SkillRedStorm(int aIndex,int bIndex,CSkill* lpSkill,bool combo); //Combo teste summoner
SkillManager.cppbool CSkillManager::RunningSkill(int aIndex,int bIndex,CSkill* lpSkill,BYTE x,BYTE y,BYTE angle,bool combo) // OK
case SKILL_CHAIN_LIGHTNING:
return this->SkillChainLightning(aIndex,bIndex,lpSkill,combo); //Combo teste summoner
case SKILL_RED_STORM:
return this->SkillRedStorm(aIndex,bIndex,lpSkill,combo); //Combo teste summoner
SkillManager.cpp -> SkillChainLightningbool CSkillManager::SkillChainLightning(int aIndex,int bIndex,CSkill* lpSkill,bool combo) // OK
{
LPOBJ lpObj = &gObj[aIndex];
if(OBJECT_RANGE(bIndex) == 0)
{
return 0;
}
LPOBJ lpTarget = &gObj[bIndex];
if(this->CheckSkillRange(lpSkill->m_index,lpObj->X,lpObj->Y,lpTarget->X,lpTarget->Y) == 0)
{
return 0;
}
//Combo teste summoner
gAttack.Attack(lpObj,&gObj[bIndex],lpSkill,0,0,0,0,combo);
if(combo != 0)
{
this->GCSkillAttackSend(lpObj,SKILL_COMBO,bIndex,1);
}
int count = 1;
int target[3] = {bIndex,bIndex,bIndex};
for(int n=0;n < MAX_VIEWPORT;n++)
{
if(lpObj->VpPlayer2[n].state == VIEWPORT_NONE)
{
continue;
}
int index = lpObj->VpPlayer2[n].index;
if(bIndex == index)
{
continue;
}
if(this->CheckSkillTarget(lpObj,index,bIndex,lpObj->VpPlayer2[n].type) == 0)
{
continue;
}
if(this->CheckSkillRadio(lpSkill->m_index,lpTarget->X,lpTarget->Y,gObj[index].X,gObj[index].Y) == 0)
{
continue;
}
target[count++] = index;
if(count >= _countof(target))
{
break;
}
//Combo teste summoner
gAttack.Attack(lpObj,&gObj[index],lpSkill,0,0,0,0,combo);
if(combo != 0)
{
this->GCSkillAttackSend(lpObj,SKILL_COMBO,index,1);
}
}
BYTE send[256];
PMSG_SKILL_CHAIN_SKILL_SEND pMsg;
pMsg.header.set(0xBF,0x0A,0);
int size = sizeof(pMsg);
pMsg.skill[0] = SET_NUMBERHB(lpSkill->m_index);
pMsg.skill[1] = SET_NUMBERLB(lpSkill->m_index);
pMsg.index = aIndex;
pMsg.count = 0;
PMSG_SKILL_CHAIN_SKILL info;
for(int n=0;n < _countof(target);n++)
{
gObjAddAttackProcMsgSendDelay(lpObj,52,target[n],(200+(n*200)),lpSkill->m_index,(n+1));
info.index = target[n];
memcpy(&send[size],&info,sizeof(info));
size += sizeof(info);
pMsg.count++;
}
pMsg.header.size = size;
memcpy(send,&pMsg,sizeof(pMsg));
DataSend(aIndex,send,size);
MsgSendV2(lpObj,send,size);
return 1;
}
SkillManager.cpp -> SkillRedStormbool CSkillManager::SkillRedStorm(int aIndex,int bIndex,CSkill* lpSkill,bool combo) // OK
{
LPOBJ lpObj = &gObj[aIndex];
int count = 0;
for(int n=0;n < MAX_VIEWPORT;n++)
{
if(lpObj->VpPlayer2[n].state == VIEWPORT_NONE)
{
continue;
}
int index = lpObj->VpPlayer2[n].index;
if(this->CheckSkillTarget(lpObj,index,bIndex,lpObj->VpPlayer2[n].type) == 0)
{
continue;
}
if(this->CheckSkillRadio(lpSkill->m_index,lpObj->X,lpObj->Y,gObj[index].X,gObj[index].Y) == 0)
{
continue;
}
gObjAddAttackProcMsgSendDelay(lpObj,50,index,250,lpSkill->m_index,combo);
//Combo teste summoner
//gAttack.Attack(lpObj,&gObj[index],lpSkill,0,0,0,0,combo);
if(combo != 0)
{
this->GCSkillAttackSend(lpObj,SKILL_COMBO,index,1);
}
if(CHECK_SKILL_ATTACK_COUNT(count) == 0)
{
break;
}
}
return 1;
}
¡¡sin éxito!!
sem sucesso!!
¿Dónde me equivoque?
Onde estou errado?