|
@@ -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
|
|
|
|
-* @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) {
|
|
if(sd->spiritball <= 0) {
|
|
sd->spiritball = 0;
|
|
sd->spiritball = 0;
|
|
- return 0;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(count <= 0)
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if(count == 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 ) {
|