diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-29 01:06:07 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-29 01:06:07 -0700 |
commit | 66d9bbd8356dca3d0b07145d1eea21de2d4789cc (patch) | |
tree | dbc78a23e474a38b0927e749442698c6d4b96d55 /crawl-ref/source/l_you.cc | |
parent | aefbb02ff564f3b513476f82d144c7c92b2bbb05 (diff) | |
download | crawl-ref-66d9bbd8356dca3d0b07145d1eea21de2d4789cc.tar.gz crawl-ref-66d9bbd8356dca3d0b07145d1eea21de2d4789cc.zip |
FR 2839627: notify when player has enough gold
The basics of a wish-list/shopping-list. While in a shop the
shopping-list can be modified, and the player is notified as soon as
they have enough money to buy things on the shopping-list.
Diffstat (limited to 'crawl-ref/source/l_you.cc')
-rw-r--r-- | crawl-ref/source/l_you.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc index 5893fe1dcd..79d4295b63 100644 --- a/crawl-ref/source/l_you.cc +++ b/crawl-ref/source/l_you.cc @@ -263,7 +263,7 @@ static int _you_gold(lua_State *ls) { const int new_gold = luaL_checkint(ls, 1); const int old_gold = you.gold; - you.gold = std::max(new_gold, 0); + you.set_gold( std::max(new_gold, 0) ); if (new_gold > old_gold) you.attribute[ATTR_GOLD_FOUND] += new_gold - old_gold; else if (old_gold > new_gold) |