diff options
Diffstat (limited to 'src/map/duel.c')
-rw-r--r-- | src/map/duel.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/duel.c b/src/map/duel.c index 4e41865d4..af2741f77 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -24,7 +24,7 @@ void duel_savetime(struct map_session_data* sd) { time(&clock); t = localtime(&clock); - pc_setglobalreg(sd, "PC_LAST_DUEL_TIME", t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min); + 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) { @@ -35,7 +35,7 @@ int duel_checktime(struct map_session_data* sd) { time(&clock); t = localtime(&clock); - 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, script->add_str("PC_LAST_DUEL_TIME") ); return !(diff >= 0 && diff < battle_config.duel_time_interval); } @@ -48,7 +48,7 @@ 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), sd->status.name); - clif->disp_onlyself(ssd, output, strlen(output)); + clif_disp_onlyself(ssd, output, strlen(output)); return 1; } @@ -68,7 +68,7 @@ void duel_showinfo(const unsigned int did, struct map_session_data* sd) { duel->list[did].members_count, duel->list[did].members_count + duel->list[did].invites_count); - clif->disp_onlyself(sd, output, strlen(output)); + clif_disp_onlyself(sd, output, strlen(output)); map->foreachpc(duel_showinfo_sub, sd, &p); } @@ -86,7 +86,7 @@ int duel_create(struct map_session_data* sd, const unsigned int maxpl) { duel->list[i].max_players_limit = maxpl; strcpy(output, msg_txt(372)); // " -- Duel has been created (@invite/@leave) --" - clif->disp_onlyself(sd, output, strlen(output)); + clif_disp_onlyself(sd, output, strlen(output)); clif->map_property(sd, MAPPROPERTY_FREEPVPZONE); clif->maptypeproperty2(&sd->bl,SELF); @@ -166,7 +166,10 @@ void duel_reject(const unsigned int did, struct map_session_data* sd) { void do_final_duel(void) { } -void do_init_duel(void) { +void do_init_duel(bool minimal) { + if (minimal) + return; + memset(&duel->list[0], 0, sizeof(duel->list)); } |