Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.97 KB | None | 0 0
  1. void Player::ElaborateCheatReport(Player* pPlayer, uint8 uiCheatType)
  2. {
  3.         if (!pPlayer)
  4.         return;
  5.  
  6.         // cheatType 1 == SpeedHack
  7.         // cheatType 2 == FlyHack
  8.         // cheatType 3 == WalkOnWaterHack
  9.  
  10.         std::string strReportType;
  11.  
  12.         switch(uiCheatType)
  13.         {
  14.         case 1:
  15.         strReportType = "Speed-Hack";
  16.         break;
  17.         case 2:
  18.         strReportType = "Fly-Hack";
  19.         break;
  20.         case 3:
  21.         strReportType = "WalkOnWater-Hack";
  22.         default:
  23.         strReportType = "";
  24.         break;
  25.         }
  26.  
  27.         if (!HasFirstReport())
  28.         {
  29.         PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEAT_FIRST_REPORT);
  30.         stmt->setUInt64(0,GetGUIDLow());
  31.         stmt->setString(1,GetName());
  32.         stmt->setUInt64(2, uint64(time(NULL)));
  33.         CharacterDatabase.Execute(stmt);
  34.         }
  35.        
  36.         for (uint8 uiI = 0; uiI < 2; uiI++)
  37.         {
  38.         PreparedStatement* stmt;
  39.  
  40.         if (uiI == 0)
  41.                 stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEATERS);
  42.         else
  43.                 stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEATERS_TEMP);
  44.  
  45.         stmt->setUInt64(0,GetGUIDLow());
  46.         stmt->setString(1,GetName());
  47.         stmt->setUInt32(2,GetMapId());
  48.         stmt->setFloat(3,GetPositionX());
  49.         stmt->setFloat(4,GetPositionY());
  50.         stmt->setFloat(5,GetPositionZ());
  51.         stmt->setString(6,strReportType);
  52.         stmt->setUInt64(7, uint64(time(NULL)));
  53.         CharacterDatabase.Execute(stmt);
  54. +
  55. +       //display in the center of Gm's screen hack warrning
  56. +       std::string str;
  57. +       str = "|cFFFFFC00[AC]|cFF00FFFF[|cFF60FF00" + std::string(pPlayer->GetName()) + "|cFF00FFFF] probably is using hacks!";
  58. +       WorldPacket data(SMSG_NOTIFICATION, (str.size()+1));
  59. +       data << str;
  60. +       sWorld.SendGlobalGMMessage(&data);
  61. +
  62.         }
  63.  
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement