Added increase_gold/bank funcs to prevent cash overflow

This commit is contained in:
JamDog 2010-11-26 14:08:54 +00:00
parent a95ac76ef7
commit 4892b22a51
13 changed files with 230 additions and 101 deletions

View file

@ -837,7 +837,7 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
{
happy_gold = (long)(GET_GOLD(victim) * (((float)(HAPPY_GOLD))/(float)100));
happy_gold = MAX(0, happy_gold);
GET_GOLD(victim) += happy_gold;
increase_gold(victim, happy_gold);
}
local_gold = GET_GOLD(victim);
sprintf(local_buf,"%ld", (long)local_gold);