Remove all MSVC __int64 (#742)

This commit is contained in:
void_17
2026-03-07 03:31:30 +07:00
committed by GitHub
parent 175fc3824e
commit 988e3042e0
277 changed files with 3672 additions and 3684 deletions

View File

@@ -66,7 +66,7 @@ LoginPacket::LoginPacket(const wstring& userName, int clientVersion, PlayerUID o
}
// Server -> Client
LoginPacket::LoginPacket(const wstring& userName, int clientVersion, LevelType *pLevelType, __int64 seed, int gameType, char dimension, BYTE mapHeight, BYTE maxPlayers, char difficulty, INT multiplayerInstanceId, BYTE playerIndex, bool newSeaLevel, unsigned int uiGamePrivileges, int xzSize, int hellScale)
LoginPacket::LoginPacket(const wstring& userName, int clientVersion, LevelType *pLevelType, int64_t seed, int gameType, char dimension, BYTE mapHeight, BYTE maxPlayers, char difficulty, INT multiplayerInstanceId, BYTE playerIndex, bool newSeaLevel, unsigned int uiGamePrivileges, int xzSize, int hellScale)
{
this->userName = userName;
this->clientVersion = clientVersion;
@@ -94,13 +94,13 @@ LoginPacket::LoginPacket(const wstring& userName, int clientVersion, LevelType *
m_hellScale = hellScale;
}
void LoginPacket::read(DataInputStream *dis) //throws IOException
void LoginPacket::read(DataInputStream *dis) //throws IOException
{
clientVersion = dis->readInt();
userName = readUtf(dis, Player::MAX_NAME_LENGTH);
wstring typeName = readUtf(dis, 16);
m_pLevelType = LevelType::getLevelType(typeName);
if (m_pLevelType == NULL)
if (m_pLevelType == NULL)
{
m_pLevelType = LevelType::lvl_normal;
}
@@ -131,15 +131,15 @@ void LoginPacket::read(DataInputStream *dis) //throws IOException
}
void LoginPacket::write(DataOutputStream *dos) //throws IOException
void LoginPacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeInt(clientVersion);
writeUtf(userName, dos);
if (m_pLevelType == NULL)
if (m_pLevelType == NULL)
{
writeUtf(L"", dos);
}
else
}
else
{
writeUtf(m_pLevelType->getGeneratorName(), dos);
}
@@ -171,13 +171,13 @@ void LoginPacket::handle(PacketListener *listener)
listener->handleLogin(shared_from_this());
}
int LoginPacket::getEstimatedSize()
int LoginPacket::getEstimatedSize()
{
int length=0;
if (m_pLevelType != NULL)
if (m_pLevelType != NULL)
{
length = (int)m_pLevelType->getGeneratorName().length();
}
return (int)(sizeof(int) + userName.length() + 4 + 6 + sizeof(__int64) + sizeof(char) + sizeof(int) + (2*sizeof(PlayerUID)) +1 + sizeof(char) + sizeof(BYTE) + sizeof(bool) + sizeof(bool) + length + sizeof(unsigned int));
return (int)(sizeof(int) + userName.length() + 4 + 6 + sizeof(int64_t) + sizeof(char) + sizeof(int) + (2*sizeof(PlayerUID)) +1 + sizeof(char) + sizeof(BYTE) + sizeof(bool) + sizeof(bool) + length + sizeof(unsigned int));
}