From a09da2427062c4454bd9691489289d45b3473fda Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 11 Mar 2013 15:06:25 +0300 Subject: Add option to enable/disable weight notifications. --- src/defaults.cpp | 1 + src/gui/setup_other.cpp | 3 +++ src/net/ea/playerhandler.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2