Preventing attack events from trickering unit advancement with unstore

(bug # 10590)
This commit is contained in:
Pauli Nieminen 2008-01-02 21:31:55 +00:00
parent e6eaad4785
commit 3620090a22
3 changed files with 8 additions and 5 deletions

View file

@ -33,6 +33,7 @@ Version 1.3.13+svn:
fixed in a later state. This could lead to some units not leveling
properly (bug #10304)
* validate vector access for colours (bug #10622)
* Fixed oos on unit advancement if wml had battle/die events (bug #10590)
* added serveral fixes to compile with Sun Studio compiler (patch #911)
* bumped autoconf version requirement to 2.61 since it's needed for the
boost tests (bug #10636)

View file

@ -10,6 +10,7 @@ Version 1.3.13+svn:
* Sound and music:
* The timer bell in MP starts when there are 20 seconds left and fades in
gradually for 10 seconds.
* Fixed oos on unit advancement if wml had battle/die events
* Fixed timer bell not always playing.
Version 1.3.13:

View file

@ -810,6 +810,8 @@ attack::~attack()
delete bc_;
}
//! Battle logic
attack::attack(game_display& gui, const gamemap& map,
std::vector<team>& teams,
gamemap::location attacker,
@ -819,7 +821,7 @@ attack::attack(game_display& gui, const gamemap& map,
unit_map& units,
const gamestatus& state,
const game_data& info,
bool update_display) :
bool update_display) :
gui_(gui),
map_(map),
teams_(teams),
@ -1040,8 +1042,7 @@ attack::attack(game_display& gui, const gamemap& map,
attackerxp_ = game_config::kill_experience*d_->second.level();
if(d_->second.level() == 0)
attackerxp_ = game_config::kill_experience/2;
a_->second.get_experience(attackerxp_);
attackerxp_ = defenderxp_ = 0;
defenderxp_ = 0;
gui_.invalidate(a_->first);
game_events::entity_location death_loc(d_);
@ -1291,9 +1292,9 @@ attack::attack(game_display& gui, const gamemap& map,
defenderxp_ = game_config::kill_experience*a_->second.level();
if(a_->second.level() == 0)
defenderxp_ = game_config::kill_experience/2;
d_->second.get_experience(defenderxp_);
attackerxp_ = defenderxp_ = 0;
attackerxp_ = 0;
gui_.invalidate(d_->first);
std::string undead_variation = a_->second.undead_variation();
game_events::entity_location death_loc(a_);