mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Players: since patch 4.0.3a any Justice Points above the hard cap will now convert to 47 silver and 50 copper per point
This commit is contained in:
@@ -7242,8 +7242,18 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo
|
||||
|
||||
// count can't be more then totalCap if used (totalCap > 0)
|
||||
uint32 totalCap = GetCurrencyTotalCap(currency);
|
||||
|
||||
// Patch 4.0.3a - Justice Points over the hard cap of 4000 will be converted to 47 silver and 50 copper per point.
|
||||
uint32 surplousJusticePoints = 0;
|
||||
if (totalCap && count > int32(totalCap))
|
||||
{
|
||||
if (id = CURRENCY_TYPE_JUSTICE_POINTS)
|
||||
surplousJusticePoints = (count - totalCap) / precision;
|
||||
count = totalCap;
|
||||
}
|
||||
|
||||
if (surplousJusticePoints)
|
||||
ModifyMoney(surplousJusticePoints * JUSTICE_POINTS_CONVERSION_MONEY, false);
|
||||
|
||||
int32 newTotalCount = int32(oldTotalCount) + count;
|
||||
if (newTotalCount < 0)
|
||||
|
||||
@@ -653,6 +653,8 @@ struct ItemPosCount
|
||||
};
|
||||
typedef std::vector<ItemPosCount> ItemPosCountVec;
|
||||
|
||||
#define JUSTICE_POINTS_CONVERSION_MONEY 4750
|
||||
|
||||
enum TransferAbortReason
|
||||
{
|
||||
TRANSFER_ABORT_NONE = 0x00,
|
||||
|
||||
Reference in New Issue
Block a user