From 7fb3d70afeb2e40a1aab06273ca633f14b186cbc Mon Sep 17 00:00:00 2001 From: MDIC Date: Mon, 18 Apr 2022 11:34:41 -0400 Subject: [PATCH] Update: Review Transfer Thanks to @jackpozi for more further code review on the tc counterpart of the module that is also brought over to this module. Co-Authored-By: Giacomo Pozzoni --- src/AnticheatMgr.cpp | 10 ++++------ src/cs_anticheat.cpp | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index e301863..86b0b35 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -702,18 +702,16 @@ 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 - Aura* dungdesert = player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player);// LFG_SPELL_DUNGEON_DESERTER - Aura* bgdesert = player->AddAura(BG_SPELL_DESERTER, player);// BG_SPELL_DESERTER - Aura* silent = player->AddAura(SILENCED, player);// SILENCED - if (dungdesert)// LFG_SPELL_DUNGEON_DESERTER + + if (Aura* dungdesert = player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player))// LFG_SPELL_DUNGEON_DESERTER { dungdesert->SetDuration(-1); } - if (bgdesert)// BG_SPELL_DESERTER + if (Aura* bgdesert = player->AddAura(BG_SPELL_DESERTER, player))// BG_SPELL_DESERTER { bgdesert->SetDuration(-1); } - if (silent)// SILENCED + if (Aura* silent = player->AddAura(SILENCED, player))// SILENCED { silent->SetDuration(-1); } diff --git a/src/cs_anticheat.cpp b/src/cs_anticheat.cpp index d62fae4..ccc96e1 100644 --- a/src/cs_anticheat.cpp +++ b/src/cs_anticheat.cpp @@ -138,18 +138,16 @@ 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 - Aura* dungdesert = pTarget->AddAura(LFG_SPELL_DUNGEON_DESERTER, pTarget);// LFG_SPELL_DUNGEON_DESERTER - Aura* bgdesert = pTarget->AddAura(BG_SPELL_DESERTER, pTarget);// BG_SPELL_DESERTER - Aura* silent = pTarget->AddAura(SILENCED, pTarget);// SILENC - if (dungdesert)// LFG_SPELL_DUNGEON_DESERTER + + if (Aura* dungdesert = pTarget->AddAura(LFG_SPELL_DUNGEON_DESERTER, pTarget))// LFG_SPELL_DUNGEON_DESERTER { dungdesert->SetDuration(-1); } - if (bgdesert)// BG_SPELL_DESERTER + if (Aura* bgdesert = pTarget->AddAura(BG_SPELL_DESERTER, pTarget))// BG_SPELL_DESERTER { bgdesert->SetDuration(-1); } - if (silent)// SILENCED + if (Aura* silent = pTarget->AddAura(SILENCED, pTarget))// SILENCED { silent->SetDuration(-1); }