Jump to content

[Mangos-One][Exploit][Patch] Arena rating calculates


Guest mns

Recommended Posts

Exploit : player can join to arena with wrong rating calculating .

For example :

player create group with two hero and converting to raid . then logoff one hero and join arena with online hero .

now core not see rating of offline hero and ....

then offline player will be login again and wait for enter arena .

fix :

diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp
index b80410a..d3b3d6a 100644
--- a/src/game/BattleGroundHandler.cpp
+++ b/src/game/BattleGroundHandler.cpp
@@ -672,16 +672,22 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
        // the arena team id must match for everyone in the group
        // get the personal ratings for queue
        uint32 avg_pers_rating = 0;
+        uint8 members_count = 0;
        for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
        {
            Player *member = itr->getSource();

            // calc avg personal rating
            avg_pers_rating += member->GetArenaPersonalRating(arenaslot);
+            members_count++;
        }

        if (arenatype)
+        {
+            if (arenatype != members_count)
+                return;
            avg_pers_rating /= arenatype;
+        }

        // if avg personal rating is more than 150 points below the teams rating, the team will be queued against an opponent matching or similar to the average personal rating
        if (avg_pers_rating + 150 < arenaRating)

Maybe same problem in master branch but i not test this .

Link to comment
Share on other sites

  • 3 weeks later...

Problem, can be solved lot easy in fact. All data already loaded and stored in ArenaTeam structure

Implemented in [11349].

Hmm, my change look like wrong. I will fix in next commit. With current version for arena team different from exactly arena type size it will wrongly calculated..., mostly need revert and implement mixed way, loop by group guids but look data in team. Aslo let check: in group must be only team members.

If patch will prepared i can commot it. I need finish arenaTeam enum use patch.

Link to comment
Share on other sites

×
×
  • 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