Jump to content

[SRC] Stopping the HP and SP bonus


darkmeistersp

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   12
  • Joined:  11/18/11
  • Last Seen:  

With this modification you will be able to stop the HP and SP bonus at the level you want. It is a simple and quick edit.

For the HP bonus open src/map/status.c and find this:

static unsigned int status_base_pc_maxhp(struct map_session_data* sd, struct status_data* status)
{
unsigned int val = pc_class2idx(sd->status.class_);
val = 35 + sd->status.base_level*hp_coefficient2[val]/100 + hp_sigma_val[val][sd->status.base_level];

And now change this code to:

static unsigned int status_base_pc_maxhp(struct map_session_data* sd, struct status_data* status)
{
unsigned int val = pc_class2idx(sd->status.class_);
if (sd->status.base_level<99){
val = 35 + sd->status.base_level*hp_coefficient2[val]/100 + hp_sigma_val[val][sd->status.base_level];
}else{
val = 35 + 99*hp_coefficient2[val]/100 + hp_sigma_val[val][99];
}

In this example I stopped the bonus at level 99, so if you want to change it to the level you want just change the 99 values for the level you want.

For the SP bonus you must find this in the same file:

static unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct status_data *status)
{
unsigned int val;
val = 10 + sd->status.base_level*sp_coefficient[pc_class2idx(sd->status.class_)]/100;
val += val * status->int_/100;

And now change this code to:

static unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct status_data *status)
{
unsigned int val;
if (sd->status.base_level<99){
val = 10 + sd->status.base_level*sp_coefficient[pc_class2idx(sd->status.class_)]/100;
}else{
val = 10 + 99*sp_coefficient[pc_class2idx(sd->status.class_)]/100;
}
val += val * status->int_/100;

I used level 99 as an example, so if you want to change the level just change the 99 values to whatever you want.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...