From 4ea76daf4972bdcf58483a6c20f71700d58cf561 Mon Sep 17 00:00:00 2001 From: celest Date: Wed, 8 Dec 2004 10:06:14 +0000 Subject: Fixed crash with supernovices with 100% base exp git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@511 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index ca8d3b602..3fb63c57b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5433,8 +5433,12 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) pc_calcstatus(sd,0); // activate Steel body if a super novice dies at 99+% exp [celest] - if (s_class.job == 23 && (i=sd->status.base_exp*1000/pc_nextbaseexp(sd))>=990 && i<=1000) - sd->state.snovice_flag = 4; + if (s_class.job == 23) { + if ((i=pc_nextbaseexp(sd))<=0) + i=sd->status.base_exp; + if ((j=sd->status.base_exp*1000/i)>=990 && j<=1000) + sd->state.snovice_flag = 4; + } for(i=0;i<5;i++) if(sd->dev.val1[i]){ -- cgit v1.2.3-70-g09d2