mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
chore (module): remove not needed check
This commit is contained in:
@@ -525,30 +525,6 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
||||
// this is the distance doable by the player in 1 sec, using the time done to move to this point.
|
||||
uint32 clientSpeedRate = distance2D * 1000 / timeDiff;
|
||||
|
||||
if (player->duel)
|
||||
{
|
||||
if ((clientSpeedRate > speedRate) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FALLING))
|
||||
{
|
||||
if (!player->CanTeleport())
|
||||
{
|
||||
Player* opponent = player->duel->Opponent;
|
||||
std::string str = "|cFFFFFC00[DUEL CHEAT ALERT Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Speed Hack Detected! While Dueling [|cFF60FF00" + std::string(opponent->GetName().c_str()) + "|cFF00FFFF]";
|
||||
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
||||
data << str;
|
||||
sWorld->SendGlobalGMMessage(&data);
|
||||
|
||||
sWorld->SendGMText(LANG_ANTICHEAT_DUEL, player->GetName().c_str(), opponent->GetName().c_str());
|
||||
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
||||
{
|
||||
LOG_INFO("module", "AnticheatMgr:: DUEL ALERT Speed-Hack detected player {} ({}) while dueling {}", player->GetName(), player->GetGUID().ToString(), opponent->GetName());
|
||||
LOG_INFO("module", "AnticheatMgr:: DUEL ALERT Speed-Hack detected player {} ({}) while dueling {}", opponent->GetName(), opponent->GetGUID().ToString(), player->GetName());
|
||||
}
|
||||
BuildReport(player, SPEED_HACK_REPORT);
|
||||
BuildReport(opponent, SPEED_HACK_REPORT);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
// We did the (uint32) cast to accept a margin of tolerance
|
||||
// We check the last MovementInfo for the falling flag since falling down a hill and sliding a bit triggered a false positive
|
||||
if ((clientSpeedRate > speedRate) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FALLING))
|
||||
|
||||
Reference in New Issue
Block a user