diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-06-04 19:49:50 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-06-04 19:49:50 +0000 |
commit | dc6a5fb36339ebe7b9a0c66097612aaec3250a5e (patch) | |
tree | b20760bc21ced44b5a329d7a988e68a7aa85d75a /src/notifymanager.cpp | |
parent | 66c9e174dec0caa410a33e430bf01f94650ec8b5 (diff) | |
download | manaplus-dc6a5fb36339ebe7b9a0c66097612aaec3250a5e.tar.gz manaplus-dc6a5fb36339ebe7b9a0c66097612aaec3250a5e.tar.bz2 manaplus-dc6a5fb36339ebe7b9a0c66097612aaec3250a5e.tar.xz manaplus-dc6a5fb36339ebe7b9a0c66097612aaec3250a5e.zip |
Do not show gp / money / zeny pick-up messages in chat when pickup messages in chat are disabled.
****
mana/plus!185
Diffstat (limited to 'src/notifymanager.cpp')
-rw-r--r-- | src/notifymanager.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp index 130ee5702..aed5dd9f8 100644 --- a/src/notifymanager.cpp +++ b/src/notifymanager.cpp @@ -21,6 +21,8 @@ #include "notifymanager.h" +#include "configuration.h" + #include "soundmanager.h" #include "being/localplayer.h" @@ -162,12 +164,21 @@ namespace NotifyManager { return; } + + soundManager.playSfx(SoundDB::getSound(message), 0, 0); + + if (message == NotifyTypes::MONEY_GET && + !config.getBoolValue("showpickupchat")) + { + return; + } + const NotificationInfo &info = notifications[message]; if (*info.text == 0) { - soundManager.playSfx(SoundDB::getSound(message), 0, 0); return; } + switch (info.flags) { case NotifyFlags::STRING: @@ -199,7 +210,6 @@ namespace NotifyManager default: break; } - soundManager.playSfx(SoundDB::getSound(message), 0, 0); } int getIndexBySound(const std::string &sound) |