From 54d016aab9226849929c79cb5fd0827a63b24b29 Mon Sep 17 00:00:00 2001 From: MDIC Date: Wed, 13 Apr 2022 13:15:53 -0400 Subject: [PATCH] Jailing Feature Update Deserter Buffs permanent until .anticheat parole is used on the player to release them. this will solve the issue of jailbreak thru queuing. --- src/AnticheatMgr.cpp | 6 ++++-- src/cs_anticheat.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 1597b73..d655e14 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -690,8 +690,10 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType) player->TeleportTo(loc); player->SetHomebind(loc, 876); // GM Jail Homebind location player->CastSpell(player, SHACKLES); // Shackle him in place to ensure no exploit happens for jail break attempt - player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player); // LFG_SPELL_DUNGEON_DESERTER - player->AddAura(BG_SPELL_DESERTER, player); // BG_SPELL_DESERTER + Aura* dungdesert = player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player);// LFG_SPELL_DUNGEON_DESERTER + Aura* bgdesert = player->AddAura(BG_SPELL_DESERTER, player);// BG_SPELL_DESERTER + dungdesert->SetDuration(2147483647 * IN_MILLISECONDS); + bgdesert->SetDuration(2147483647 * IN_MILLISECONDS); if (sConfigMgr->GetOption("Anticheat.AnnounceJail", true)) { diff --git a/src/cs_anticheat.cpp b/src/cs_anticheat.cpp index ef1cef2..9dedcff 100644 --- a/src/cs_anticheat.cpp +++ b/src/cs_anticheat.cpp @@ -19,6 +19,7 @@ #include "AnticheatMgr.h" #include "Configuration/Config.h" #include "Player.h" +#include "SpellAuras.h" #if AC_COMPILER == AC_COMPILER_GNU #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -136,8 +137,10 @@ public: pTarget->TeleportTo(loc); pTarget->SetHomebind(loc, 876); // GM Jail Homebind location pTarget->CastSpell(pTarget, SHACKLES); // Shackle him in place to ensure no exploit happens for jail break attempt - pTarget->AddAura(LFG_SPELL_DUNGEON_DESERTER, pTarget); // LFG_SPELL_DUNGEON_DESERTER - pTarget->AddAura(BG_SPELL_DESERTER, pTarget); // BG_SPELL_DESERTER + Aura* dungdesert = pTarget->AddAura(LFG_SPELL_DUNGEON_DESERTER, pTarget);// LFG_SPELL_DUNGEON_DESERTER + Aura* bgdesert = pTarget->AddAura(BG_SPELL_DESERTER, pTarget);// BG_SPELL_DESERTER + dungdesert->SetDuration(2147483647 * IN_MILLISECONDS); + bgdesert->SetDuration(2147483647 * IN_MILLISECONDS); return true; }