mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Warden: Ignore the length value in the database for MEM_CHECK checks. Hi there Aokromes.
This commit is contained in:
2
sql/updates/world/3.3.5/2020_08_20_01_world.sql
Normal file
2
sql/updates/world/3.3.5/2020_08_20_01_world.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `warden_checks` SET `length`=NULL WHERE `type`=243;
|
||||
@@ -82,10 +82,10 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
_checkResults.emplace(id, fields[3].GetBinary());
|
||||
|
||||
if (type == MEM_CHECK || type == PAGE_CHECK_A || type == PAGE_CHECK_B || type == PROC_CHECK)
|
||||
{
|
||||
wardenCheck.Address = fields[4].GetUInt32();
|
||||
|
||||
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B || type == PROC_CHECK)
|
||||
wardenCheck.Length = fields[5].GetUInt8();
|
||||
}
|
||||
|
||||
// PROC_CHECK support missing
|
||||
if (type == MEM_CHECK || type == MPQ_CHECK || type == LUA_STR_CHECK || type == DRIVER_CHECK || type == MODULE_CHECK)
|
||||
|
||||
@@ -186,7 +186,7 @@ void WardenWin::RequestChecks()
|
||||
for (WardenCheckCategory category : EnumUtils::Iterate<WardenCheckCategory>())
|
||||
{
|
||||
auto& [checks, checksIt] = _checks[category];
|
||||
if (checksIt == checks.end())
|
||||
if ((checksIt == checks.end()) && !checks.empty())
|
||||
{
|
||||
TC_LOG_DEBUG("warden", "Finished all %s checks, re-shuffling", EnumUtils::ToConstant(category));
|
||||
Trinity::Containers::RandomShuffle(checks);
|
||||
@@ -242,7 +242,7 @@ void WardenWin::RequestChecks()
|
||||
{
|
||||
buff << uint8(0x00);
|
||||
buff << uint32(check.Address);
|
||||
buff << uint8(check.Length);
|
||||
buff << uint8(sWardenCheckMgr->GetCheckResult(id).size());
|
||||
break;
|
||||
}
|
||||
case PAGE_CHECK_A:
|
||||
@@ -376,11 +376,12 @@ void WardenWin::HandleCheckResult(ByteBuffer &buff)
|
||||
continue;
|
||||
}
|
||||
|
||||
WardenCheckResult const& expected = sWardenCheckMgr->GetCheckResult(id);
|
||||
|
||||
std::vector<uint8> response;
|
||||
response.resize(check.Length);
|
||||
response.resize(expected.size());
|
||||
buff.read(response.data(), response.size());
|
||||
|
||||
WardenCheckResult const& expected = sWardenCheckMgr->GetCheckResult(id);
|
||||
if (response != expected)
|
||||
{
|
||||
TC_LOG_DEBUG("warden", "RESULT MEM_CHECK fail CheckId %u account Id %u", id, _session->GetAccountId());
|
||||
|
||||
Reference in New Issue
Block a user