From afe3490781c1d35e452a52a53988526b72cea61e Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 11 Feb 2011 19:48:57 +0100 Subject: Fix basic money handling using the ATTR_GP attribute. Reviewed-by: Freeyorp. --- scripts/lua/libmana.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/lua/libmana.lua b/scripts/lua/libmana.lua index 8ea5168..787edfe 100644 --- a/scripts/lua/libmana.lua +++ b/scripts/lua/libmana.lua @@ -423,13 +423,15 @@ end -- Below are some convenience methods added to the engine API - mana.chr_money_change = function(ch, amount) - return mana.chr_inv_change(ch, 0, amount) + mana.being_set_base_attribute( + ch, + ATTR_GP, + mana.being_get_base_attribute(ch, ATTR_GP) + amount) end mana.chr_money = function(ch) - return mana.chr_inv_count(ch, 0) + return mana.being_get_base_attribute(ch, ATTR_GP) end -- cgit