Jump to content

Question about source function/fragment purposes


Recommended Posts

Hey metin2 dev 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.

 

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

i might have an idea, 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 ?

 

I hope that you get what i want, if i'm in the wrong direction please feel free to correct me.

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

Edited by mohammed1900
Found what i was looking for
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.