Information

Added the ability to turn off the info sent to the player.
This commit is contained in:
Revision 2022-08-03 13:22:31 +02:00
parent f8e7eabde4
commit 3b86494671
2 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,10 @@
[worldserver] [worldserver]
##
# Print information to the player about the amount of extra gold that got deposited to the guild bank
GuildFunds.ShowInfo = 1
##
## ##
# The amount, in percentage, of money looted to add to the guild bank # The amount, in percentage, of money looted to add to the guild bank
# Set to 0 to disable # Set to 0 to disable

View file

@ -4,6 +4,7 @@
#include "Player.h" #include "Player.h"
#include "ScriptMgr.h" #include "ScriptMgr.h"
bool showInfo;
uint32 lootFunds; uint32 lootFunds;
uint32 questFunds; uint32 questFunds;
@ -14,6 +15,7 @@ public:
void OnAfterConfigLoad(bool /*reload*/) override void OnAfterConfigLoad(bool /*reload*/) override
{ {
showInfo = sConfigMgr->GetOption<bool>("GuildFunds.ShowInfo", 1);
lootFunds = sConfigMgr->GetOption<uint32>("GuildFunds.Looted", 10); lootFunds = sConfigMgr->GetOption<uint32>("GuildFunds.Looted", 10);
questFunds = sConfigMgr->GetOption<uint32>("GuildFunds.Quests", 3); questFunds = sConfigMgr->GetOption<uint32>("GuildFunds.Quests", 3);
} }
@ -34,7 +36,9 @@ public:
return; return;
guild->HandleMemberDepositMoney(player->GetSession(), money); guild->HandleMemberDepositMoney(player->GetSession(), money);
PrintGuildFundsInformation(player, money);
if (showInfo)
PrintGuildFundsInformation(player, money);
} }
} }
@ -73,7 +77,9 @@ public:
return; return;
guild->HandleMemberDepositMoney(player->GetSession(), money); guild->HandleMemberDepositMoney(player->GetSession(), money);
PrintGuildFundsInformation(player, money);
if (showInfo)
PrintGuildFundsInformation(player, money);
} }
} }