Ver código fonte

Adjusted atcommand showexp display (fixes #1401)
* Follow up to d2bbd91.
* When no base or job EXP is given the message won't display.

aleos89 9 anos atrás
pai
commit
cccb740817
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/map/pc.c

+ 2 - 2
src/map/pc.c

@@ -6577,7 +6577,7 @@ void pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in
 	if (flag&2)
 		clif_displayexp(sd, (flag&8) ? 0 : job_exp,  SP_JOBEXP, exp_flag&1, false);
 
-	if (sd->state.showexp)
+	if (sd->state.showexp && (base_exp || job_exp))
 		pc_gainexp_disp(sd, base_exp, nextb, job_exp, nextj, false);
 }
 
@@ -6605,7 +6605,7 @@ void pc_lostexp(struct map_session_data *sd, unsigned int base_exp, unsigned int
 		clif_updatestatus(sd, SP_JOBEXP);
 	}
 
-	if (sd->state.showexp)
+	if (sd->state.showexp && (base_exp || job_exp))
 		pc_gainexp_disp(sd, base_exp, pc_nextbaseexp(sd), job_exp, pc_nextjobexp(sd), true);
 }