Author: esr
Date: Fri Sep 5 13:55:11 2008
New Revision: 29295
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29295&view=rev
Log:
Fix bug #12282.
Modified:
trunk/src/menu_events.cpp
trunk/src/unit.hpp
Modified: trunk/src/menu_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=29295&r1=29294&r2=29295&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Fri Sep 5 13:55:11 2008
@@ -102,7 +102,7 @@
//If the unit is of level > 1, or is close to advancing,
//we warn the player about it
std::stringstream message;
- if (u.upkeep() == 0) {
+ if (u.loyal()) {
message << _("My lord, this unit is loyal and
requires no upkeep! ") << (u.gender() == unit_race::MALE ? _("Do you really
want to dismiss him?")
: _("Do you really want to
dismiss her?"));
} else if(u.level() > 1) {
Modified: trunk/src/unit.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.hpp?rev=29295&r1=29294&r2=29295&view=diff
==============================================================================
--- trunk/src/unit.hpp (original)
+++ trunk/src/unit.hpp Fri Sep 5 13:55:11 2008
@@ -221,6 +221,7 @@
void set_goto(const gamemap::location& new_goto) { goto_ = new_goto; }
int upkeep() const;
+ bool loyal() const {return cfg_["upkeep"]=="loyal"; }
void set_hidden(bool state);
bool get_hidden() { return hidden_; };
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits