Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Player::ElaborateCheatReport(Player* pPlayer, uint8 uiCheatType)
- {
- if (!pPlayer)
- return;
- // cheatType 1 == SpeedHack
- // cheatType 2 == FlyHack
- // cheatType 3 == WalkOnWaterHack
- std::string strReportType;
- switch(uiCheatType)
- {
- case 1:
- strReportType = "Speed-Hack";
- break;
- case 2:
- strReportType = "Fly-Hack";
- break;
- case 3:
- strReportType = "WalkOnWater-Hack";
- default:
- strReportType = "";
- break;
- }
- if (!HasFirstReport())
- {
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEAT_FIRST_REPORT);
- stmt->setUInt64(0,GetGUIDLow());
- stmt->setString(1,GetName());
- stmt->setUInt64(2, uint64(time(NULL)));
- CharacterDatabase.Execute(stmt);
- }
- for (uint8 uiI = 0; uiI < 2; uiI++)
- {
- PreparedStatement* stmt;
- if (uiI == 0)
- stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEATERS);
- else
- stmt = CharacterDatabase.GetPreparedStatement(CHAR_ANTICHEAT_SET_CHEATERS_TEMP);
- stmt->setUInt64(0,GetGUIDLow());
- stmt->setString(1,GetName());
- stmt->setUInt32(2,GetMapId());
- stmt->setFloat(3,GetPositionX());
- stmt->setFloat(4,GetPositionY());
- stmt->setFloat(5,GetPositionZ());
- stmt->setString(6,strReportType);
- stmt->setUInt64(7, uint64(time(NULL)));
- CharacterDatabase.Execute(stmt);
- +
- + //display in the center of Gm's screen hack warrning
- + std::string str;
- + str = "|cFFFFFC00[AC]|cFF00FFFF[|cFF60FF00" + std::string(pPlayer->GetName()) + "|cFF00FFFF] probably is using hacks!";
- + WorldPacket data(SMSG_NOTIFICATION, (str.size()+1));
- + data << str;
- + sWorld.SendGlobalGMMessage(&data);
- +
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement