[Cheat Detection] Anti-Cheat reimplementation (#1434)

* [Cheat Detection] Anti-Cheat reimplementation

* minor patch fixes

* ceiling to server side runspeed

Warp(LT) was picking up a bunch of expected 6.2 but it was reported back as 6.5, this should help reduce the amount of false positives we get

* use ceil instead of std::ceilf for linux

* boat false positive fix

* stopping the double detection

* fixes and cleanup

* auto merge tricked me...

* dummy divide by 0 checks

this should prevent anyone from setting Zone:MQWarpDetectionDistanceFactor to 0 and causing a crash.

* Formatting

* encapsulation to its own class and clean up

* more detections

* typo

* OP_UnderWorld implmentation

* Update client_packet.h

* Syntax changes, formatting, cleanup

* preventing crashes due to invalid packet size

* typos and clearer logic

* seperated the catagory for cheats

* Updated MQGhost for more detail

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Dencelle
2021-08-31 01:08:31 -05:00
committed by GitHub
parent 26299354b6
commit 7b069dcf20
25 changed files with 664 additions and 26 deletions
+5 -4
View File
@@ -61,6 +61,7 @@ extern volatile bool RunLoops;
#include "mob_movement_manager.h"
#include "../common/content/world_content_service.h"
#include "../common/expedition_lockout_timer.h"
#include "cheat_manager.h"
extern QueryServ* QServ;
extern EntityList entity_list;
@@ -177,7 +178,7 @@ Client::Client(EQStreamInterface* ieqs)
for (int client_filter = 0; client_filter < _FilterCount; client_filter++)
ClientFilters[client_filter] = FilterShow;
cheat_manager.SetClient(this);
mMovementManager->AddClient(this);
character_id = 0;
conn_state = NoPacketsReceived;
@@ -10258,7 +10259,7 @@ void Client::ApplyWeaponsStance()
- From spells, just remove the Primary buff that contains the WeaponStance effect in it.
- For items with worn effect, unequip the item.
- For AA abilities, a hotkey is used to Enable and Disable the effect. See. Client::TogglePassiveAlternativeAdvancement in aa.cpp for extensive details.
Rank
- Most important for AA, but if you have more than one of WeaponStance effect for a given type, the spell trigger buff will apply whatever has the highest
'rank' value from the spells table. AA's on live for this effect naturally do this. Be awere of this if making custom spells/worn effects/AA.
@@ -10270,7 +10271,7 @@ void Client::ApplyWeaponsStance()
if (!IsWeaponStanceEnabled()) {
return;
}
bool enabled = false;
bool item_bonus_exists = false;
bool aa_bonus_exists = false;
@@ -10326,7 +10327,7 @@ void Client::ApplyWeaponsStance()
if (itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H] || itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD] ||
itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) {
enabled = true;
item_bonus_exists = true;