Core/Packets: updated internals for currency handling

* converted SMSG_SET_CURRENCY to packet class
* greatly simplified ModifyCurrency method
* handle CMSG_SET_CURRENCY_FLAGS packet
* fixed sending currency flags upon login. This fixes displaying them in the bagpack
* .modify currency is no longer affected by SPELL_AURA_MOD_CURRENCY_GAIN and can now bypass weekly limits
* defined all currency type flags
This commit is contained in:
Ovahlord committed 2022-12-05 10:10:45 +01:00
1 parent bfaff7106b
commit 554eb584b0
13 files changed
+192 -174

No files matched your search

+2 -2
View File
@@ -682,7 +682,7 @@ public:
int32 amount = (uint32)atoi(args);
target->ModifyCurrency(CURRENCY_TYPE_HONOR_POINTS, amount, true, true);
target->ModifyCurrency(CURRENCY_TYPE_HONOR_POINTS, amount, false, true);
handler->PSendSysMessage(LANG_COMMAND_MODIFY_HONOR, handler->GetNameLink(target).c_str(), target->GetCurrency(CURRENCY_TYPE_HONOR_POINTS, false));
@@ -986,7 +986,7 @@ public:
if (!amount)
return false;
target->ModifyCurrency(currencyId, amount, true, true);
target->ModifyCurrency(currencyId, amount, false, true);
return true;
}