Core/Misc: Fixed a crash in .modify money command.

Fixed a mistake in the reforge handler
This commit is contained in:
Subv
2012-08-05 17:33:29 -05:00
parent 74fe587b49
commit 5b7b6e121c
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;
}