make give/take gold/food DRY
This commit is contained in:
@@ -141,17 +141,6 @@ void edit_day() {
|
||||
univ.party.age = (long long) (3700) * (long long) (dialog_answer);
|
||||
}
|
||||
|
||||
void give_gold(short amount,bool /*print_result*/) {
|
||||
univ.party.gold = univ.party.gold + amount;
|
||||
}
|
||||
|
||||
bool take_gold(short amount,bool /*print_result*/) {
|
||||
if(univ.party.gold < amount)
|
||||
return false;
|
||||
univ.party.gold = univ.party.gold - amount;
|
||||
return true;
|
||||
}
|
||||
|
||||
void edit_xp(cPlayer *pc) {
|
||||
location view_loc;
|
||||
|
||||
|
@@ -1,8 +1,6 @@
|
||||
|
||||
class cDialog;
|
||||
|
||||
void give_gold(short amount,bool print_result);
|
||||
bool take_gold(short amount,bool print_result);
|
||||
void give_spec_items();
|
||||
void pick_race_abil(cPlayer *pc,short mode,cDialog* parent = nullptr);
|
||||
void reset_boats();
|
||||
|
Reference in New Issue
Block a user