Core/Misc: Update money to 64 bits (from 32), increasing the maximum gold possible

This got a bit messy and will be further fixed when all related packets are updated.
(Also fixed a typo in atoll msvc macro)
This commit is contained in:
Nay committed 2012-07-24 15:27:42 +01:00
1 parent 4364f80d37
commit 0f04b2fc36
23 files changed
+97 -92

No files matched your search

+4 -3
View File
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include <stdlib.h>
class modify_commandscript : public CommandScript
{
@@ -1002,13 +1003,13 @@ public:
if (handler->HasLowerSecurity(target, 0))
return false;
int32 addmoney = atoi((char*)args);
int64 addmoney = atoll((char*)args);
uint32 moneyuser = target->GetMoney();
uint64 moneyuser = target->GetMoney();
if (addmoney < 0)
{
int32 newmoney = int32(moneyuser) + addmoney;
int64 newmoney = int32(moneyuser) + addmoney;
sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney);
if (newmoney <= 0)