mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
Fix compile - missing sql and worldserver.conf.dist
This commit is contained in:
@@ -38,7 +38,7 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo /* movementInf
|
||||
if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP && opcode == MSG_MOVE_JUMP)
|
||||
{
|
||||
BuildReport(player,JUMP_HACK_REPORT);
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Jump-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Jump-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo /* move
|
||||
player->HasAuraType(SPELL_AURA_WATER_WALK))
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Walk on Water - Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Walk on Water - Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
BuildReport(player,WALK_WATER_HACK_REPORT);
|
||||
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo /* movementInfo
|
||||
player->HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED))
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Fly-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Fly-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
BuildReport(player,FLY_HACK_REPORT);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
|
||||
// we are not really walking there
|
||||
if (z_diff > 1.0f)
|
||||
{
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Teleport To Plane - Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Teleport To Plane - Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
BuildReport(player,TELEPORT_PLANE_HACK_REPORT);
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,8 @@ void AnticheatMgr::ClimbHackDetection(Player *player, MovementInfo movementInfo,
|
||||
return;
|
||||
|
||||
Position playerPos;
|
||||
Position pos = player->GetPosition();
|
||||
Position pos;
|
||||
player->GetPosition(&pos);
|
||||
|
||||
float deltaZ = fabs(playerPos.GetPositionZ() - movementInfo.pos.GetPositionZ());
|
||||
float deltaXY = movementInfo.pos.GetExactDist2d(&playerPos);
|
||||
@@ -169,7 +170,7 @@ void AnticheatMgr::ClimbHackDetection(Player *player, MovementInfo movementInfo,
|
||||
|
||||
if (angle > CLIMB_ANGLE)
|
||||
{
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Climb-Hack detected player GUID (low) %u", player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Climb-Hack detected player GUID (low) %u", player->GetGUIDLow());
|
||||
BuildReport(player,CLIMB_HACK_REPORT);
|
||||
}
|
||||
}
|
||||
@@ -217,7 +218,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player,MovementInfo movementInfo)
|
||||
if (clientSpeedRate > speedRate)
|
||||
{
|
||||
BuildReport(player,SPEED_HACK_REPORT);
|
||||
TC_LOG_DEBUG("entities.player.character", "AnticheatMgr:: Speed-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
sLog->outError("AnticheatMgr:: Speed-Hack detected player GUID (low) %u",player->GetGUIDLow());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9080,6 +9080,14 @@ GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//[AZTH]
|
||||
Player* ObjectMgr::GetPlayerByLowGUID(uint32 lowguid) const
|
||||
{
|
||||
uint64 guid = MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER);
|
||||
return ObjectAccessor::FindPlayer(guid);
|
||||
}
|
||||
//[AZTH]
|
||||
|
||||
bool ObjectMgr::IsGameObjectStaticTransport(uint32 entry)
|
||||
{
|
||||
GameObjectTemplate const* goinfo = GetGameObjectTemplate(entry);
|
||||
|
||||
@@ -666,6 +666,8 @@ class ObjectMgr
|
||||
|
||||
typedef std::map<uint32, uint32> CharacterConversionMap;
|
||||
|
||||
Player* GetPlayerByLowGUID(uint32 lowguid) const; //[AZTH]
|
||||
|
||||
GameObjectTemplate const* GetGameObjectTemplate(uint32 entry);
|
||||
bool IsGameObjectStaticTransport(uint32 entry);
|
||||
GameObjectTemplateContainer const* GetGameObjectTemplates() const { return &_gameObjectTemplateStore; }
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "ArenaSpectator.h"
|
||||
#include "Chat.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "AnticheatMgr.h"
|
||||
|
||||
#define MOVEMENT_PACKET_TIME_DELAY 0
|
||||
|
||||
@@ -407,6 +408,11 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
|
||||
// Dont allow to turn on walking if charming other player
|
||||
if (mover->GetGUID() != _player->GetGUID())
|
||||
movementInfo.flags &= ~MOVEMENTFLAG_WALKING;
|
||||
|
||||
// [AZTH] Anticheat
|
||||
if (plrMover)
|
||||
sAnticheatMgr->StartHackDetection(plrMover, movementInfo, opcode);
|
||||
// [/AZTH]
|
||||
|
||||
uint32 mstime = World::GetGameTimeMS();
|
||||
/*----------------------*/
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "ScriptLoader.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "AnticheatMgr.h"
|
||||
|
||||
//examples
|
||||
void AddSC_example_creature();
|
||||
@@ -595,6 +596,7 @@ void AddScripts()
|
||||
AddSpellScripts();
|
||||
AddSC_SmartSCripts();
|
||||
AddCommandScripts();
|
||||
sAnticheatMgr->StartScripts(); //[AZTH] Anticheat
|
||||
#ifdef SCRIPTS
|
||||
AddWorldScripts();
|
||||
AddEventScripts();
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#include "WhoListCache.h"
|
||||
#include "AsyncAuctionListing.h"
|
||||
#include "SavingSystem.h"
|
||||
#include "AnticheatMgr.h"
|
||||
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool> World::m_stopEvent = false;
|
||||
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
|
||||
@@ -1197,6 +1198,13 @@ void World::LoadConfigSettings(bool reload)
|
||||
// Dungeon finder
|
||||
m_int_configs[CONFIG_LFG_OPTIONSMASK] = sConfigMgr->GetIntDefault("DungeonFinder.OptionsMask", 3);
|
||||
|
||||
//[AZTH] ANTICHEAT
|
||||
m_bool_configs[CONFIG_ANTICHEAT_ENABLE] = sConfigMgr->GetBoolDefault("Anticheat.Enable", true);
|
||||
m_int_configs[CONFIG_ANTICHEAT_REPORTS_INGAME_NOTIFICATION] = sConfigMgr->GetIntDefault("Anticheat.ReportsForIngameWarnings", 70);
|
||||
m_int_configs[CONFIG_ANTICHEAT_DETECTIONS_ENABLED] = sConfigMgr->GetIntDefault("Anticheat.DetectionsEnabled", 31);
|
||||
m_int_configs[CONFIG_ANTICHEAT_MAX_REPORTS_FOR_DAILY_REPORT] = sConfigMgr->GetIntDefault("Anticheat.MaxReportsForDailyReport", 70);
|
||||
//[AZTH]
|
||||
|
||||
// DBC_ItemAttributes
|
||||
m_bool_configs[CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES] = sConfigMgr->GetBoolDefault("DBC.EnforceItemAttributes", true);
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_QUEST_IGNORE_AUTO_ACCEPT,
|
||||
CONFIG_QUEST_IGNORE_AUTO_COMPLETE,
|
||||
CONFIG_WARDEN_ENABLED,
|
||||
CONFIG_ANTICHEAT_ENABLE,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
@@ -317,6 +318,9 @@ enum WorldIntConfigs
|
||||
CONFIG_WARDEN_NUM_MEM_CHECKS,
|
||||
CONFIG_WARDEN_NUM_OTHER_CHECKS,
|
||||
CONFIG_BIRTHDAY_TIME,
|
||||
CONFIG_ANTICHEAT_REPORTS_INGAME_NOTIFICATION,
|
||||
CONFIG_ANTICHEAT_MAX_REPORTS_FOR_DAILY_REPORT,
|
||||
CONFIG_ANTICHEAT_DETECTIONS_ENABLED,
|
||||
INT_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user