feat: add AVA2 64-bit gold protocol and client formatting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user