Jump to content
  • 0

Where are the definition of skills like "SM_Recovery" or "MG_SPRecovery"?


aleph075

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.66
  • Content Count:  49
  • Reputation:   0
  • Joined:  04/10/24
  • Last Seen:  

I cant find the definition of this skills to edit them. Is there a way to easily find any "case CLASS_SKILL" ?

Thx!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  816
  • Reputation:   236
  • Joined:  01/30/13
  • Last Seen:  

Just open the rAthena project in Visual Studio and search for the Aegis name e.g. "SM_RECOVERY" and you find everything related to it in the source code.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.66
  • Content Count:  49
  • Reputation:   0
  • Joined:  04/10/24
  • Last Seen:  

7 hours ago, Playtester said:

Just open the rAthena project in Visual Studio and search for the Aegis name e.g. "SM_RECOVERY" and you find everything related to it in the source code.

Nice, i found it.

Now, I don't know how to edit SM_RECOVERY to work allways, including when you are not sit, moving, atacking. How can I do that?

Maybe here?

// Only players have skill/sitting skill regen for now.
sregen = regen->sregen;

val = 0;
if( (skill=pc_checkskill(sd,SM_RECOVERY)) > 0 )
	val += skill*5 + skill*status->max_hp/500;

if (sc && sc->count) {
	if (sc->data[SC_INCREASE_MAXHP])
		val += val * sc->data[SC_INCREASE_MAXHP]->val2 / 100;
}

The rest of the code is here:

void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen_data *regen)
{
	struct map_session_data *sd;
	struct status_change *sc;
	int val, skill, reg_flag;

	if( !(bl->type&BL_REGEN) || !regen )
		return;

	sd = BL_CAST(BL_PC,bl);
	sc = status_get_sc(bl);

	val = 1 + (status->vit/5) + (status->max_hp/200);

	if( sd && sd->hprecov_rate != 100 )
		val = val*sd->hprecov_rate/100;

	reg_flag = bl->type == BL_PC ? 0 : 1;

	regen->hp = cap_value(val, reg_flag, SHRT_MAX);

	val = 1 + (status->int_/6) + (status->max_sp/100);
	if( status->int_ >= 120 )
		val += ((status->int_-120)>>1) + 4;

	if( sd && sd->sprecov_rate != 100 )
		val = val*sd->sprecov_rate/100;

	regen->sp = cap_value(val, reg_flag, SHRT_MAX);

	if( sd ) {
		struct regen_data_sub *sregen;
		if( (skill=pc_checkskill(sd,HP_MEDITATIO)) > 0 ) {
			val = regen->sp*(100+3*skill)/100;
			regen->sp = cap_value(val, 1, SHRT_MAX);
		}
		// Only players have skill/sitting skill regen for now.
		sregen = regen->sregen;

		val = 0;   //------ Here?------//
		if( (skill=pc_checkskill(sd,SM_RECOVERY)) > 0 )
			val += skill*5 + skill*status->max_hp/500;

		if (sc && sc->count) {
			if (sc->data[SC_INCREASE_MAXHP])
				val += val * sc->data[SC_INCREASE_MAXHP]->val2 / 100;
		}

		sregen->hp = cap_value(val, 0, SHRT_MAX);

		val = 0;
		if( (skill=pc_checkskill(sd,MG_SRECOVERY)) > 0 )
			val += skill*3 + skill*status->max_sp/500;
		if( (skill=pc_checkskill(sd,NJ_NINPOU)) > 0 )
			val += skill*3 + skill*status->max_sp/500;
		if( (skill=pc_checkskill(sd,WM_LESSON)) > 0 )
			val += 3 + 3 * skill;

		if (sc && sc->count) {
			if (sc->data[SC_SHRIMPBLESSING])
				val *= 150 / 100;
			if (sc->data[SC_ANCILLA])
				val += sc->data[SC_ANCILLA]->val2 / 100;
			if (sc->data[SC_INCREASE_MAXSP])
				val += val * sc->data[SC_INCREASE_MAXSP]->val2 / 100;
		}

		sregen->sp = cap_value(val, 0, SHRT_MAX);

		// Skill-related recovery (only when sit)
		sregen = regen->ssregen;

		val = 0;
		if( (skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0 )
			val += skill*4 + skill*status->max_hp/500;

		if( (skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest )
			val += skill*30 + skill*status->max_hp/500;
		sregen->hp = cap_value(val, 0, SHRT_MAX);

		val = 0;
		if( (skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest ) {
			val += skill*3 + skill*status->max_sp/500;
			if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) // Power up Enjoyable Rest
				val += (30+10*skill)*val/100;
		}
		if( (skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0 )
			val += skill*2 + skill*status->max_sp/500;
		sregen->sp = cap_value(val, 0, SHRT_MAX);
	}

 

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  816
  • Reputation:   236
  • Joined:  01/30/13
  • Last Seen:  

Just try around a bit.

Basically "regen" is the normal regen and "sregen" is the sitting regen.

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
Answer this question...

×   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...