|
Архив - только для чтения |
| Модератор форума: andycrowz |
| Форум » Корзина форума » Корзина » Ошибки при конпиляции (TrinityCore) |
| Ошибки при конпиляции |
Я буду показывать ошибку и страницу где ошибка присутствует кто поможет буду очень благодарен!
Ошибки Ошибка 1 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 33 1 game Ошибка 2 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 47 1 game Ошибка 3 error C2039: isAlive: не является членом "Player" C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 55 1 game Ошибка 4 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 70 1 game Ошибка 5 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 88 1 game Ошибка 6 error C2039: isGameMaster: не является членом "Player" C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 121 1 game Ошибка 7 error C2039: isInFlight: не является членом "Player" C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 126 1 game Ошибка 8 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 147 1 game Ошибка 9 error C2039: NormalizeOrientation: не является членом "MapManager" C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 168 1 game Ошибка 10 error C3861: NormalizeOrientation: идентификатор не найден C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 168 1 game Ошибка 11 error C2065: CONFIG_ANTICHEAT_DETECTIONS_ENABLED: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 179 1 game Ошибка 12 error C2039: j_xyspeed: не является членом "MovementInfo" C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 205 1 game Ошибка 13 error C2065: CONFIG_ANTICHEAT_MAX_REPORTS_FOR_DAILY_REPORT: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 323 1 game Ошибка 14 error C2065: CONFIG_ANTICHEAT_REPORTS_INGAME_NOTIFICATION: необъявленный идентификатор C:\wow\server\src\server\game\Anticheat\AnticheatMgr.cpp 332 1 game Страница /* * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "AnticheatMgr.h" #include "AnticheatScripts.h" #include "MapManager.h" #define CLIMB_ANGLE 1.9f AnticheatMgr::AnticheatMgr() { } AnticheatMgr::~AnticheatMgr() { m_Players.clear(); } void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,uint32 opcode) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & JUMP_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP && opcode == MSG_MOVE_JUMP) { BuildReport(player,JUMP_HACK_REPORT); //sLog->outError("AnticheatMgr:: Jump-Hack detected player GUID (low) %u",player->GetGUIDLow()); } } void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo movementInfo) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & WALK_WATER_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); if (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_WATERWALKING)) return; // if we are a ghost we can walk on water if (!player->isAlive()) return; if (player->HasAuraType(SPELL_AURA_FEATHER_FALL) || player->HasAuraType(SPELL_AURA_SAFE_FALL) || player->HasAuraType(SPELL_AURA_WATER_WALK)) return; //sLog->outError("AnticheatMgr:: Walk on Water - Hack detected player GUID (low) %u",player->GetGUIDLow()); BuildReport(player,WALK_WATER_HACK_REPORT); } void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & FLY_HACK_DETECTION) == 0)if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & FLY_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); if (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FLYING)) return; if (player->HasAuraType(SPELL_AURA_FLY) || player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || player->HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED)) return; //sLog->outError("AnticheatMgr:: Fly-Hack detected player GUID (low) %u",player->GetGUIDLow()); BuildReport(player,FLY_HACK_REPORT); } void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movementInfo) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & TELEPORT_PLANE_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); if (m_Players[key].GetLastMovementInfo().pos.GetPositionZ() != 0 || movementInfo.pos.GetPositionZ() != 0) return; if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING)) return; //DEAD_FALLING was deprecated //if (player->getDeathState() == DEAD_FALLING) // return; float x, y, z; player->GetPosition(x, y, z); float ground_Z = player->GetMap()->GetHeight(x, y, z); float z_diff = fabs(ground_Z - z); // we are not really walking there if (z_diff > 1.0f) { //sLog->outError("AnticheatMgr:: Teleport To Plane - Hack detected player GUID (low) %u",player->GetGUIDLow()); BuildReport(player,TELEPORT_PLANE_HACK_REPORT); } } void AnticheatMgr::StartHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) return; if (player->isGameMaster()) return; uint32 key = player->GetGUIDLow(); if (player->isInFlight() || player->GetTransport() || player->GetVehicle()) { m_Players[key].SetLastMovementInfo(movementInfo); m_Players[key].SetLastOpcode(opcode); return; } SpeedHackDetection(player,movementInfo); FlyHackDetection(player,movementInfo); WalkOnWaterHackDetection(player,movementInfo); JumpHackDetection(player,movementInfo,opcode); TeleportPlaneHackDetection(player, movementInfo); ClimbHackDetection(player,movementInfo,opcode); m_Players[key].SetLastMovementInfo(movementInfo); m_Players[key].SetLastOpcode(opcode); } // basic detection void AnticheatMgr::ClimbHackDetection(Player *player, MovementInfo movementInfo, uint32 opcode) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & CLIMB_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); if (opcode != MSG_MOVE_HEARTBEAT || m_Players[key].GetLastOpcode() != MSG_MOVE_HEARTBEAT) return; // in this case we don't care if they are "legal" flags, they are handled in another parts of the Anticheat Manager. if (player->IsInWater() || player->IsFlying() || player->IsFalling()) return; Position playerPos; player->GetPosition(&playerPos); float deltaZ = fabs(playerPos.GetPositionZ() - movementInfo.pos.GetPositionZ()); float deltaXY = movementInfo.pos.GetExactDist2d(&playerPos); if (angle > CLIMB_ANGLE) { //sLog->outError("AnticheatMgr:: Climb-Hack detected player GUID (low) %u", player->GetGUIDLow()); BuildReport(player,CLIMB_HACK_REPORT); } } void AnticheatMgr::SpeedHackDetection(Player* player,MovementInfo movementInfo) { if ((sWorld->getIntConfig(CONFIG_ANTICHEAT_DETECTIONS_ENABLED) & SPEED_HACK_DETECTION) == 0) return; uint32 key = player->GetGUIDLow(); // We also must check the map because the movementFlag can be modified by the client. // If we just check the flag, they could always add that flag and always skip the speed hacking detection. // 369 == DEEPRUN TRAM if (m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && player->GetMapId() == 369) return; uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); uint8 moveType = 0; // we need to know HOW is the player moving // TO-DO: Should we check the incoming movement flags? if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING)) moveType = MOVE_SWIM; else if (player->IsFlying()) moveType = MOVE_FLIGHT; else if (player->HasUnitMovementFlag(MOVEMENTFLAG_WALKING)) moveType = MOVE_WALK; else moveType = MOVE_RUN; // how many yards the player can do in one sec. uint32 speedRate = (uint32)(player->GetSpeed(UnitMoveType(moveType)) + movementInfo.j_xyspeed); // how long the player took to move to here. uint32 timeDiff = getMSTimeDiff(m_Players[key].GetLastMovementInfo().time,movementInfo.time); if (!timeDiff) timeDiff = 1; // this is the distance doable by the player in 1 sec, using the time done to move to this point. uint32 clientSpeedRate = distance2D * 1000 / timeDiff; // we did the (uint32) cast to accept a margin of tolerance if (clientSpeedRate > speedRate) { BuildReport(player,SPEED_HACK_REPORT); //sLog->outError("AnticheatMgr:: Speed-Hack detected player GUID (low) %u",player->GetGUIDLow()); } } void AnticheatMgr::StartScripts() { new AnticheatScripts(); } void AnticheatMgr::HandlePlayerLogin(Player* player) { // we must delete this to prevent errors in case of crash CharacterDatabase.PExecute("DELETE FROM players_reports_status WHERE guid=%u",player->GetGUIDLow()); // we initialize the pos of lastMovementPosition var. m_Players[player->GetGUIDLow()].SetPosition(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ(),player->GetOrientation()); QueryResult resultDB = CharacterDatabase.PQuery("SELECT * FROM daily_players_reports WHERE guid=%u;",player->GetGUIDLow()); if (resultDB) m_Players[player->GetGUIDLow()].SetDailyReportState(true); } void AnticheatMgr::HandlePlayerLogout(Player* player) { // TO-DO Make a table that stores the cheaters of the day, with more detailed information. // We must also delete it at logout to prevent have data of offline players in the db when we query the database (IE: The GM Command) CharacterDatabase.PExecute("DELETE FROM players_reports_status WHERE guid=%u",player->GetGUIDLow()); // Delete not needed data from the memory. m_Players.erase(player->GetGUIDLow()); } void AnticheatMgr::SavePlayerData(Player* player) { CharacterDatabase.PExecute("REPLACE INTO players_reports_status (guid,average,total_reports,speed_reports,fly_reports,jump_reports,waterwalk_reports,teleportplane_reports,climb_reports,creation_time) VALUES (%u,%f,%u,%u,%u,%u,%u,%u,%u,%u);",player->GetGUIDLow(),m_Players[player->GetGUIDLow()].GetAverage(),m_Players[player->GetGUIDLow()].GetTotalReports(), m_Players[player->GetGUIDLow()].GetTypeReports(SPEED_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(FLY_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(JUMP_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(WALK_WATER_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(TELEPORT_PLANE_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(CLIMB_HACK_REPORT),m_Players[player->GetGUIDLow()].GetCreationTime()); } uint32 AnticheatMgr::GetTotalReports(uint32 lowGUID) { return m_Players[lowGUID].GetTotalReports(); } float AnticheatMgr::GetAverage(uint32 lowGUID) { return m_Players[lowGUID].GetAverage(); } uint32 AnticheatMgr::GetTypeReports(uint32 lowGUID, uint8 type) { return m_Players[lowGUID].GetTypeReports(type); } bool AnticheatMgr::MustCheckTempReports(uint8 type) { if (type == JUMP_HACK_REPORT) return false; return true; } void AnticheatMgr::BuildReport(Player* player,uint8 reportType) { uint32 key = player->GetGUIDLow(); if (MustCheckTempReports(reportType)) { uint32 actualTime = getMSTime(); if (!m_Players[key].GetTempReportsTimer(reportType)) m_Players[key].SetTempReportsTimer(actualTime,reportType); if (getMSTimeDiff(m_Players[key].GetTempReportsTimer(reportType),actualTime) < 3000) { m_Players[key].SetTempReports(m_Players[key].GetTempReports(reportType)+1,reportType); if (m_Players[key].GetTempReports(reportType) < 3) return; } else { m_Players[key].SetTempReportsTimer(actualTime,reportType); m_Players[key].SetTempReports(1,reportType); return; } } // generating creationTime for average calculation if (!m_Players[key].GetTotalReports()) m_Players[key].SetCreationTime(getMSTime()); // increasing total_reports m_Players[key].SetTotalReports(m_Players[key].GetTotalReports()+1); // increasing specific cheat report m_Players[key].SetTypeReports(reportType,m_Players[key].GetTypeReports(reportType)+1); // diff time for average calculation uint32 diffTime = getMSTimeDiff(m_Players[key].GetCreationTime(),getMSTime()) / IN_MILLISECONDS; if (diffTime > 0) { // Average == Reports per second float average = float(m_Players[key].GetTotalReports()) / float(diffTime); m_Players[key].SetAverage(average); } if (sWorld->getIntConfig(CONFIG_ANTICHEAT_MAX_REPORTS_FOR_DAILY_REPORT) < m_Players[key].GetTotalReports()) { if (!m_Players[key].GetDailyReportState()) { CharacterDatabase.PExecute("REPLACE INTO daily_players_reports (guid,average,total_reports,speed_reports,fly_reports,jump_reports,waterwalk_reports,teleportplane_reports,climb_reports,creation_time) VALUES (%u,%f,%u,%u,%u,%u,%u,%u,%u,%u);",player->GetGUIDLow(),m_Players[player->GetGUIDLow()].GetAverage(),m_Players[player->GetGUIDLow()].GetTotalReports(), m_Players[player->GetGUIDLow()].GetTypeReports(SPEED_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(FLY_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(JUMP_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(WALK_WATER_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(TELEPORT_PLANE_HACK_REPORT),m_Players[player->GetGUIDLow()].GetTypeReports(CLIMB_HACK_REPORT),m_Players[player->GetGUIDLow()].GetCreationTime()); m_Players[key].SetDailyReportState(true); } } if (m_Players[key].GetTotalReports() > sWorld->getIntConfig(CONFIG_ANTICHEAT_REPORTS_INGAME_NOTIFICATION)) { // display warning at the center of the screen, hacky way? std::string str = ""; str = "|cFFFFFC00[АНТИЧИТ]|cFF00FFFF[|cFF60FF00" + std::string(player->GetName()) + "|cFF00FFFF] Обнаружен читер!"; WorldPacket data(SMSG_NOTIFICATION, (str.size()+1)); data << str; sWorld->SendGlobalGMMessage(&data); } } void AnticheatMgr::AnticheatGlobalCommand(ChatHandler* handler) { // MySQL will sort all for us, anyway this is not the best way we must only save the anticheat data not whole player's data!. sObjectAccessor->SaveAllPlayers(); QueryResult resultDB = CharacterDatabase.Query("SELECT guid,average,total_reports FROM players_reports_status WHERE total_reports != 0 ORDER BY average ASC LIMIT 3;"); if (!resultDB) { handler->PSendSysMessage("No players found."); return; } else { handler->SendSysMessage("============================="); handler->PSendSysMessage("Players with the lowest averages:"); do { Field *fieldsDB = resultDB->Fetch(); uint32 guid = fieldsDB[0].GetUInt32(); float average = fieldsDB[1].GetFloat(); uint32 total_reports = fieldsDB[2].GetUInt32(); if (Player* player = sObjectMgr->GetPlayerByLowGUID(guid)) handler->PSendSysMessage("Player: %s Average: %f Total Reports: %u",player->GetName(),average,total_reports); } while (resultDB->NextRow()); } resultDB = CharacterDatabase.Query("SELECT guid,average,total_reports FROM players_reports_status WHERE total_reports != 0 ORDER BY total_reports DESC LIMIT 3;"); // this should never happen if (!resultDB) { handler->PSendSysMessage("No players found."); return; } else { handler->SendSysMessage("============================="); handler->PSendSysMessage("Players with the more reports:"); do { Field *fieldsDB = resultDB->Fetch(); uint32 guid = fieldsDB[0].GetUInt32(); float average = fieldsDB[1].GetFloat(); uint32 total_reports = fieldsDB[2].GetUInt32(); if (Player* player = sObjectMgr->GetPlayerByLowGUID(guid)) handler->PSendSysMessage("Player: %s Total Reports: %u Average: %f",player->GetName(),total_reports,average); } while (resultDB->NextRow()); } } void AnticheatMgr::AnticheatDeleteCommand(uint32 guid) { if (!guid) { for (AnticheatPlayersDataMap::iterator it = m_Players.begin(); it != m_Players.end(); ++it) { (*it).second.SetTotalReports(0); (*it).second.SetAverage(0); (*it).second.SetCreationTime(0); for (uint8 i = 0; i < MAX_REPORT_TYPES; i++) { (*it).second.SetTempReports(0,i); (*it).second.SetTempReportsTimer(0,i); (*it).second.SetTypeReports(i,0); } } CharacterDatabase.PExecute("DELETE FROM players_reports_status;"); } else { m_Players[guid].SetTotalReports(0); m_Players[guid].SetAverage(0); m_Players[guid].SetCreationTime(0); for (uint8 i = 0; i < MAX_REPORT_TYPES; i++) { m_Players[guid].SetTempReports(0,i); m_Players[guid].SetTempReportsTimer(0,i); m_Players[guid].SetTypeReports(i,0); } CharacterDatabase.PExecute("DELETE FROM players_reports_status WHERE guid=%u;",guid); } } void AnticheatMgr::ResetDailyReportStates() { for (AnticheatPlayersDataMap::iterator it = m_Players.begin(); it != m_Players.end(); ++it) m_Players[(*it).first].SetDailyReportState(false); } ОШибки Ошибка 15 error C2039: FillSystemMessageData: не является членом "ChatHandler" C:\wow\server\src\server\scripts\Commands\cs_anticheat.cpp 79 1 scripts Ошибка 16 error C2065: LANG_PLAYER_NOT_FOUND: необъявленный идентификатор C:\wow\server\src\server\scripts\Commands\cs_anticheat.cpp 109 1 scripts СТраница /* * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" #include "AnticheatMgr.h" class anticheat_commandscript : public CommandScript { public: anticheat_commandscript() : CommandScript("anticheat_commandscript") { } ChatCommand* GetCommands() const { static ChatCommand anticheatCommandTable[] = { { "global", SEC_GAMEMASTER, true, &HandleAntiCheatGlobalCommand, "", NULL }, { "player", SEC_GAMEMASTER, true, &HandleAntiCheatPlayerCommand, "", NULL }, { "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "", NULL }, { "handle", SEC_ADMINISTRATOR, true, &HandleAntiCheatHandleCommand, "", NULL }, { "jail", SEC_GAMEMASTER, true, &HandleAnticheatJailCommand, "", NULL }, { "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { { "anticheat", SEC_GAMEMASTER, true, NULL, "", anticheatCommandTable}, { NULL, 0, false, NULL, "", NULL } }; return commandTable; } static bool HandleAnticheatWarnCommand(ChatHandler* handler, const char* args) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) return false; Player* pTarget = NULL; std::string strCommand; char* command = strtok((char*)args, " "); if (command) { strCommand = command; normalizePlayerName(strCommand); pTarget = sObjectAccessor->FindPlayerByName(strCommand.c_str()); //get player by name }else pTarget = handler->getSelectedPlayer(); if (!pTarget) return false; WorldPacket data; // need copy to prevent corruption by strtok call in LineFromMessage original string char* buf = strdup("The anticheat system has reported several times that you may be cheating. You will be monitored to confirm if this is accurate."); char* pos = buf; while (char* line = handler->LineFromMessage(pos)) { handler->FillSystemMessageData(&data, line); pTarget->GetSession()->SendPacket(&data); } free(buf); return true; } static bool HandleAnticheatJailCommand(ChatHandler* handler, const char* args) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) return false; Player* pTarget = NULL; std::string strCommand; char* command = strtok((char*)args, " "); if (command) { strCommand = command; normalizePlayerName(strCommand); pTarget = sObjectAccessor->FindPlayerByName(strCommand.c_str()); //get player by name }else pTarget = handler->getSelectedPlayer(); if (!pTarget) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); handler->SetSentErrorMessage(true); return false; } if (pTarget == handler->GetSession()->GetPlayer()) return false; // teleport both to jail. pTarget->TeleportTo(1,16226.5f,16403.6f,-64.5f,3.2f); handler->GetSession()->GetPlayer()->TeleportTo(1,16226.5f,16403.6f,-64.5f,3.2f); WorldLocation loc; // the player should be already there, but no // pTarget->GetPosition(&loc); loc.m_mapId = 1; loc.m_positionX = 16226.5f; loc.m_positionY = 16403.6f; loc.m_positionZ = -64.5f; loc.m_orientation = 3.2f; pTarget->SetHomebind(loc,876); return true; } static bool HandleAntiCheatDeleteCommand(ChatHandler* handler, const char* args) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) return false; std::string strCommand; char* command = strtok((char*)args, " "); //get entered name if (!command) return true; strCommand = command; if (strCommand.compare("deleteall") == 0) sAnticheatMgr->AnticheatDeleteCommand(0); else { normalizePlayerName(strCommand); Player* player = sObjectAccessor->FindPlayerByName(strCommand.c_str()); //get player by name if (!player) handler->PSendSysMessage("Player doesn't exist"); else sAnticheatMgr->AnticheatDeleteCommand(player->GetGUIDLow()); } return true; } static bool HandleAntiCheatPlayerCommand(ChatHandler* handler, const char* args) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) return false; std::string strCommand; char* command = strtok((char*)args, " "); uint32 guid = 0; Player* player = NULL; if (command) { strCommand = command; normalizePlayerName(strCommand); player = sObjectAccessor->FindPlayerByName(strCommand.c_str()); //get player by name if (player) guid = player->GetGUIDLow(); }else { player = handler->getSelectedPlayer(); if (player) guid = player->GetGUIDLow(); } if (!guid) { handler->PSendSysMessage("There is no player."); return true; } float average = sAnticheatMgr->GetAverage(guid); uint32 total_reports = sAnticheatMgr->GetTotalReports(guid); uint32 speed_reports = sAnticheatMgr->GetTypeReports(guid,0); uint32 fly_reports = sAnticheatMgr->GetTypeReports(guid,1); uint32 jump_reports = sAnticheatMgr->GetTypeReports(guid,3); uint32 waterwalk_reports = sAnticheatMgr->GetTypeReports(guid,2); uint32 teleportplane_reports = sAnticheatMgr->GetTypeReports(guid,4); uint32 climb_reports = sAnticheatMgr->GetTypeReports(guid,5); handler->PSendSysMessage("Information about player %s",player->GetName()); handler->PSendSysMessage("Average: %f || Total Reports: %u ",average,total_reports); handler->PSendSysMessage("Speed Reports: %u || Fly Reports: %u || Jump Reports: %u ",speed_reports,fly_reports,jump_reports); handler->PSendSysMessage("Walk On Water Reports: %u || Teleport To Plane Reports: %u",waterwalk_reports,teleportplane_reports); handler->PSendSysMessage("Climb Reports: %u", climb_reports); return true; } static bool HandleAntiCheatHandleCommand(ChatHandler* handler, const char* args) { std::string strCommand; char* command = strtok((char*)args, " "); if (!command) return true; if (!handler->GetSession()->GetPlayer()) return true; strCommand = command; if (strCommand.compare("on") == 0) { sWorld->setBoolConfig(CONFIG_ANTICHEAT_ENABLE,true); handler->SendSysMessage("The Anticheat System is now: Enabled!"); } else if (strCommand.compare("off") == 0) { sWorld->setBoolConfig(CONFIG_ANTICHEAT_ENABLE,false); handler->SendSysMessage("The Anticheat System is now: Disabled!"); } return true; } static bool HandleAntiCheatGlobalCommand(ChatHandler* handler, const char* args) { if (!sWorld->getBoolConfig(CONFIG_ANTICHEAT_ENABLE)) { handler->PSendSysMessage("The Anticheat System is disabled."); return true; } sAnticheatMgr->AnticheatGlobalCommand(handler); return true; } }; void AddSC_anticheat_commandscript() { new anticheat_commandscript(); } Ошибка Ошибка 17 error C2065: CONFIG_MULTIBOXING_KICK_ENABLE: необъявленный идентификатор C:\wow\server\src\server\scripts\Custom\custom_misc.cpp 33 1 scripts Ошибка 18 error C2065: LOGIN_SEL_IP_COUNT: необъявленный идентификатор C:\wow\server\src\server\scripts\Custom\custom_misc.cpp 38 1 scripts Страница /* * Copyright © 2008 - 2011 Trinity <http://www.trinitycore.org/> * * Copyright © 2006 - 2011 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * Copyright © 2011 Arcanum Core Private <https://bitbucket.org/Dimitro/arcanum-core-private/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "ScriptPCH.h" #include "Config.h" class ip_check : public PlayerScript { public: ip_check() : PlayerScript("ip_check") {} void OnLogin(Player* player) { if (sWorld->getBoolConfig(CONFIG_MULTIBOXING_KICK_ENABLE)) { if (player->GetSession()->GetSecurity() > SEC_PLAYER) return; PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_COUNT); stmt->setUInt32(0, player->GetSession()->GetAccountId()); PreparedQueryResult result = LoginDatabase.Query(stmt); if(!result) return; Field* fields = result->Fetch(); uint16 count = fields[0].GetUInt16(); if (!count) return; if (count > 1) player->GetSession()->KickPlayer(); } return; } }; void AddSC_custom_misc() { new ip_check(); } Ошибка Код Ошибка 19 error C2065: sAnticheatMgr: необъявленный идентификатор C:\wow\server\src\server\game\Entities\Player\Player.cpp 19397 1 game Ошибка 20 error C2227: выражение слева от "->SavePlayerData" должно указывать на тип класса, структуры или объединения либо на универсальный тип C:\wow\server\src\server\game\Entities\Player\Player.cpp 19397 1 game Короче все ошибки такого типа( Их в общем 36
Сервер Fast-wow.ru
Заходите будем рады!
Сообщение # 1 написано 17.02.2014 в 22:33
|
Ошибка 17 error C2065: CONFIG_MULTIBOXING_KICK_ENABLE: необъявленный идентификатор C:\wow\server\src\server\scripts\Custom\custom_misc.cpp 33 1 scripts Ну с этим все понятно. Твой патч, вероятнее всего, не затронул (по неизвестным причинам) World.cpp и World.h, вследствие чего и возникает такая ошибка.
Сообщение # 2 написано 18.02.2014 в 14:31
|
Много проблем решит #include World.h к файлам с ошибками, а так же проверка того, что ты внёс в сами файлы world.cpp и world.h. Оно не видит строк конфига. тут только 2 пути: или их нет в файле, или файл не привязан.
2.4.3 Blizzlike Server by Evrial - Лучшая 2.4.3 сборка+исходник.
Рисуем итемы для 2.4.3 ГАЙД Создаём свой сервер WoW (подробно и доходчиво) Поистине ловок тот, кто умеет скрывать свою ловкость
Сообщение # 3 написано 18.02.2014 в 17:33
|
| |||
| |||