From 2f3cd45c4ae6988da94a70e30d8c1b990e55654f Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 24 Jan 2019 04:26:14 -0500 Subject: [PATCH] Removed server-side checksum of player profile --- changelog.txt | 1 + common/eq_packet_structs.h | 6 +++--- zone/client_packet.cpp | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index dc0223d52..47c4e1e86 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,6 +11,7 @@ Uleat: Extended server spellbook entries to RoF2 standard and added per-client r - Each client is still restricted to its spellbook capacity (400, 480, 480, 720, 720, 720 - respectively) - Each client is restricted to its max supported spell id (9999, 15999, 23000, 28000, 45000, 45000 - respectively) - Please report any abnormal behavior so it may be addressed +Uleat: Removed server-side checksum of player profile..wasted calculation since it's performed again in all translators == 1/20/2019 == Uleat: Added 'spells' entry to EQDictionary diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index a5d86d140..c80fdcc02 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -909,7 +909,7 @@ sed -e 's/_t//g' -e 's/MAX_AA/MAX_PP_AA_ARRAY/g' \ struct PlayerProfile_Struct { -/*0000*/ uint32 checksum; // Checksum from CRC32::SetEQChecksum +// /*0000*/ uint32 checksum; // Checksum from CRC32::SetEQChecksum /*0004*/ char name[64]; // Name of player sizes not right /*0068*/ char last_name[32]; // Last name of player sizes not right /*0100*/ uint32 gender; // Player Gender - 0 Male, 1 Female @@ -1099,10 +1099,10 @@ struct PlayerProfile_Struct void SetPlayerProfileVersion(EQEmu::versions::MobVersion mob_version) { m_player_profile_version = EQEmu::versions::ValidateMobVersion(mob_version); } void SetPlayerProfileVersion(EQEmu::versions::ClientVersion client_version) { SetPlayerProfileVersion(EQEmu::versions::ConvertClientVersionToMobVersion(client_version)); } -// private: +private: // No need for gm flag since pp already has one // No need for lookup pointer since this struct is not tied to any one system - EQEmu::versions::MobVersion m_player_profile_version; // kept public for now so checksum can calc sizeof (client_packet.cpp:1586) + EQEmu::versions::MobVersion m_player_profile_version; }; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 7ea18206a..41b38b0c9 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1593,7 +1593,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) m_pp.RestTimer = 0; /* This checksum should disappear once dynamic structs are in... each struct strategy will do it */ // looks to be in place now - CRC32::SetEQChecksum((unsigned char*)&m_pp, sizeof(PlayerProfile_Struct) - sizeof(m_pp.m_player_profile_version) - 4); + //CRC32::SetEQChecksum((unsigned char*)&m_pp, sizeof(PlayerProfile_Struct) - sizeof(m_pp.m_player_profile_version) - 4); + // m_pp.checksum = 0; // All server out-bound player profile packets are now translated - no need to waste cycles calculating this... outapp = new EQApplicationPacket(OP_PlayerProfile, sizeof(PlayerProfile_Struct));