summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tileweb.cc
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2013-05-30 12:20:48 +0200
committerFlorian Diebold <flodiebold@gmail.com>2013-05-30 12:21:19 +0200
commit1f3dc0b68c543cca2113e7f1f765062d77153914 (patch)
tree066216b833f85f133f1fc9d8e391e21f52cedc7f /crawl-ref/source/tileweb.cc
parentcac1a80dd47b1c0aecbecc913acbf3b56c89a36a (diff)
downloadcrawl-ref-1f3dc0b68c543cca2113e7f1f765062d77153914.tar.gz
crawl-ref-1f3dc0b68c543cca2113e7f1f765062d77153914.zip
Send correct max hp for Djinni to the webtiles client.
Diffstat (limited to 'crawl-ref/source/tileweb.cc')
-rw-r--r--crawl-ref/source/tileweb.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/tileweb.cc b/crawl-ref/source/tileweb.cc
index 921cadfec9..053fd98bd0 100644
--- a/crawl-ref/source/tileweb.cc
+++ b/crawl-ref/source/tileweb.cc
@@ -635,9 +635,16 @@ void TilesFramework::_send_player(bool force_full)
_update_int(force_full, c.hp, you.hp, "hp");
_update_int(force_full, c.hp_max, you.hp_max, "hp_max");
- _update_int(force_full, c.real_hp_max, get_real_hp(true, true), "real_hp_max");
- _update_int(force_full, c.mp, you.magic_points, "mp");
- _update_int(force_full, c.mp_max, you.max_magic_points, "mp_max");
+ int max_max_hp = get_real_hp(true, true);
+ if (you.species == SP_DJINNI)
+ max_max_hp += get_real_mp(true); // compare _print_stats_hp
+ _update_int(force_full, c.real_hp_max, max_max_hp, "real_hp_max");
+
+ if (you.species != SP_DJINNI)
+ {
+ _update_int(force_full, c.mp, you.magic_points, "mp");
+ _update_int(force_full, c.mp_max, you.max_magic_points, "mp_max");
+ }
if (you.species == SP_DJINNI)
_update_int(force_full, c.contam, you.magic_contamination, "contam");