diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 907ddd2f6f2..466cd318b68 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1048,9 +1048,12 @@ public: ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(moneyToAdd)); if (moneyToAdd >= MAX_MONEY_AMOUNT) - target->SetMoney(MAX_MONEY_AMOUNT); - else - target->ModifyMoney(moneyToAdd); + moneyToAdd = MAX_MONEY_AMOUNT; + + if (targetMoney >= uint64(MAX_MONEY_AMOUNT) - moneyToAdd) + moneyToAdd -= targetMoney; + + target->ModifyMoney(moneyToAdd); } sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(target->GetMoney())); |
