Jump to content

Anticheat for MaNGOS 8330


Recommended Posts

Unfortunately there's a conflict between CWN's anticheat and playerbot, both of them want to write to the mangos.config.dist.in at the same location in the file. I tried making 2 copies of the config then switching them out between patches in the hope of manually pasting the anticheat settings into he config by hand, but it gave me a patch error saying the config is out of date.

Anyone know what I can do?

http://getmangos.eu/community/showthread.php?p=50346#post50346

more specifically, open your git bash and type:"git mergetool" (with no quotes). It should bring up a GUI that allows you to directly implement what you want into your .conf.in file. I LOVE the tortoise mergetool personally.

Link to comment
Share on other sites

http://getmangos.eu/community/showthread.php?p=50346#post50346

more specifically, open your git bash and type:"git mergetool" (with no quotes). It should bring up a GUI that allows you to directly implement what you want into your .conf.in file. I LOVE the tortoise mergetool personally.

Bah I give up, merging patches is well beyond my user abilities :(

Link to comment
Share on other sites

  • 39 years later...

Hello,

I need an anticheat for MaNGOS 8330. I have tried CWN's latest commit but it gives me errors when trying to compile into the latest MaNGOS core.

>..\\..\\src\\game\\World.cpp(80) : error C2059: syntax error : '<<'
3>..\\..\\src\\game\\World.cpp(80) : error C2143: syntax error : missing ';' before '/'
3>..\\..\\src\\game\\World.cpp(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\\..\\src\\game\\World.cpp(96) : error C2059: syntax error : '>>'
3>..\\..\\src\\game\\World.cpp(96) : error C2143: syntax error : missing ';' before '/'
3>..\\..\\src\\game\\World.cpp(96) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\\..\\src\\game\\World.cpp(96) : error C2086: 'int src' : redefinition
3>        ..\\..\\src\\game\\World.cpp(80) : see declaration of 'src'
3>..\\..\\src\\game\\World.cpp(99) : error C2143: syntax error : missing ';' before '{'
3>..\\..\\src\\game\\World.cpp(99) : error C2447: '{' : missing function header (old-style formal list?)

Could someone provide me another anticheat working? Thanks.

Best regards,

Alex

Link to comment
Share on other sites

I manually fix the patch and already apply it.

I got a custom telenpc, the antihack is gonna have problems with it??

Havent tested myself ^^

Thanks

P.D: Ok, tested and working just perfect :D, btw megosh, where can we find that antihack you talking about? just to keep it updated =)

Can you upload your patch for the rest of the community?

Link to comment
Share on other sites

I apologize for my absence, it's been a busy week.

Like I said earlier, its taken from Insider's patches. He has a GIT fork that he is constantly updating. It however includes EVERY patch he can find that works. Go through the commits to find where he added the anticheat and where he applied updates to it.

http://github.com/insider/mangos/commits/

OR

Here is the link to the original patch that I'm specifically using with rev 8400~. So far I've found no serious bugs.

http://pastebin.ca/1538643

Link to comment
Share on other sites

Unfortunately there's a conflict between CWN's anticheat and playerbot, both of them want to write to the mangos.config.dist.in at the same location in the file. I tried making 2 copies of the config then switching them out between patches in the hope of manually pasting the anticheat settings into he config by hand, but it gave me a patch error saying the config is out of date.

Anyone know what I can do?

Link to comment
Share on other sites

Am applying manually now to a new rev but stuck with this

@@ -489,34 +827,33 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
    GetPlayer()->SendMessageToSet(&data, false);
}

-void WorldSession::HandleMoveKnockBackAck( WorldPacket & /*recv_data*/ )
+void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
{
    // CHECK_PACKET_SIZE(recv_data,?);
    sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
    // Currently not used but maybe use later for recheck final player position
    // (must be at call same as into "recv_data >> x >> y >> z >> orientation;"

-    /*
-    uint32 flags, time;
-    float x, y, z, orientation;
-    uint64 guid;
-    uint32 sequence;
-    uint32 ukn1;
-    float xdirection,ydirection,hspeed,vspeed;
+    /* extract packet */
+    MovementInfo movementInfo;
+    uint32 unk1,unk2,unk3;
+    recv_data >> unk1 >> unk2 >> unk3;
+    ReadMovementInfo(recv_data, &movementInfo);

-    recv_data >> guid;
-    recv_data >> sequence;
-    recv_data >> flags >> time;
-    recv_data >> x >> y >> z >> orientation;
-    recv_data >> ukn1; //unknown
-    recv_data >> vspeed >> xdirection >> ydirection >> hspeed;
+    //Save movement flags
+    _player->m_movementInfo.SetMovementFlags(MovementFlags(movementInfo.flags));

-    // skip not personal message;
-    if(GetPlayer()->GetGUID()!=guid)
-        return;
+    #ifdef MOVEMENT_ANTICHEAT_DEBUG
+    sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK: tm:%d ftm:%d | %f,%f,%fo(%f) [%X]",GetPlayer()->GetName(),movementInfo.time,movementInfo.fallTime,movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,movementInfo.flags);
+    sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK additional: vspeed:%f, hspeed:%f",GetPlayer()->GetName(), movementInfo.j_unk, movementInfo.j_xyspeed);
+    #endif
+
+    _player->m_movementInfo = movementInfo;
+    _player->m_anti_Last_HSpeed = movementInfo.j_xyspeed;
+    _player->m_anti_Last_VSpeed = movementInfo.j_unk < 3.2f ? movementInfo.j_unk - 1.0f : 3.2f;

-    // check code
-    */
+    uint32 dt = (_player->m_anti_Last_VSpeed < 0) ? (int)(ceil(_player->m_anti_Last_VSpeed/-25)*1000) : (int)(ceil(_player->m_anti_Last_VSpeed/25)*1000);
+    _player->m_anti_LastSpeedChangeTime = movementInfo.time + dt + 1000;
}

as the code for that function has changed to

   sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");

   recv_data.read_skip<uint64>();                          // guid
   recv_data.read_skip<uint32>();                          // unk

   MovementInfo movementInfo;
   ReadMovementInfo(recv_data, &movementInfo);

So what would be the patch code for that part in the new mangos revs ?

Link to comment
Share on other sites

I've checked insiders mangos and the knockback function is as follows:

void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
{
   sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");

   MovementInfo movementInfo;
   uint32 unk1,unk2,unk3;
   recv_data >> unk1 >> unk2 >> unk3;
   ReadMovementInfo(recv_data, &movementInfo);

   //Save movement flags
   _player->m_movementInfo.SetMovementFlags(MovementFlags(movementInfo.flags));

#ifdef MOVEMENT_ANTICHEAT_DEBUG
   sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK: tm:%d ftm:%d | %f,%f,%fo(%f) [%X]",GetPlayer()->GetName(),movementInfo.time,movementInfo.fallTime,movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,movementInfo.flags);
   sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK additional: vspeed:%f, hspeed:%f",GetPlayer()->GetName(), movementInfo.j_unk, movementInfo.j_xyspeed);
#endif

   _player->m_movementInfo = movementInfo;
   _player->m_anti_Last_HSpeed = movementInfo.j_xyspeed;
   _player->m_anti_Last_VSpeed = movementInfo.j_unk < 3.2f ? movementInfo.j_unk - 1.0f : 3.2f;

   uint32 dt = (_player->m_anti_Last_VSpeed < 0) ? (int)(ceil(_player->m_anti_Last_VSpeed/-25)*1000) : (int)(ceil(_player->m_anti_Last_VSpeed/25)*1000);
   _player->m_anti_LastSpeedChangeTime = movementInfo.time + dt + 1000;
}

Link to comment
Share on other sites

Will upload a new patch soon but it was made with my custom branch so dunno if it'll work for you guys.

Here it is: http://pastie.org/598694

Thanks but when i git apply then I have this result:

Anticheat_313_OK.diff:52: trailing whitespace.
Anticheat_313_OK.diff:522: trailing whitespace.
Anticheat_313_OK.diff:527: trailing whitespace.
Anticheat_313_OK.diff:530: trailing whitespace.
Anticheat_313_OK.diff:535: trailing whitespace.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

Why and when fix it ?

Sorry for my english but i am french :)

Link to comment
Share on other sites

All boats/zeppelins in the game are bugged for me, I have a feeling it might be due to CWN's anticheat since when the transport changes maps you get teleported to where the transport departed from at the station.

Anyone else having issues with transports?

Link to comment
Share on other sites

Thanks but when i git apply then I have this result:

Anticheat_313_OK.diff:52: trailing whitespace.
Anticheat_313_OK.diff:522: trailing whitespace.
Anticheat_313_OK.diff:527: trailing whitespace.
Anticheat_313_OK.diff:530: trailing whitespace.
Anticheat_313_OK.diff:535: trailing whitespace.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

Why and when fix it ?

Sorry for my english but i am french :)

Dont need fixing it applied but just some whitespace not matching. Doesn't affect anything afaik.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use