summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-11 15:06:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-11 15:06:25 +0300
commita09da2427062c4454bd9691489289d45b3473fda (patch)
tree4a18b8bd20c1339bc3c7e39d8aa59797e2f50a48
parente422b84e253eacdbecdd0e75860de783aeefb1d8 (diff)
downloadmanaverse-a09da2427062c4454bd9691489289d45b3473fda.tar.gz
manaverse-a09da2427062c4454bd9691489289d45b3473fda.tar.bz2
manaverse-a09da2427062c4454bd9691489289d45b3473fda.tar.xz
manaverse-a09da2427062c4454bd9691489289d45b3473fda.zip
Add option to enable/disable weight notifications.
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/gui/setup_other.cpp3
-rw-r--r--src/net/ea/playerhandler.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 57d7c1988..34bb07efb 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -310,6 +310,7 @@ DefaultsData* getConfigDefaults()
AddDEF("enableGmTab", true);
AddDEF("gamecount", 0);
AddDEF("rated", false);
+ AddDEF("weightMsg", true);
return configData;
}
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp
index 86e4f63bf..4572fe2ed 100644
--- a/src/gui/setup_other.cpp
+++ b/src/gui/setup_other.cpp
@@ -177,6 +177,9 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
new SetupItemCheckBox(_("Enable advert protocol"), "",
"enableAdvert", this, "enableAdvertEvent");
+ new SetupItemCheckBox(_("Enable weight notifications"), "",
+ "weightMsg", this, "weightMsgEvent");
+
new SetupItemLabel(_("Shop"), "", this);
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index b19121a00..61da61b65 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -327,7 +327,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
skillDialog->update();
break;
case 0x0018:
- if (!weightNotice)
+ if (!weightNotice && config.getBoolValue("weightMsg"))
{
const int max = PlayerInfo::getAttribute(
PlayerInfo::MAX_WEIGHT) / 2;