From 2ba08eae75f05d5a81494c7e3b98286796635cb3 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Sat, 6 Feb 2010 05:08:37 +0000 Subject: 2010/02/06 * Added official packet to display received expirience. (info provided by papkil) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 068e6ce8f..0df3cda48 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4743,9 +4743,8 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi /*========================================== * ??’lŽæ“¾ *------------------------------------------*/ -int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp) +int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool quest) { - char output[256]; float nextbp=0, nextjp=0; unsigned int nextb=0, nextj=0; nullpo_retr(0, sd); @@ -4808,9 +4807,17 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int } if(sd->state.showexp){ +#if PACKETVER >= 20091027 + if(base_exp) + clif_displayexp(sd, base_exp, 1, quest); + if(job_exp) + clif_displayexp(sd, job_exp, 2, quest); +#else + char output[256]; sprintf(output, "Experience Gained Base:%u (%.2f%%) Job:%u (%.2f%%)",base_exp,nextbp*(float)100,job_exp,nextjp*(float)100); clif_disp_onlyself(sd,output,strlen(output)); +#endif } return 1; -- cgit v1.2.3-60-g2f50