mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Core/Anticheat): Preparation to implement new passive anticheat … (#5516)
This commit is contained in:
@@ -1824,6 +1824,8 @@ void Player::Update(uint32 p_time)
|
||||
m_zoneUpdateTimer -= p_time;
|
||||
}
|
||||
|
||||
sScriptMgr->OnPlayerUpdate(this, p_time);
|
||||
|
||||
if (IsAlive())
|
||||
{
|
||||
m_regenTimer += p_time;
|
||||
@@ -2221,6 +2223,9 @@ void Player::SendTeleportAckPacket()
|
||||
|
||||
bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options /*= 0*/, Unit* target /*= nullptr*/)
|
||||
{
|
||||
// for except kick by antispeedhack
|
||||
sScriptMgr->AnticheatSetSkipOnePacketForASH(this, true);
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation))
|
||||
{
|
||||
LOG_ERROR("server", "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (%s, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
|
||||
@@ -28125,6 +28130,8 @@ bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/)
|
||||
|
||||
bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/)
|
||||
{
|
||||
sScriptMgr->AnticheatSetCanFlybyServer(this, apply);
|
||||
|
||||
if (!packetOnly && !Unit::SetCanFly(apply))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user