diff options
Diffstat (limited to 'src/map/duel.c')
-rw-r--r-- | src/map/duel.c | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/map/duel.c b/src/map/duel.c index d22c34495..39e5b5253 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -33,13 +33,14 @@ #include <string.h> #include <time.h> -struct duel_interface duel_s; +static struct duel_interface duel_s; struct duel_interface *duel; /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ -void duel_savetime(struct map_session_data* sd) { +static void duel_savetime(struct map_session_data *sd) +{ time_t clock; struct tm *t; @@ -49,7 +50,8 @@ void duel_savetime(struct map_session_data* sd) { pc_setglobalreg(sd, script->add_str("PC_LAST_DUEL_TIME"), t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min); } -int duel_checktime(struct map_session_data* sd) { +static int duel_checktime(struct map_session_data *sd) +{ int diff; time_t clock; struct tm *t; @@ -62,7 +64,7 @@ int duel_checktime(struct map_session_data* sd) { 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*); @@ -77,7 +79,8 @@ static int duel_showinfo_sub(struct map_session_data* sd, va_list va) return 1; } -void duel_showinfo(const unsigned int did, struct map_session_data* sd) { +static void duel_showinfo(const unsigned int did, struct map_session_data *sd) +{ int p=0; char output[256]; @@ -97,7 +100,8 @@ void duel_showinfo(const unsigned int did, struct map_session_data* sd) { map->foreachpc(duel_showinfo_sub, sd, &p); } -int duel_create(struct map_session_data* sd, const unsigned int maxpl) { +static int duel_create(struct map_session_data *sd, const unsigned int maxpl) +{ int i=1; char output[256]; @@ -120,7 +124,8 @@ int duel_create(struct map_session_data* sd, const unsigned int maxpl) { return i; } -void duel_invite(const unsigned int did, struct map_session_data* sd, struct map_session_data* target_sd) { +static void duel_invite(const unsigned int did, struct map_session_data *sd, struct map_session_data *target_sd) +{ char output[256]; nullpo_retv(sd); @@ -137,7 +142,7 @@ void duel_invite(const unsigned int did, struct map_session_data* sd, struct map clif->broadcast(&target_sd->bl, output, (int)strlen(output)+1, BC_BLUE, SELF); } -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); nullpo_ret(sd); @@ -146,7 +151,8 @@ static int duel_leave_sub(struct map_session_data* sd, va_list va) return 0; } -void duel_leave(const unsigned int did, struct map_session_data* sd) { +static void duel_leave(const unsigned int did, struct map_session_data *sd) +{ char output[256]; nullpo_retv(sd); @@ -166,7 +172,8 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) { clif->maptypeproperty2(&sd->bl,SELF); } -void duel_accept(const unsigned int did, struct map_session_data* sd) { +static void duel_accept(const unsigned int did, struct map_session_data *sd) +{ char output[256]; nullpo_retv(sd); @@ -183,7 +190,8 @@ void duel_accept(const unsigned int did, struct map_session_data* sd) { clif->maptypeproperty2(&sd->bl,SELF); } -void duel_reject(const unsigned int did, struct map_session_data* sd) { +static void duel_reject(const unsigned int did, struct map_session_data *sd) +{ char output[256]; nullpo_retv(sd); @@ -195,10 +203,12 @@ void duel_reject(const unsigned int did, struct map_session_data* sd) { sd->duel_invite = 0; } -void do_final_duel(void) { +static void do_final_duel(void) +{ } -void do_init_duel(bool minimal) { +static void do_init_duel(bool minimal) +{ if (minimal) return; @@ -206,11 +216,12 @@ void do_init_duel(bool minimal) { } /*===================================== -* Default Functions : duel.h -* Generated by HerculesInterfaceMaker -* created by Susu -*-------------------------------------*/ -void duel_defaults(void) { + * Default Functions : duel.h + * Generated by HerculesInterfaceMaker + * created by Susu + *-------------------------------------*/ +void duel_defaults(void) +{ duel = &duel_s; /* vars */ duel->count = 0; |