feat: implement 64-bit gold system across server, DB, exchange, safebox, and guild (Stage 7)
This commit is contained in:
@@ -445,7 +445,7 @@ typedef struct SPlayerTable
|
||||
short st, ht, dx, iq;
|
||||
|
||||
DWORD exp;
|
||||
INT gold;
|
||||
int64_t gold;
|
||||
|
||||
BYTE dir;
|
||||
INT x, y, z;
|
||||
@@ -771,7 +771,7 @@ typedef struct SSafeboxTable
|
||||
{
|
||||
DWORD dwID;
|
||||
BYTE bSize;
|
||||
DWORD dwGold;
|
||||
int64_t dwGold;
|
||||
WORD wItemCount;
|
||||
} TSafeboxTable;
|
||||
|
||||
@@ -1163,31 +1163,31 @@ typedef struct SPacketMoneyLog
|
||||
{
|
||||
BYTE type;
|
||||
DWORD vnum;
|
||||
INT gold;
|
||||
int64_t gold;
|
||||
} TPacketMoneyLog;
|
||||
|
||||
typedef struct SPacketGDGuildMoney
|
||||
{
|
||||
DWORD dwGuild;
|
||||
INT iGold;
|
||||
int64_t iGold;
|
||||
} TPacketGDGuildMoney;
|
||||
|
||||
typedef struct SPacketDGGuildMoneyChange
|
||||
{
|
||||
DWORD dwGuild;
|
||||
INT iTotalGold;
|
||||
int64_t iTotalGold;
|
||||
} TPacketDGGuildMoneyChange;
|
||||
|
||||
typedef struct SPacketDGGuildMoneyWithdraw
|
||||
{
|
||||
DWORD dwGuild;
|
||||
INT iChangeGold;
|
||||
int64_t iChangeGold;
|
||||
} TPacketDGGuildMoneyWithdraw;
|
||||
|
||||
typedef struct SPacketGDGuildMoneyWithdrawGiveReply
|
||||
{
|
||||
DWORD dwGuild;
|
||||
INT iChangeGold;
|
||||
int64_t iChangeGold;
|
||||
BYTE bGiveSuccess;
|
||||
} TPacketGDGuildMoneyWithdrawGiveReply;
|
||||
|
||||
|
||||
@@ -79,6 +79,14 @@ inline bool str_to_number (long long& out, const char *in)
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool str_to_number (unsigned long long& out, const char *in)
|
||||
{
|
||||
if (0==in || 0==in[0]) return false;
|
||||
|
||||
out = (unsigned long long) strtoull(in, NULL, 10);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool str_to_number (float& out, const char *in)
|
||||
{
|
||||
if (0==in || 0==in[0]) return false;
|
||||
|
||||
Reference in New Issue
Block a user