mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
Core/Misc: Fixed a crash in .modify money command.
Fixed a mistake in the reforge handler
This commit is contained in:
@@ -1671,7 +1671,7 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->HasEnoughMoney(uint64(item->GetSpecialPrice()))) // cheating
|
||||
if (!player->HasEnoughMoney(uint64(item->GetSpecialPrice()))) // cheating
|
||||
{
|
||||
SendReforgeResult(false);
|
||||
return;
|
||||
|
||||
@@ -1033,9 +1033,9 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, addmoney, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, uint32(addmoney), handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), addmoney);
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(addmoney));
|
||||
|
||||
if (addmoney >=MAX_MONEY_AMOUNT)
|
||||
target->SetMoney(MAX_MONEY_AMOUNT);
|
||||
@@ -1043,7 +1043,7 @@ public:
|
||||
target->ModifyMoney(addmoney);
|
||||
}
|
||||
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_NEW_MONEY), moneyuser, addmoney, target->GetMoney());
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_NEW_MONEY), moneyuser, uint32(addmoney), target->GetMoney());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user