LCKB
Old Cooldown system - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Tutorials & Guides (https://lckb.dev/forum/forumdisplay.php?fid=124)
+----- Forum: Ep4 Guides (https://lckb.dev/forum/forumdisplay.php?fid=125)
+----- Thread: Old Cooldown system (/showthread.php?tid=2655)



- rondo157 - 01-03-2021


Cooldown System which work from 0 to 100%
Server

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;
}
}

Client

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))
{
// ½ºÅ³ ÄðŸÀÓ ¿É¼ÇÀº ij¸¯ÅÍ¿¡°Ô¸¸ ºÙ´Â´Ù.
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;
}