feat: implement 64-bit gold system across server, DB, exchange, safebox, and guild (Stage 7)

This commit is contained in:
shen
2026-10-20 05:57:25 -07:00
parent a7152750fb
commit c979b53762
25 changed files with 432 additions and 94 deletions
+7 -7
View File
@@ -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;
+8
View File
@@ -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;