diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 59222a7d5..f94415607 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1433,7 +1433,8 @@ ACMD_FUNC(item) } } - clif_displaymessage(fd, msg_txt(18)); // Item created. + if (flag == 0) + clif_displaymessage(fd, msg_txt(18)); // Item created. return 0; } @@ -1504,7 +1505,8 @@ ACMD_FUNC(item2) clif_additem(sd, 0, 0, flag); } - clif_displaymessage(fd, msg_txt(18)); // Item created. + if (flag == 0) + clif_displaymessage(fd, msg_txt(18)); // Item created. } else { clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name. return -1; @@ -3264,11 +3266,11 @@ ACMD_FUNC(doommap) *------------------------------------------*/ static void atcommand_raise_sub(struct map_session_data* sd) { - if (!status_isdead(&sd->bl)) - return; - - if(!status_revive(&sd->bl, 100, 100)) - return; + if(pc_isdead(sd)) + status_revive(&sd->bl, 100, 100); + else + status_percent_heal(&sd->bl, 100, 100); + clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1); clif_displaymessage(sd->fd, msg_txt(63)); // Mercy has been shown. } @@ -4602,21 +4604,21 @@ char* txt_time(unsigned int duration) minutes = duration / 60; seconds = duration - (60 * minutes); - if (days < 2) + if (days == 1) sprintf(temp, msg_txt(219), days); // %d day - else + else if (days > 1) sprintf(temp, msg_txt(220), days); // %d days - if (hours < 2) + if (hours == 1) sprintf(temp1, msg_txt(221), temp, hours); // %s %d hour - else + else if (hours > 1) sprintf(temp1, msg_txt(222), temp, hours); // %s %d hours if (minutes < 2) sprintf(temp, msg_txt(223), temp1, minutes); // %s %d minute else sprintf(temp, msg_txt(224), temp1, minutes); // %s %d minutes - if (seconds < 2) + if (seconds == 1) sprintf(temp1, msg_txt(225), temp, seconds); // %s and %d second - else + else if (seconds > 1) sprintf(temp1, msg_txt(226), temp, seconds); // %s and %d seconds return temp1; @@ -6326,6 +6328,12 @@ ACMD_FUNC(pettalk) nullpo_retr(-1, sd); + if ( battle_config.min_chat_delay ) { + if( DIFF_TICK(sd->cantalk_tick, gettick()) > 0 ) + return 0; + sd->cantalk_tick = gettick() + battle_config.min_chat_delay; + } + if(!sd->status.pet_id || !(pd=sd->pd)) { clif_displaymessage(fd, msg_txt(184)); @@ -7088,6 +7096,12 @@ ACMD_FUNC(homtalk) nullpo_retr(-1, sd); + if ( battle_config.min_chat_delay ) { + if( DIFF_TICK(sd->cantalk_tick, gettick()) > 0 ) + return 0; + sd->cantalk_tick = gettick() + battle_config.min_chat_delay; + } + if (sd->sc.count && //no "chatting" while muted. (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT))) @@ -8084,6 +8098,12 @@ ACMD_FUNC(main) return -1; } + if ( battle_config.min_chat_delay ) { + if( DIFF_TICK(sd->cantalk_tick, gettick()) > 0 ) + return 0; + sd->cantalk_tick = gettick() + battle_config.min_chat_delay; + } + // send the message using inter-server system intif_main_message( sd, message ); } |