mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
Jail Feat Update
Remove magic numbers, incorporate deserter auras to prevent queuing jail break
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "MapMgr.h"
|
#include "MapMgr.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Configuration/Config.h"
|
#include "Configuration/Config.h"
|
||||||
|
#include "SpellAuras.h"
|
||||||
|
|
||||||
#define CLIMB_ANGLE 1.87f
|
#define CLIMB_ANGLE 1.87f
|
||||||
|
|
||||||
@@ -25,6 +26,13 @@
|
|||||||
#define LANG_ANTICHEAT_TELEPORT 30088
|
#define LANG_ANTICHEAT_TELEPORT 30088
|
||||||
#define LANG_ANTICHEAT_IGNORECONTROL 30089
|
#define LANG_ANTICHEAT_IGNORECONTROL 30089
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
SHACKLES = 38505,
|
||||||
|
LFG_SPELL_DUNGEON_DESERTER = 71041,
|
||||||
|
BG_SPELL_DESERTER = 26013
|
||||||
|
};
|
||||||
|
|
||||||
AnticheatMgr::AnticheatMgr()
|
AnticheatMgr::AnticheatMgr()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -681,7 +689,9 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|||||||
loc = WorldLocation(1, 16226.5f, 16403.6f, -64.5f, 3.2f); // GM Jail Location
|
loc = WorldLocation(1, 16226.5f, 16403.6f, -64.5f, 3.2f); // GM Jail Location
|
||||||
player->TeleportTo(loc);
|
player->TeleportTo(loc);
|
||||||
player->SetHomebind(loc, 876); // GM Jail Homebind location
|
player->SetHomebind(loc, 876); // GM Jail Homebind location
|
||||||
player->CastSpell(player, 38505); // Shackle him in place to ensure no exploit happens for jail break attempt
|
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
|
||||||
|
|
||||||
if (sConfigMgr->GetOption<bool>("Anticheat.AnnounceJail", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.AnnounceJail", true))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,13 @@
|
|||||||
|
|
||||||
using namespace Acore::ChatCommands;
|
using namespace Acore::ChatCommands;
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
SHACKLES = 38505,
|
||||||
|
LFG_SPELL_DUNGEON_DESERTER = 71041,
|
||||||
|
BG_SPELL_DESERTER = 26013
|
||||||
|
};
|
||||||
|
|
||||||
class anticheat_commandscript : public CommandScript
|
class anticheat_commandscript : public CommandScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -128,7 +135,9 @@ public:
|
|||||||
loc = WorldLocation(1, 16226.5f, 16403.6f, -64.5f, 3.2f); // GM Jail Location
|
loc = WorldLocation(1, 16226.5f, 16403.6f, -64.5f, 3.2f); // GM Jail Location
|
||||||
pTarget->TeleportTo(loc);
|
pTarget->TeleportTo(loc);
|
||||||
pTarget->SetHomebind(loc, 876); // GM Jail Homebind location
|
pTarget->SetHomebind(loc, 876); // GM Jail Homebind location
|
||||||
pTarget->CastSpell(pTarget, 38505); // Shackle him in place to ensure no exploit happens for jail break attempt
|
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
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -179,7 +188,9 @@ public:
|
|||||||
pTarget->TeleportTo(1, 1569.59f, -4397.63f, 7.7f, 0.54f);//Orgrimmar
|
pTarget->TeleportTo(1, 1569.59f, -4397.63f, 7.7f, 0.54f);//Orgrimmar
|
||||||
pTarget->SetHomebind(Hloc, 1653);// Orgrimmar Homebind location
|
pTarget->SetHomebind(Hloc, 1653);// Orgrimmar Homebind location
|
||||||
}
|
}
|
||||||
pTarget->RemoveAura(38505);// remove shackles
|
pTarget->RemoveAura(SHACKLES);// remove shackles
|
||||||
|
pTarget->RemoveAura(LFG_SPELL_DUNGEON_DESERTER);// LFG_SPELL_DUNGEON_DESERTER
|
||||||
|
pTarget->RemoveAura(BG_SPELL_DESERTER);// BG_SPELL_DESERTER
|
||||||
sAnticheatMgr->AnticheatDeleteCommand(pTarget->GetGUID());// deletes auto reports on player
|
sAnticheatMgr->AnticheatDeleteCommand(pTarget->GetGUID());// deletes auto reports on player
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user