Jump to content
  • 0

Increase HP & SP Recovery Tick


Question

Posted

How do I change the default regen tick from 10s to 5s?
Am I looking on correct codes?

		// 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->getSCE(SC_INCREASE_MAXHP))
				val += val * sc->getSCE(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->getSCE(SC_ANCILLA))
				val += sc->getSCE(SC_ANCILLA)->val2 / 100;
			if (sc->getSCE(SC_INCREASE_MAXSP))
				val += val * sc->getSCE(SC_INCREASE_MAXSP)->val2 / 100;
		}

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

		// Skill-related recovery (only when sit)

I tried changing both of these codes but the tick time didn't change.
val += val * sc->getSCE(SC_INCREASE_MAXHP)->val2 / 100;
val += val * sc->getSCE(SC_INCREASE_MAXSP)->val2 / 100;
to 
val += val * sc->getSCE(SC_INCREASE_MAXHP)->val2 / 50;
val += val * sc->getSCE(SC_INCREASE_MAXSP)->val2 / 50;

1 answer to this question

Recommended Posts

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...