吾爱尚玩资源基地

标题: 最新的T端335防外挂系统 [打印本页]

作者: admin    时间: 2016-4-20 22:43
标题: 最新的T端335防外挂系统
部分代码展示
diff --git a/sql/PokerFace/Anticheat/anticheat_characters.sql b/sql/PokerFace/Anticheat/anticheat_characters.sql
new file mode 100644
index 0000000..3504594
--- /dev/null
+++ b/sql/PokerFace/Anticheat/anticheat_characters.sql
@@ -0,0 +1,30 @@
+DROP TABLE IF EXISTS `players_reports_status`;
+
+CREATE TABLE `players_reports_status` (
+  `guid` int(10) unsigned NOT NULL DEFAULT '0',
+  `creation_time` int(10) unsigned NOT NULL DEFAULT '0',
+  `average` float NOT NULL DEFAULT '0',
+  `total_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `speed_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `fly_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `jump_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `waterwalk_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `teleportplane_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `climb_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`guid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';
+
+DROP TABLE IF EXISTS `daily_players_reports`;
+CREATE TABLE `daily_players_reports` (
+  `guid` int(10) unsigned NOT NULL DEFAULT '0',
+  `creation_time` int(10) unsigned NOT NULL DEFAULT '0',
+  `average` float NOT NULL DEFAULT '0',
+  `total_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `speed_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `fly_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `jump_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `waterwalk_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `teleportplane_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `climb_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`guid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';
\ No newline at end of file
diff --git a/sql/PokerFace/Anticheat/anticheat_world.sql b/sql/PokerFace/Anticheat/anticheat_world.sql
new file mode 100644
index 0000000..30f5515
--- /dev/null
+++ b/sql/PokerFace/Anticheat/anticheat_world.sql
@@ -0,0 +1,6 @@
+REPLACE INTO `command` (`name`,`security`,`help`) VALUES ('anticheat global', '2', 'Syntax: .anticheat
+global returns the total amount reports and the average. (top three players)'), ('anticheat player', '2',
+'Syntax: .anticheat player $name returns the players''s total amount of warnings, the average and the
+amount of each cheat type.'), ('anticheat handle', '2', 'Syntax: .anticheat handle [on|off] Turn on/off the
+AntiCheat-Detection .'),
+('anticheat delete', '2', 'Syntax: .anticheat delete [deleteall|$name] Deletes the report records of all the players or deletes all the reports of player $name.');
\ No newline at end of file
diff --git a/src/server/game/Anticheat/AnticheatData.cpp b/src/server/game/Anticheat/AnticheatData.cpp
new file mode 100644
index 0000000..8c69972
--- /dev/null
+++ b/src/server/game/Anticheat/AnticheatData.cpp
@@ -0,0 +1,118 @@
+#include "AnticheatData.h"
+
+AnticheatData::AnticheatData()
+{
+    lastOpcode = 0;
+    totalReports = 0;
+    for (uint8 i = 0; i < MAX_REPORT_TYPES; i++)
+    {
+        typeReports = 0;
+        tempReports = 0;
+        tempReportsTimer = 0;
+    }
+    average = 0;
+    creationTime = 0;
+    hasDailyReport = false;
+}
+
+AnticheatData::~AnticheatData()
+{
+}
+
+void AnticheatData::SetDailyReportState(bool b)
+{
+    hasDailyReport = b;
+}
+
+bool AnticheatData::GetDailyReportState()
+{
+    return hasDailyReport;
+}
+
+void AnticheatData::SetLastOpcode(uint32 opcode)
+{
+    lastOpcode = opcode;
+}
+
+void AnticheatData::SetPosition(float x, float y, float z, float o)
+{
+    lastMovementInfo.pos.m_positionX = x;
+    lastMovementInfo.pos.m_positionY = y;
+    lastMovementInfo.pos.m_positionZ = z;
+    lastMovementInfo.pos.m_orientation = o;
+}
+
+uint32 AnticheatData::GetLastOpcode() const
+{
+    return lastOpcode;
+}
+
+const MovementInfo& AnticheatData::GetLastMovementInfo() const
+{
+    return lastMovementInfo;
+}
+
+void AnticheatData::SetLastMovementInfo(MovementInfo& moveInfo)
+{
+    lastMovementInfo = moveInfo;
+}
+
+uint32 AnticheatData::GetTotalReports() const
+{
+    return totalReports;
+}
+
+void AnticheatData::SetTotalReports(uint32 _totalReports)
+{
+    totalReports = _totalReports;
+}
+
+void AnticheatData::SetTypeReports(uint32 type, uint32 amount)
+{
+    typeReports[type] = amount;
+}
+
+uint32 AnticheatData::GetTypeReports(uint32 type) const
+{
+    return typeReports[type];
+}
+
+float AnticheatData::GetAverage() const
+{
+    return average;
+}
+
+void AnticheatData::SetAverage(float _average)
+{
+    average = _average;
+}
+
+uint32 AnticheatData::GetCreationTime() const
+{
+    return creationTime;
+}
+
+void AnticheatData::SetCreationTime(uint32 _creationTime)
+{
+    creationTime = _creationTime;
+}
+
+void AnticheatData::SetTempReports(uint32 amount, uint8 type)
+{
+    tempReports[type] = amount;
+}
+
+uint32 AnticheatData::GetTempReports(uint8 type)
+{
+    return tempReports[type];
+}
+
+void AnticheatData::SetTempReportsTimer(uint32 time, uint8 type)
+{
+    tempReportsTimer[type] = time;
+}
+
+uint32 AnticheatData::GetTempReportsTimer(uint8 type)
+{
+    return tempReportsTimer[type];
+}


回复下载完整代码









欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4