diff --git a/src/map/pc.c b/src/map/pc.c index 254d1e7d30..c27a740910 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -184,13 +184,13 @@ static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data * @param sd * @param interval * @param max -* @return 0 */ -int pc_addspiritball(struct map_session_data *sd,int interval,int max) +void pc_addspiritball(struct map_session_data *sd,int interval,int max) { - int tid, i; + int tid; + uint8 i; - nullpo_ret(sd); + nullpo_retv(sd); if(max > MAX_SKILL_LEVEL) max = MAX_SKILL_LEVEL; @@ -217,30 +217,27 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) clif_millenniumshield(sd,sd->spiritball); else clif_spiritball(&sd->bl); - - return 0; } /** * Removes number of spiritball from player * @param sd * @param count -* @param type 0 = gives client effect -* @return 0 +* @param type 1 = doesn't give client effect */ -int pc_delspiritball(struct map_session_data *sd,int count,int type) +void pc_delspiritball(struct map_session_data *sd,int count,int type) { - int i; + uint8 i; - nullpo_ret(sd); + nullpo_retv(sd); if(sd->spiritball <= 0) { sd->spiritball = 0; - return 0; + return; } - if(count <= 0) - return 0; + if(count == 0) + return; if(count > sd->spiritball) count = sd->spiritball; sd->spiritball -= count; @@ -264,7 +261,6 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type) else clif_spiritball(&sd->bl); } - return 0; } static int pc_check_banding( struct block_list *bl, va_list ap ) { diff --git a/src/map/pc.h b/src/map/pc.h index 221716416b..f1ce1115f3 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1016,8 +1016,8 @@ extern const struct sg_data sg_info[MAX_PC_FEELHATE]; void pc_setinvincibletimer(struct map_session_data* sd, int val); void pc_delinvincibletimer(struct map_session_data* sd); -int pc_addspiritball(struct map_session_data *sd,int interval,int max); -int pc_delspiritball(struct map_session_data *sd,int count,int type); +void pc_addspiritball(struct map_session_data *sd,int interval,int max); +void pc_delspiritball(struct map_session_data *sd,int count,int type); void pc_addfame(struct map_session_data *sd,int count); unsigned char pc_famerank(int char_id, int job); bool pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl);