diff --git a/src/menu_events.cpp b/src/menu_events.cpp index 2c8c458ccc1..181bae52108 100644 --- a/src/menu_events.cpp +++ b/src/menu_events.cpp @@ -102,7 +102,7 @@ namespace events{ //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) { diff --git a/src/unit.hpp b/src/unit.hpp index 988271e4532..5c85aeb99b5 100644 --- a/src/unit.hpp +++ b/src/unit.hpp @@ -221,6 +221,7 @@ public: 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_; };