Logging to help track any new wb gold bugs.

This commit is contained in:
Gabriel Morin 2011-11-30 05:29:47 +00:00
parent 58975a8787
commit 0f297791a8
2 changed files with 15 additions and 2 deletions

View file

@ -595,6 +595,19 @@ void side_actions::validate_actions()
}
}
void side_actions::change_gold_spent_by(int difference)
{
LOG_WB << "Changing gold spent for side " << (team_index() + 1) << "; old value: "
<< gold_spent_ << "; new value: " << (gold_spent_ + difference) << "\n";
gold_spent_ += difference; assert(gold_spent_ >= 0);
}
void side_actions::reset_gold_spent()
{
LOG_WB << "Resetting gold spent for side " << (team_index() + 1) << " to 0.\n";
gold_spent_ = 0;
}
/* private */
void side_actions::update_size()
{

View file

@ -242,9 +242,9 @@ public:
///Used to track gold spending by recruits/recalls when building the future unit map
int get_gold_spent() const { return gold_spent_; }
///Used to track gold spending by recruits/recalls when building the future unit map
void change_gold_spent_by(int difference) { gold_spent_ += difference; assert(gold_spent_ >= 0);}
void change_gold_spent_by(int difference);
///Set gold spent back to zero
void reset_gold_spent() { gold_spent_ = 0; }
void reset_gold_spent();
void raw_turn_shift();
void synced_turn_shift();