mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 09:07:22 +00:00
Auto Jailing: Spell Cast Disable, code clean up
Permanent silence casted on offender when using .anticheat jail or if auto jail is turned on, they will not be able to cast any spells to teleport out of there. Code Style Clean up review on the TC Side of the module thanks to @jackpoz that i was able to bring over to this module and remove magic number dealing with resurrection sickness.
This commit is contained in:
@@ -31,7 +31,8 @@ enum Spells
|
||||
{
|
||||
SHACKLES = 38505,
|
||||
LFG_SPELL_DUNGEON_DESERTER = 71041,
|
||||
BG_SPELL_DESERTER = 26013
|
||||
BG_SPELL_DESERTER = 26013,
|
||||
SILENCED = 23207
|
||||
};
|
||||
|
||||
class anticheat_commandscript : public CommandScript
|
||||
@@ -139,8 +140,10 @@ public:
|
||||
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);// SILENCED
|
||||
dungdesert->SetDuration(-1);
|
||||
bgdesert->SetDuration(-1);
|
||||
silent->SetDuration(-1);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -176,10 +179,8 @@ public:
|
||||
if (pTarget == handler->GetSession()->GetPlayer())
|
||||
return false;
|
||||
|
||||
WorldLocation Aloc;
|
||||
WorldLocation Hloc;
|
||||
Aloc = WorldLocation(0, -8833.37f, 628.62f, 94.00f, 1.06f);// Stormwind
|
||||
Hloc = WorldLocation(1, 1569.59f, -4397.63f, 16.06f, 0.54f);// Orgrimmar
|
||||
WorldLocation Aloc = WorldLocation(0, -8833.37f, 628.62f, 94.00f, 1.06f);// Stormwind
|
||||
WorldLocation Hloc = WorldLocation(1, 1569.59f, -4397.63f, 16.06f, 0.54f);// Orgrimmar
|
||||
|
||||
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
|
||||
{
|
||||
@@ -194,6 +195,7 @@ public:
|
||||
pTarget->RemoveAura(SHACKLES);// remove shackles
|
||||
pTarget->RemoveAura(LFG_SPELL_DUNGEON_DESERTER);// LFG_SPELL_DUNGEON_DESERTER
|
||||
pTarget->RemoveAura(BG_SPELL_DESERTER);// BG_SPELL_DESERTER
|
||||
pTarget->RemoveAura(SILENCED);// SILENCED
|
||||
sAnticheatMgr->AnticheatDeleteCommand(pTarget->GetGUID());// deletes auto reports on player
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user