conf/messages.conf | 3 +++ src/map/atcommand.c | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/conf/messages.conf b/conf/messages.conf index 8b3daa6..5445c2d 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -364,6 +364,8 @@ 334: Total Domination // Templates for @who output +341: %d players found. ( %d Players and %d Autotrade ) +342: %d players found in map '%s'. ( %d Players and %d Autotrade ) 343: Name: %s 344: (%s) 345: | Party: '%s' @@ -372,6 +374,7 @@ 347: | Lv:%d/%d | Job: %s //You may ommit 2 last %d, then you won't see players coords, just map name 348: | Location: %s %d %d +349: | Autotrade // @duel (part 1) 350: Duel: You can't use @invite. You aren't a duelist. diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2849ada..f610548 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -531,8 +531,7 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { struct s_mapiterator *iter = NULL; char map_name[MAP_NAME_LENGTH_EXT] = ""; char player_name[NAME_LENGTH] = ""; - int count = 0; - int level = 0; + int count = 0, level = 0, atcount = 0; StringBuf buf; /** * 1 = @who : Player name, [Title], [Party name], [Guild name] @@ -592,12 +591,16 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { StrBuf->Printf(&buf, msg_txt(345), p->party.name); // " | Party: '%s'" if (g != NULL) StrBuf->Printf(&buf, msg_txt(346), g->name); // " | Guild: '%s'" + if ( pl_sd->state.autotrade ) + StrBuf->Printf( &buf, msg_txt(349) ); // " | Autotrade" break; } } clif->message(fd, StrBuf->Value(&buf)); StrBuf->Clear(&buf); count++; + if ( pl_sd->state.autotrade ) + atcount++; } } mapit->free(iter); @@ -607,6 +610,8 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { StrBuf->Printf(&buf, msg_txt(28)); // No player found. else if (count == 1) StrBuf->Printf(&buf, msg_txt(29)); // 1 player found. + else if ( atcount > 0 ) + StrBuf->Printf(&buf, msg_txt(341), count, count - atcount, atcount); // %d players found. ( %d Players and %d Autotrade ) else StrBuf->Printf(&buf, msg_txt(30), count); // %d players found. } else { @@ -614,6 +619,8 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { StrBuf->Printf(&buf, msg_txt(54), map->list[map_id].name); // No player found in map '%s'. else if (count == 1) StrBuf->Printf(&buf, msg_txt(55), map->list[map_id].name); // 1 player found in map '%s'. + else if ( atcount > 0 ) + StrBuf->Printf(&buf, msg_txt(342), count, map->list[map_id].name, count - atcount, atcount); // %d players found in map '%s'. ( %d Players and %d Autotrade ) else StrBuf->Printf(&buf, msg_txt(56), count, map->list[map_id].name); // %d players found in map '%s'. }