Jump to content
  • 0
Sign in to follow this  
Zirius

[HELP] cannot "Allow zero base/job exp gain"

Question

first, at renewal environment

 

db\re\level_penalty.txt

1,12,2,0
1,12,-2,0

meaning 3 level difference, monster won't give any form of experience

 

src\map\pc.c

 

int pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type)
{
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
	int rate = 100, i;

	if( diff < 0 )
		diff = MAX_LEVEL + ( ~diff + 1 );

	for (i = RC_FORMLESS; i < RC_MAX; i++) {
		int tmp;

		if (race != i) {
			if (mode&MD_BOSS && i < RC_BOSS)
				i = RC_BOSS;
			else if (i <= RC_BOSS)
				continue;
		}

		if ((tmp=pc->level_penalty[type][i][diff]) > 0) {
			rate = tmp;
			break;
		}
                // Allow rate = 0
                if ((tmp=pc->level_penalty[type][i][diff]) == 0) {
                    rate = 0;
                    break;
                }
	}

	return rate;
#else
	return 100;
#endif
}

allow looping for pc->level_penalty[type][diff]) == 0, then assign rate = 0

 

src\map\mob.c

 

#ifdef RENEWAL_EXP
					int rate = pc->level_penalty_mod(md->level - (tmpsd[i])->status.base_level, md->status.race, md->status.mode, 1);
					base_exp = (unsigned int)cap_value(base_exp * rate / 100, 0, UINT_MAX);
					job_exp = (unsigned int)cap_value(job_exp * rate / 100, 0, UINT_MAX);
#endif

cap_value(a, min, UINT_MAX), where min was changed to 0 from 1, allow min to be 0. if zero base_exp and job_exp both 0.

 

But still:

 

monster is giving 1 exp


IN3n6pk.png

 

Is there other place where this is hardcoded?

 

Thanks!

Edited by Zirius

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.