daily pastebin goal
17%
SHARE
TWEET

Anticheat OC new rev

a guest Jul 15th, 2015 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @@ -44,7 +44,7 @@
  2.  void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo movementInfo)
  3.  {
  4.      uint32 key = player->GetGUIDLow();
  5. -    if (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEFLAG_WATERWALKING))
  6. +    if (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_WATERWALKING))
  7.          return;
  8.  
  9.      // if we are a ghost we can walk on water
  10. @@ -64,7 +64,7 @@
  11.  void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
  12.  {
  13.      uint32 key = player->GetGUIDLow();
  14. -    if ((!movementInfo.HasMovementFlag(MOVEFLAG_FLYING) && !movementInfo.HasMovementFlag(MOVEFLAG_FLYING2)) || (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEFLAG_FLYING) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEFLAG_FLYING2)))
  15. +    if ((!movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING) && !movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING2)) || (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FLYING) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FLYING2)))
  16.          return;
  17.         if (player->GetStartTimeIgnoreAC() != 0 && getMSTimeDiff(player->GetStartTimeIgnoreAC(), getMSTime()) < 2000)
  18.                 return;
  19. @@ -86,7 +86,7 @@
  20.          movementInfo.pos.GetPositionZ() != 0)
  21.          return;
  22.  
  23. -    if (movementInfo.HasMovementFlag(MOVEFLAG_FALLING))
  24. +    if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING))
  25.          return;
  26.  
  27.      if (player->getDeathState() == DEAD_FALLING)
  28. @@ -176,7 +176,7 @@
  29.      // in this case we don't care if they are "legal" flags, they are handled in another parts of the Anticheat Manager.
  30.      if (player->IsInWater() ||
  31.          player->IsFlying() ||
  32. -        movementInfo.HasMovementFlag(MOVEFLAG_FALLING))
  33. +        movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING))
  34.          return;
  35.  
  36.      Position playerPos;
  37. @@ -212,14 +212,14 @@
  38.      uint8 moveType = 0;
  39.      bool isBackward = false;
  40.  
  41. -    if (player->HasUnitMovementFlag(MOVEFLAG_SWIMMING))
  42. -        moveType = movementInfo.HasMovementFlag(MOVEFLAG_BACKWARD) ? MOVE_SWIM_BACK : MOVE_SWIM;
  43. +    if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING))
  44. +        moveType = movementInfo.HasMovementFlag(MOVEMENTFLAG_BACKWARD) ? MOVE_SWIM_BACK : MOVE_SWIM;
  45.      else if (player->IsFlying())
  46. -        moveType = movementInfo.HasMovementFlag(MOVEFLAG_BACKWARD) ? MOVE_FLIGHT_BACK : MOVE_FLIGHT;
  47. -    else if (player->HasUnitMovementFlag(MOVEFLAG_WALK_MODE))
  48. +        moveType = movementInfo.HasMovementFlag(MOVEMENTFLAG_BACKWARD) ? MOVE_FLIGHT_BACK : MOVE_FLIGHT;
  49. +    else if (player->HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
  50.          moveType = MOVE_WALK;
  51.      else
  52. -        moveType = movementInfo.HasMovementFlag(MOVEFLAG_BACKWARD) ? MOVE_RUN_BACK : MOVE_RUN;
  53. +        moveType = movementInfo.HasMovementFlag(MOVEMENTFLAG_BACKWARD) ? MOVE_RUN_BACK : MOVE_RUN;
  54.  
  55.      uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
  56.         uint32 distance2D_commited = (uint32)movementInfo.pos.GetExactDist2d(m_Players[key].GetCommitedXPos(), m_Players[key].GetCommitedYPos());
  57. @@ -236,11 +236,11 @@
  58.         /* OldAC: Checks */
  59.        
  60.      // 369 == DEEPRUN TRAM
  61. -    if (m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEFLAG_ONTRANSPORT) && player->GetMapId() == 369)
  62. +    if (m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && player->GetMapId() == 369)
  63.          goto SetLastMovementInfo;
  64.                
  65.      // Check for backward move
  66. -    if (movementInfo.HasMovementFlag(MOVEFLAG_BACKWARD))
  67. +    if (movementInfo.HasMovementFlag(MOVEMENTFLAG_BACKWARD))
  68.          isBackward = true;
  69.  
  70.         //Check for Ignore AC Time
RAW Paste Data
Top