Help know the purpose of this code

03/30/2020 08:07 mohammed1900#1
Hey elitepvpers community, i recently started working on metin2 source (I'm a noob, so if you have any tips i'm open) and i want to know the purpose of this code fragment that is in char_battle.cpp in game/src.

Code:
CSkillProto* pkSk = CSkillManager::instance().Get(SKILL_RESIST_PENETRATE);

if (NULL != pkSk)
{
  pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_RESIST_PENETRATE) / 100.0f); // I'm interested in this line

  iPenetratePct -= static_cast<int>(pkSk->kPointPoly.Eval());
}
is it replacing the variable "k" in the skill_proto in the database?, if yes, can i create my own variable ? let say "z" that only appear in warrior skill and pass any double value ?

My ultimate goal is to pass a new variable to the skill_proto to modify a skill output damage(this variable can have any double value).

Thanks in advance...

Edit: I found what i was looking for ( Creating a new variable for skill proto), it was in char_skill.cpp