From d9dab8f2d9436b84a318cd5df171ba96dd4ec5ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Feb 2017 16:18:47 +0300 Subject: Add paths.xml option overweightPercent for show overweight message. Default value: 50 --- src/gui/dialogsmanager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui/dialogsmanager.cpp') diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp index c1ed960be..b4a3cc6ea 100644 --- a/src/gui/dialogsmanager.cpp +++ b/src/gui/dialogsmanager.cpp @@ -166,8 +166,11 @@ void DialogsManager::attributeChanged(const AttributesT id, { if (!weightNotice && config.getBoolValue("weightMsg")) { + int percent = settings.overweightPercent; + if (percent < 1) + percent = 50; const int max = PlayerInfo::getAttribute( - Attributes::MAX_WEIGHT) / 2; + Attributes::MAX_WEIGHT) * percent / 100; const int total = oldVal; if (newVal >= max && total < max) { -- cgit v1.2.3-70-g09d2