mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 17:58:16 +00:00
[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:
+29
-1
@@ -2743,6 +2743,22 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
||||
|
||||
action->effect_flag = 4;
|
||||
|
||||
if (spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f)
|
||||
{
|
||||
if (IsClient())
|
||||
{
|
||||
if (!IsBuffSpell(spell_id))
|
||||
{
|
||||
CastToClient()->cheat_manager.SetExemptStatus(KnockBack, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IsClient() && IsEffectInSpell(spell_id, SE_ShadowStep))
|
||||
{
|
||||
CastToClient()->cheat_manager.SetExemptStatus(ShadowStep, true);
|
||||
}
|
||||
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
CastToClient()->QueuePacket(packet);
|
||||
@@ -4028,7 +4044,14 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
|
||||
if(spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f)
|
||||
{
|
||||
if (RuleB(Spells, NPCSpellPush) && !spelltar->IsRooted() && spelltar->ForcedMovement == 0) {
|
||||
if (spelltar->IsClient())
|
||||
{
|
||||
if (!IsBuffSpell(spell_id))
|
||||
{
|
||||
spelltar->CastToClient()->cheat_manager.SetExemptStatus(KnockBack, true);
|
||||
}
|
||||
}
|
||||
else if (RuleB(Spells, NPCSpellPush) && !spelltar->IsRooted() && spelltar->ForcedMovement == 0) {
|
||||
spelltar->m_Delta.x += action->force * g_Math.FastSin(action->hit_heading);
|
||||
spelltar->m_Delta.y += action->force * g_Math.FastCos(action->hit_heading);
|
||||
spelltar->m_Delta.z += action->hit_pitch;
|
||||
@@ -4036,6 +4059,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
}
|
||||
}
|
||||
|
||||
if (spelltar->IsClient() && IsEffectInSpell(spell_id, SE_ShadowStep))
|
||||
{
|
||||
spelltar->CastToClient()->cheat_manager.SetExemptStatus(ShadowStep, true);
|
||||
}
|
||||
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
if(spelltar != this && spelltar->IsClient()) // send to target
|
||||
|
||||
Reference in New Issue
Block a user