diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index b43b6fa993b..c472d4b69a2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b7da8b54c38..1cf0c542506 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -653,6 +653,8 @@ struct ItemPosCount }; typedef std::vector ItemPosCountVec; +#define JUSTICE_POINTS_CONVERSION_MONEY 4750 + enum TransferAbortReason { TRANSFER_ABORT_NONE = 0x00,