diff options
author | Haru <haru@dotalux.com> | 2015-06-02 02:16:55 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-06-02 02:22:51 +0200 |
commit | d66cc50af6d781d179f46ae67d74bf26bf5914e5 (patch) | |
tree | ec129bc522ea712eddecc80f9e5697b9bba7d88e /src/map/atcommand.c | |
parent | ad958235cfc56b86da89bdc2aa1e5155b0c006a1 (diff) | |
download | hercules-d66cc50af6d781d179f46ae67d74bf26bf5914e5.tar.gz hercules-d66cc50af6d781d179f46ae67d74bf26bf5914e5.tar.bz2 hercules-d66cc50af6d781d179f46ae67d74bf26bf5914e5.tar.xz hercules-d66cc50af6d781d179f46ae67d74bf26bf5914e5.zip |
Re-implemented clif->colormes to accept arbitrary colors
- Due to the backward-incompatible change, clif->colormes was renamed to
clif->messagecolor_self (for similarity with clif->messagecolor). The
'color' argument is now a 0xRRGGBB color rather than a color_table
index.
- enum clif_colors is no longer needed, but 0xRRGGBB-based constants
are now provided to replace the old COLOR_* values.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 47e874492..f42a6332d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -664,7 +664,7 @@ ACMD(who) { break; } } - clif->colormes(fd, COLOR_DEFAULT, StrBuf->Value(&buf));/** for whatever reason clif->message crashes with some patterns, see bugreport:8186 **/ + clif->messagecolor_self(fd, COLOR_DEFAULT, StrBuf->Value(&buf));/** for whatever reason clif->message crashes with some patterns, see bugreport:8186 **/ StrBuf->Clear(&buf); count++; } @@ -7941,10 +7941,10 @@ ACMD(feelreset) /*========================================== * AUCTION SYSTEM *------------------------------------------*/ -ACMD(auction) { - - if( !battle_config.feature_auction ) { - clif->colormes(sd->fd,COLOR_RED,msg_fd(fd,1484)); +ACMD(auction) +{ + if (!battle_config.feature_auction) { + clif->messagecolor_self(sd->fd, COLOR_RED, msg_fd(fd,1484)); return false; } @@ -9953,11 +9953,12 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa } for(i = 0; i < map->list[sd->bl.m].zone->disabled_commands_count; i++) { if( info->func == map->list[sd->bl.m].zone->disabled_commands[i]->cmd ) { - if( pc_get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv ) { - clif->colormes(sd->fd,COLOR_RED,"This command is disabled in this area"); + if (pc_get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv) { + clif->messagecolor_self(sd->fd, COLOR_RED, "This command is disabled in this area"); return true; - } else + } else { break;/* already found the matching command, no need to keep checking -- just go on */ + } } } } |