int is too much for 'i' that limited to MAX_SKILL_LEVEL 100. :P

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
Cydh Ramdh 2014-02-23 19:13:26 +07:00
parent 992c382562
commit 98f7a78133
2 changed files with 13 additions and 17 deletions

View File

@ -184,13 +184,13 @@ static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data
* @param sd * @param sd
* @param interval * @param interval
* @param max * @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) if(max > MAX_SKILL_LEVEL)
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); clif_millenniumshield(sd,sd->spiritball);
else else
clif_spiritball(&sd->bl); clif_spiritball(&sd->bl);
return 0;
} }
/** /**
* Removes number of spiritball from player * Removes number of spiritball from player
* @param sd * @param sd
* @param count * @param count
* @param type 0 = gives client effect * @param type 1 = doesn't give client effect
* @return 0
*/ */
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) { if(sd->spiritball <= 0) {
sd->spiritball = 0; sd->spiritball = 0;
return 0; return;
} }
if(count <= 0) if(count == 0)
return 0; return;
if(count > sd->spiritball) if(count > sd->spiritball)
count = sd->spiritball; count = sd->spiritball;
sd->spiritball -= count; sd->spiritball -= count;
@ -264,7 +261,6 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
else else
clif_spiritball(&sd->bl); clif_spiritball(&sd->bl);
} }
return 0;
} }
static int pc_check_banding( struct block_list *bl, va_list ap ) { static int pc_check_banding( struct block_list *bl, va_list ap ) {

View File

@ -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_setinvincibletimer(struct map_session_data* sd, int val);
void pc_delinvincibletimer(struct map_session_data* sd); void pc_delinvincibletimer(struct map_session_data* sd);
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 pc_delspiritball(struct map_session_data *sd,int count,int type); void pc_delspiritball(struct map_session_data *sd,int count,int type);
void pc_addfame(struct map_session_data *sd,int count); void pc_addfame(struct map_session_data *sd,int count);
unsigned char pc_famerank(int char_id, int job); 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); bool pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl);