mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 22:15:15 +00:00
chore(Core/Player): remove unused AnticheatSetSkipOnePacketForASH() function (#17947)
This commit is contained in:
committed by
GitHub
parent
4d935d6d8a
commit
ac676f87ab
@@ -1313,9 +1313,6 @@ void Player::SendTeleportAckPacket()
|
||||
|
||||
bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options /*= 0*/, Unit* target /*= nullptr*/, bool newInstance /*= false*/)
|
||||
{
|
||||
// for except kick by antispeedhack
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(this, true);
|
||||
|
||||
if (!MapMgr::IsValidMapCoord(mapid, x, y, z, orientation))
|
||||
{
|
||||
LOG_ERROR("entities.player", "TeleportTo: invalid map ({}) or invalid coordinates (X: {}, Y: {}, Z: {}, O: {}) given when teleporting player ({}, name: {}, map: {}, X: {}, Y: {}, Z: {}, O: {}).",
|
||||
|
||||
@@ -18543,11 +18543,6 @@ void Unit::SetFeared(bool apply, Unit* fearedBy /*= nullptr*/, bool isFear /*= f
|
||||
{
|
||||
SetTarget();
|
||||
GetMotionMaster()->MoveFleeing(fearedBy, isFear ? 0 : sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(ToPlayer(), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -18580,11 +18575,6 @@ void Unit::SetConfused(bool apply)
|
||||
{
|
||||
SetTarget();
|
||||
GetMotionMaster()->MoveConfused();
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(ToPlayer(), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -19439,7 +19429,6 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
|
||||
if (player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || player->HasAuraType(SPELL_AURA_FLY))
|
||||
player->SetCanFly(true, true);
|
||||
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
player->SetCanKnockback(true);
|
||||
}
|
||||
}
|
||||
@@ -19898,7 +19887,6 @@ void Unit::EnterVehicle(Unit* base, int8 seatId)
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
sScriptMgr->AnticheatSetUnderACKmount(player);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19941,7 +19929,6 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
return;
|
||||
|
||||
sScriptMgr->AnticheatSetUnderACKmount(player);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
|
||||
InterruptNonMeleeSpells(false);
|
||||
player->StopCastingCharm();
|
||||
@@ -20014,7 +20001,6 @@ void Unit::ExitVehicle(Position const* /*exitPosition*/)
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
sScriptMgr->AnticheatSetUnderACKmount(player);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20088,7 +20074,6 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
player->SetFallInformation(GameTime::GetGameTime().count(), GetPositionZ());
|
||||
|
||||
sScriptMgr->AnticheatSetUnderACKmount(player);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
}
|
||||
else if (HasUnitMovementFlag(MOVEMENTFLAG_ROOT))
|
||||
{
|
||||
|
||||
@@ -383,7 +383,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
{
|
||||
if (plrMover)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
|
||||
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
|
||||
}
|
||||
|
||||
@@ -405,7 +404,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
{
|
||||
if (plrMover)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
|
||||
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
|
||||
}
|
||||
return;
|
||||
@@ -427,7 +425,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
{
|
||||
if (plrMover)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
|
||||
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
|
||||
//LOG_INFO("anticheat", "MovementHandler:: 2 We were teleported, skip packets that were broadcast before teleport");
|
||||
}
|
||||
@@ -440,7 +437,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
{
|
||||
if (plrMover)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
|
||||
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
|
||||
}
|
||||
|
||||
@@ -461,8 +457,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
}
|
||||
else if (plrMover->GetTransport()->GetGUID() != movementInfo.transport.guid)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
|
||||
|
||||
bool foundNewTransport = false;
|
||||
plrMover->m_transport->RemovePassenger(plrMover);
|
||||
if (Transport* transport = plrMover->GetMap()->GetTransport(movementInfo.transport.guid))
|
||||
|
||||
@@ -120,13 +120,9 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
|
||||
GetPlayer()->Mount(mountDisplayId);
|
||||
|
||||
if (Creature* critter = ObjectAccessor::GetCreature(*GetPlayer(), GetPlayer()->GetCritterGUID()))
|
||||
{
|
||||
critter->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path, pathNode);
|
||||
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(GetPlayer(), true);
|
||||
}
|
||||
|
||||
bool WorldSession::SendLearnNewTaxiNode(Creature* unit)
|
||||
|
||||
@@ -1620,14 +1620,6 @@ void ScriptMgr::OnQuestAbandon(Player* player, uint32 questId)
|
||||
}
|
||||
|
||||
// Player anti cheat
|
||||
void ScriptMgr::AnticheatSetSkipOnePacketForASH(Player* player, bool apply)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->AnticheatSetSkipOnePacketForASH(player, apply);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::AnticheatSetCanFlybyServer(Player* player, bool apply)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
|
||||
@@ -526,7 +526,6 @@ public:
|
||||
[[nodiscard]] virtual bool OnCanPlayerFlyInZone(Player* /*player*/, uint32 /*mapId*/, uint32 /*zoneId*/, SpellInfo const* /*bySpell*/) { return true; }
|
||||
|
||||
// Passive Anticheat System
|
||||
virtual void AnticheatSetSkipOnePacketForASH(Player* /*player*/, bool /*apply*/) { }
|
||||
virtual void AnticheatSetCanFlybyServer(Player* /*player*/, bool /*apply*/) { }
|
||||
virtual void AnticheatSetUnderACKmount(Player* /*player*/) { }
|
||||
virtual void AnticheatSetRootACKUpd(Player* /*player*/) { }
|
||||
|
||||
@@ -455,7 +455,6 @@ public: /* PlayerScript */
|
||||
bool OnCanPlayerFlyInZone(Player* player, uint32 mapId, uint32 zoneId, SpellInfo const* bySpell);
|
||||
|
||||
// Anti cheat
|
||||
void AnticheatSetSkipOnePacketForASH(Player* player, bool apply);
|
||||
void AnticheatSetCanFlybyServer(Player* player, bool apply);
|
||||
void AnticheatSetUnderACKmount(Player* player);
|
||||
void AnticheatSetRootACKUpd(Player* player);
|
||||
|
||||
@@ -4927,7 +4927,6 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
|
||||
Player* player = m_caster->ToPlayer();
|
||||
if (player)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
|
||||
// charge changes fall time
|
||||
player->SetFallInformation(GameTime::GetGameTime().count(), m_caster->GetPositionZ());
|
||||
|
||||
@@ -4954,11 +4953,6 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
|
||||
sScriptMgr->AnticheatSetUnderACKmount(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET && m_caster->ToPlayer())
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(m_caster->ToPlayer(), true);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
|
||||
@@ -4966,11 +4960,6 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH)
|
||||
return;
|
||||
|
||||
if (m_caster->ToPlayer())
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(m_caster->ToPlayer(), true);
|
||||
}
|
||||
|
||||
if (m_targets.HasDst())
|
||||
{
|
||||
Position pos = destTarget->GetPosition();
|
||||
@@ -5162,7 +5151,6 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(unitTarget->ToPlayer(), true);
|
||||
sScriptMgr->AnticheatSetUnderACKmount(unitTarget->ToPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,7 +538,6 @@ public:
|
||||
pPlayer->SendMessageToSet(&data, true);
|
||||
|
||||
sScriptMgr->AnticheatSetUnderACKmount(pPlayer);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(pPlayer, true);
|
||||
|
||||
pPlayer->SetGuidValue(PLAYER_FARSIGHT, vp->GetGUID());
|
||||
c->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -721,7 +720,6 @@ public:
|
||||
if (Player* pPlayer = i->GetSource())
|
||||
{
|
||||
sScriptMgr->AnticheatSetUnderACKmount(pPlayer);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(pPlayer, true);
|
||||
|
||||
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
|
||||
continue;
|
||||
@@ -908,7 +906,6 @@ public:
|
||||
|
||||
sScriptMgr->AnticheatSetCanFlybyServer(plr, false);
|
||||
sScriptMgr->AnticheatSetUnderACKmount(plr);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plr, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -948,7 +945,6 @@ public:
|
||||
plr->SetDisableGravity(true, true);
|
||||
|
||||
sScriptMgr->AnticheatSetCanFlybyServer(plr, true);
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(plr, true);
|
||||
sScriptMgr->AnticheatSetUnderACKmount(plr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user