CD skill

08/17/2021 17:59 RedBull1928#1
how i can make 100% cd skill?
08/18/2021 00:09 Desarija#2
Quote:
Changes that have to be made in the Server Source:

Skill.cpp

// New System without %
reusetime = reusetime * ( 150.00 / (150 + prob )) * (100.00 / (100 + prob));

// Old System with %
reusetime -= reusetime * prob / 100;

// Around 17 lines after the resuetime variable also change this one
if (!IS_PC(ch)){
if (reusetime < 1){
reusetime = 0;
}
}


Changes that have to be made in the Client Source

MyInfoSkill.cpp > Function > DOUBLE MyInfoSkill::GetReuseSkill( int nIndex )
Replace the Complete Function

DOUBLE MyInfoSkill::GetReuseSkill( int nIndex )
{
CSkill& rSkill = _pNetwork->GetSkillData(nIndex);

int nCoolTimeReductionRate = 0;
int SkillReuseTime = 0;
DOUBLE dCoolTime = 0.0;
DOUBLE dDelayTime;
DOUBLE dReuseTime = 0.0;
int nReuseTime = 0;

// <<< Old CoolDownSystem with EP4 Features by DamonA
dDelayTime = DOUBLE( rSkill.GetReUseTime() + _pNetwork->MyCharacterInfo.magicspeed ) / 10.0;
nCoolTimeReductionRate= UIMGR()->GetCoolTimeReductionRate();

if (rSkill.GetJob() != PET_JOB && rSkill.GetJob() != WILDPET_JOB &&
!(rSkill.GetFlag() & SF_GUILD))
{
if (!(rSkill.Skill_Data.appState & SCT_NOCOOLTIME))
{
if( nCoolTimeReductionRate > 100 )
{
nCoolTimeReductionRate = 100;
}
if( nCoolTimeReductionRate > 0 )
{
dDelayTime *= DOUBLE(100-nCoolTimeReductionRate)/100.0f;
}
}
}

return dDelayTime;
// >>> OldCoolDownSystem with EP4 Features by DamonA

if (rSkill.GetJob() != PET_JOB && rSkill.GetJob() != WILDPET_JOB &&
!(rSkill.GetFlag() & SF_GUILD))
{
// ?? ??? ??? ?????? ???.
if (!(rSkill.Skill_Data.appState & SCT_NOCOOLTIME))
{
nCoolTimeReductionRate = UIMGR()->GetCoolTimeReductionRate();
dCoolTime = ( 150.0 / (150.0 + nCoolTimeReductionRate ) * 100.0 / (100.0 + nCoolTimeReductionRate) );
}
}

if(rSkill.GetReUseTime())
{
dReuseTime = DOUBLE( rSkill.GetReUseTime() + _pNetwork->MyCharacterInfo.magicspeed ) / 10.0 * (nCoolTimeReductionRate ? dCoolTime : 1);

return dReuseTime;
}

return 0.0;
}
__________________

CNetwork.cpp

#define DEF_SKILL_SEND_DELAY 200 change to 0
credits to damona i guess
08/18/2021 06:26 4everlillakill#3
Quote:
Originally Posted by Desarija View Post
credits to damona i guess
thanks a lot I'll try