summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.h11
-rw-r--r--src/map/pc.c54
2 files changed, 28 insertions, 37 deletions
diff --git a/src/map/clif.h b/src/map/clif.h
index a5d277dd5..069e4f4c3 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -321,7 +321,6 @@ int clif_pet_emotion(struct pet_data *pd,int param);
int clif_pet_performance(struct block_list *bl,int param);
int clif_pet_equip(struct pet_data *pd);
int clif_pet_food(struct map_session_data *sd,int foodid,int fail);
-int clif_send(const unsigned char *buf, int len, struct block_list *bl, int type);
//friends list
int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap);
@@ -339,12 +338,8 @@ int clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd,int ty
int clif_GM_silence(struct map_session_data *sd,struct map_session_data *tsd,int type);
int clif_timedout(struct map_session_data *sd);
-int clif_foreachclient(int (*)(struct map_session_data*,va_list),...);
int clif_disp_overhead(struct map_session_data *sd, const char* mes);
-int do_final_clif(void);
-int do_init_clif(void);
-
void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lhand);
int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin]
@@ -364,4 +359,10 @@ int clif_hom_food(struct map_session_data *sd,int foodid,int fail); //[orn]
void clif_send_homdata(struct map_session_data *sd, int type, int param); //[orn]
int clif_hwalkok(struct homun_data *hd); //[orn]
+int clif_foreachclient(int (*)(struct map_session_data*,va_list),...);
+int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target type);
+int do_final_clif(void);
+int do_init_clif(void);
+
+
#endif /* _CLIF_H_ */
diff --git a/src/map/pc.c b/src/map/pc.c
index 5d7ec6782..68a3e4854 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -248,7 +248,7 @@ void pc_addfame(struct map_session_data *sd,int count)
}
// Check whether a player ID is in the fame rankers' list of its job, returns his/her position if so, 0 else
-unsigned char pc_famerank(int char_id,int job)
+unsigned char pc_famerank(int char_id, int job)
{
int i;
@@ -1286,7 +1286,7 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor
return 1;
}
-static int pc_bonus_addeff(struct s_addeffect *effect, int max, short id, short rate, short arrow_rate, unsigned char flag)
+static int pc_bonus_addeff(struct s_addeffect* effect, int max, short id, short rate, short arrow_rate, unsigned char flag)
{
int i;
for (i = 0; i < max && effect[i].flag; i++) {
@@ -7101,8 +7101,7 @@ void duel_savetime(struct map_session_data* sd)
time(&timer);
t = localtime(&timer);
- pc_setglobalreg(sd, "PC_LAST_DUEL_TIME",
- t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
+ pc_setglobalreg(sd, "PC_LAST_DUEL_TIME", t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
return;
}
@@ -7115,12 +7114,11 @@ int duel_checktime(struct map_session_data* sd)
time(&timer);
t = localtime(&timer);
- diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min -
- pc_readglobalreg(sd, "PC_LAST_DUEL_TIME");
+ diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, "PC_LAST_DUEL_TIME");
return !(diff >= 0 && diff < battle_config.duel_time_interval);
}
-static int duel_showinfo_sub(struct map_session_data* sd,va_list va)
+static int duel_showinfo_sub(struct map_session_data* sd, va_list va)
{
struct map_session_data *ssd = va_arg(va, struct map_session_data*);
int *p = va_arg(va, int*);
@@ -7128,13 +7126,12 @@ static int duel_showinfo_sub(struct map_session_data* sd,va_list va)
if (sd->duel_group != ssd->duel_group) return 0;
- sprintf(output, " %d. %s", ++(*p), (unsigned char *)sd->status.name);
+ sprintf(output, " %d. %s", ++(*p), sd->status.name);
clif_disp_onlyself(ssd, output, strlen(output));
return 1;
}
-int duel_showinfo(
- const unsigned int did, struct map_session_data* sd)
+int duel_showinfo(const unsigned int did, struct map_session_data* sd)
{
int p=0;
char output[256];
@@ -7152,12 +7149,11 @@ int duel_showinfo(
duel_list[did].members_count + duel_list[did].invites_count);
clif_disp_onlyself(sd, output, strlen(output));
- clif_foreachclient(duel_showinfo_sub, sd, &p);
+ clif_foreachclient(duel_showinfo_sub, sd, &p);
return 0;
}
-int duel_create(
- struct map_session_data* sd, const unsigned int maxpl)
+int duel_create(struct map_session_data* sd, const unsigned int maxpl)
{
int i=1;
char output[256];
@@ -7179,27 +7175,24 @@ int duel_create(
return i;
}
-int duel_invite(
- const unsigned int did, struct map_session_data* sd,
- struct map_session_data* target_sd)
+int duel_invite(const unsigned int did, struct map_session_data* sd, struct map_session_data* target_sd)
{
char output[256];
- sprintf(output, msg_txt(373), // " -- Player %s invites %s to duel --"
- (unsigned char *)sd->status.name, (unsigned char *)target_sd->status.name);
-
+ // " -- Player %s invites %s to duel --"
+ sprintf(output, msg_txt(373), sd->status.name, target_sd->status.name);
clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
target_sd->duel_invite = did;
duel_list[did].invites_count++;
// "Blue -- Player %s invites you to PVP duel (@accept/@reject) --"
- sprintf(output, msg_txt(374), (unsigned char *)sd->status.name);
+ sprintf(output, msg_txt(374), sd->status.name);
clif_GMmessage((struct block_list *)target_sd, output, strlen(output)+1, 3);
return 0;
}
-static int duel_leave_sub(struct map_session_data* sd,va_list va)
+static int duel_leave_sub(struct map_session_data* sd, va_list va)
{
int did = va_arg(va, int);
if (sd->duel_invite == did)
@@ -7207,13 +7200,12 @@ static int duel_leave_sub(struct map_session_data* sd,va_list va)
return 0;
}
-int duel_leave(
- const unsigned int did, struct map_session_data* sd)
+int duel_leave(const unsigned int did, struct map_session_data* sd)
{
char output[256];
// " <- Player %s has left duel --"
- sprintf(output, msg_txt(375), (unsigned char *)sd->status.name);
+ sprintf(output, msg_txt(375), sd->status.name);
clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
duel_list[did].members_count--;
@@ -7229,8 +7221,7 @@ int duel_leave(
return 0;
}
-int duel_accept(
- const unsigned int did, struct map_session_data* sd)
+int duel_accept(const unsigned int did, struct map_session_data* sd)
{
char output[256];
@@ -7240,7 +7231,7 @@ int duel_accept(
sd->duel_invite = 0;
// " -> Player %s has accepted duel --"
- sprintf(output, msg_txt(376), (unsigned char *)sd->status.name);
+ sprintf(output, msg_txt(376), sd->status.name);
clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
clif_set0199(sd->fd, 1);
@@ -7248,13 +7239,12 @@ int duel_accept(
return 0;
}
-int duel_reject(
- const unsigned int did, struct map_session_data* sd)
+int duel_reject(const unsigned int did, struct map_session_data* sd)
{
char output[256];
// " -- Player %s has rejected duel --"
- sprintf(output, msg_txt(377), (unsigned char *)sd->status.name);
+ sprintf(output, msg_txt(377), sd->status.name);
clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
duel_list[did].invites_count--;
@@ -7275,7 +7265,7 @@ int pc_split_str(char *str,char **val,int num)
return i;
}
-int pc_split_atoi(char *str,int *val, char sep, int max)
+int pc_split_atoi(char* str, int* val, char sep, int max)
{
int i,j;
for (i=0; i<max; i++) {
@@ -7291,7 +7281,7 @@ int pc_split_atoi(char *str,int *val, char sep, int max)
return i;
}
-int pc_split_atoui(char *str,unsigned int *val, char sep, int max)
+int pc_split_atoui(char* str, unsigned int* val, char sep, int max)
{
static int warning=0;
int i,j;