Jump to content
  • 0

Capping Monster Level Up


PedroProplayer

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   4
  • Joined:  10/10/13
  • Last Seen:  

My max level is 255 and I want to cap monster level up to 140. I'm using 3CeAM but the code for both is the same in this case so I'm asking here where more people will see it.

Original code:

case BL_MOB:
	{
		struct mob_data *md=(struct mob_data *)src;
		if(md->target_id==sd->bl.id)
			mob_unlocktarget(md,tick);
		if(battle_config.mobs_level_up && md->status.hp &&
			(unsigned int)md->level < pc_maxbaselv(sd) &&
			!md->guardian_data && !md->special_state.ai// Guardians/summons should not level. [Skotlex]
		) { 	// monster level up [Valaris]
			clif_misceffect(&md->bl,0);
			md->level++;
			status_calc_mob(md, 0);
			status_percent_heal(src,10,0);

			if( battle_config.show_mob_info&4 )
			{// update name with new level
				clif_charnameack(0, &md->bl);
			}
		}
		src = battle_get_master(src); // Maybe Player Summon
	}
	break;

My alteration:

if(battle_config.mobs_level_up && md->status.hp &&
			(unsigned int)md->level < 140 &&

As you can see, I replaced pc_maxbaselv(sd) with the value 140. Saved, recompiled, tested. No errors or crashes but the change did not take effect. I tried summoning a Randgris and letting it kill me and it leveled up past 140. Any suggestions on how to handle this?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   4
  • Joined:  10/10/13
  • Last Seen:  

Nevermind, I was being dumb and testing on the wrong server lol. This change works and I'll leave it here as reference I suppose. This is on pc.c by the way.

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