|
@@ -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;
|