Jail Feat Update

Remove magic numbers, incorporate deserter auras to prevent queuing jail break
This commit is contained in:
MDIC
2022-04-11 12:37:04 -04:00
parent 7c2f0e4f2b
commit b78ce2399c
2 changed files with 24 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
#include "MapMgr.h"
#include "Player.h"
#include "Configuration/Config.h"
#include "SpellAuras.h"
#define CLIMB_ANGLE 1.87f
@@ -25,6 +26,13 @@
#define LANG_ANTICHEAT_TELEPORT 30088
#define LANG_ANTICHEAT_IGNORECONTROL 30089
enum Spells
{
SHACKLES = 38505,
LFG_SPELL_DUNGEON_DESERTER = 71041,
BG_SPELL_DESERTER = 26013
};
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
player->TeleportTo(loc);
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))
{