mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 10:50:24 +00:00
[Feature] Client Checksum Verification (Resubmit old 1678) (#1922)
* [Feature] Client Checksum Verification (Resubmit old 1678) * Updated db version * Add new updatechecksum to CmakeLists.txt * Removed magic number and used constant * Fix new command to have access to worldserver * spacing, more venbose desc and remove unneeded check * Cleanup, refactoring Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+13
-1
@@ -997,6 +997,18 @@ bool Database::SetVariable(const std::string varname, const std::string &varvalu
|
||||
return true;
|
||||
}
|
||||
|
||||
void Database::SetAccountCRCField(uint32 account_id, std::string field_name, uint64 checksum)
|
||||
{
|
||||
QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `account` SET `{}` = '{}' WHERE `id` = {}",
|
||||
field_name,
|
||||
checksum,
|
||||
account_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Get zone starting points from DB
|
||||
bool Database::GetSafePoints(const char* zone_short_name, uint32 instance_version, float* safe_x, float* safe_y, float* safe_z, float* safe_heading, int16* min_status, uint8* min_level, char *flag_needed) {
|
||||
|
||||
@@ -2285,7 +2297,7 @@ void Database::SetIPExemption(std::string account_ip, int exemption_amount) {
|
||||
auto row = results.begin();
|
||||
exemption_id = atoi(row[0]);
|
||||
}
|
||||
|
||||
|
||||
query = fmt::format(
|
||||
"INSERT INTO `ip_exemptions` (`exemption_ip`, `exemption_amount`) VALUES ('{}', {})",
|
||||
account_ip,
|
||||
|
||||
Reference in New Issue
Block a user