diff options
author | Pekka Lampila <pekka.lampila@iki.fi> | 2014-03-06 14:34:27 +0200 |
---|---|---|
committer | Pekka Lampila <pekka.lampila@iki.fi> | 2014-03-06 14:39:11 +0200 |
commit | 41ab900690ec9866c6b40630fa2b6bc519a45df7 (patch) | |
tree | 150dc04d9802b3389f28e5bfa233b1e980819e6f /crawl-ref/source/tileweb.cc | |
parent | 993d327bd5995684935d516d879387a00e0e19c0 (diff) | |
download | crawl-ref-41ab900690ec9866c6b40630fa2b6bc519a45df7.tar.gz crawl-ref-41ab900690ec9866c6b40630fa2b6bc519a45df7.zip |
Fix sending inventory item colour if name didn't change.
Most notably cursing an artefact weapon didn't update the HUD.
Diffstat (limited to 'crawl-ref/source/tileweb.cc')
-rw-r--r-- | crawl-ref/source/tileweb.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/crawl-ref/source/tileweb.cc b/crawl-ref/source/tileweb.cc index 7a72fea4d1..30ec8f5dd9 100644 --- a/crawl-ref/source/tileweb.cc +++ b/crawl-ref/source/tileweb.cc @@ -867,17 +867,14 @@ void TilesFramework::_send_item(item_info& current, const item_info& next, { string name = next.name(DESC_A, true, false, true); if (force_full || current.name(DESC_A, true, false, true) != name) - { json_write_string("name", name); - const string current_prefix = item_prefix(current); - const string prefix = item_prefix(next); - - const int current_prefcol = menu_colour(current.name(DESC_INVENTORY), current_prefix); - const int prefcol = menu_colour(next.name(DESC_INVENTORY), prefix); - if (force_full || current_prefcol != prefcol) - json_write_int("col", prefcol); - } + const string current_prefix = item_prefix(current); + const string prefix = item_prefix(next); + const int current_prefcol = menu_colour(current.name(DESC_INVENTORY), current_prefix); + const int prefcol = menu_colour(next.name(DESC_INVENTORY), prefix); + if (force_full || current_prefcol != prefcol) + json_write_int("col", prefcol); tileidx_t tile = tileidx_item(next); if (force_full || tileidx_item(current) != tile) |