feat: add AVA2 64-bit gold protocol and client formatting

This commit is contained in:
shen
2026-10-19 23:23:31 -07:00
parent f386815353
commit 86a769f7dd
12 changed files with 169 additions and 2 deletions
+27
View File
@@ -488,12 +488,35 @@ void CPythonPlayer::SetStatus(DWORD dwType, long lValue)
m_playerStatus.SetPoint(dwType, lValue);
__UpdateBattleStatus();
break;
case POINT_GOLD:
m_i64Gold = (int64_t)lValue;
m_playerStatus.SetPoint(dwType, lValue);
break;
default:
m_playerStatus.SetPoint(dwType, lValue);
break;
}
}
void CPythonPlayer::SetGold64(int64_t gold)
{
m_i64Gold = gold;
m_playerStatus.SetPoint(POINT_GOLD, (long)std::min<int64_t>(gold, 2000000000LL));
}
void CPythonPlayer::ChangeGold64(int64_t amount)
{
m_i64Gold += amount;
if (m_i64Gold < 0)
m_i64Gold = 0;
m_playerStatus.SetPoint(POINT_GOLD, (long)std::min<int64_t>(m_i64Gold, 2000000000LL));
}
int64_t CPythonPlayer::GetGold64() const
{
return m_i64Gold;
}
int CPythonPlayer::GetStatus(DWORD dwType)
{
if (dwType >= POINT_MAX_NUM)
@@ -503,6 +526,9 @@ int CPythonPlayer::GetStatus(DWORD dwType)
return 0;
}
if (dwType == POINT_GOLD)
return (int)std::min<int64_t>(m_i64Gold, 2000000000LL);
return m_playerStatus.GetPoint(dwType);
}
@@ -1682,6 +1708,7 @@ void CPythonPlayer::ClearSkillDict()
void CPythonPlayer::Clear()
{
memset(&m_playerStatus, 0, sizeof(m_playerStatus));
m_i64Gold = 0;
NEW_ClearSkillData(true);
m_bisProcessingEmotion = FALSE;