Core/Players: Several gold handling improvements (#155)

* Updated the following systems to support large (64bit) gold numbers:
- Auction House
- Mail
- Commands
- Guild bank withdraw limits
- Guild Bank eventlog
- Vendor

* Fixed some vendor checks for when BuyCount > 1
* Tweaked some checks for available gold space
This commit is contained in:
Roc13x authored and GitHub committed 2020-08-03 17:24:32 +02:00
1 parent 43a6d3d759
commit 31b6b77200
27 files changed
+181 -160

No files matched your search

+4 -4
View File
@@ -570,7 +570,7 @@ public:
{
int64 newmoney = int64(targetMoney) + moneyToAdd;
TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(newmoney));
TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
if (newmoney <= 0)
{
NotifyModification(handler, target, LANG_YOU_TAKE_ALL_MONEY, LANG_YOURS_ALL_MONEY_GONE);
@@ -590,9 +590,9 @@ public:
}
else
{
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, uint32(moneyToAdd), handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(moneyToAdd));
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
if (moneyToAdd >= int64(MAX_MONEY_AMOUNT))
moneyToAdd = MAX_MONEY_AMOUNT;
@@ -603,7 +603,7 @@ public:
target->ModifyMoney(moneyToAdd);
}
TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_NEW_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(target->GetMoney()));
TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
return true;
}