arena leavers problem

Some players have reg arenas at night and enter and exit on it. So cheat rate.

I saw a patch for monitoring through the PHP, but maybe someone has seen a patch for the core?

With an automatic ban.

Maybe even a need to create a table with information about the game and held her right to monitor violations.


as you see in the title i want to disable the arena leave for like a 30 second after the start

i look in to the battleground.cpp and i found this


	    if (GetStatus() == STATUS_WAIT_JOIN)				 // not started yet

		    player->CastSpell(player, SPELL_PREPARATION, true);   // reduces all mana cost of spells.


its wheres the arena has started . the preparing time .

is it possible to disable or remove that icon near the map ?

disable it for like a minute and then enable it .

so player cant just join and leave the arena and get the free arena ratings .

its hard to stay 2 min for every arena .

thanks .

Not sure if it’s possible to prevent someone from leaving. Your best bet is to simply not reward any points for the match if the players leaves before the time that you want. You should be able to do something like that in EndBattleground(uint32 winner) method.

Check switch (GetStatus()) in Update() function. There is






And make it break _ProcessLeave(diff); if its arena. Check TC refference for functions that can help you stop using this function… maybe you just need to add return;

i didnt have time to check , i just wrote the lines

so :



		 // after 47 minutes without one team losing, the arena closes with no winner and no rating change

		 if (isArena())


			 if (GetStartTime() >= 47*MINUTE*IN_MILLISECONDS)







if (isArena() && isRated() && GetStartTime() <= 3*MINUTE*IN_MILLISECONDS && (GetPlayersCountByTeam(ALLIANCE) < GetMaxPlayersPerTeam() || GetPlayersCountByTeam(HORDE) < GetMaxPlayersPerTeam()))






1- if its arena

2- if its rated

3- if start time < 3 minute {AND}

4- alliance team is < maximum player for that arena ({OR})

5- horde team is < maximum player for that arena ({OR} back in step 4})

then close the arena without changing the states .

i think its ok .

what do you think ? is it right ?

WRONG in step 4 and 5

it should be the maximum player

EDITED : GetMaxPlayersPerTeam


its working in some ways

4 player in the arena

2 horde

2 alliance

when one of the alliance is leave the arena

nothing happen . BUT when the start time finished and the doors get open its close the arena and no one win that .

BUT , when in the preparation , just before the doors get open both of the alliance team leave the arena , the horde team wins the arena and get the rating .

so i should check somewhere that control the arena leaving .

we have 3 different places that i should check :

1- Battleground::RemovePlayerAtLeave


3- Battleground::_ProcessLeave

what do you think ?

working all night long .

cant find it !

anyone have any idea !!!

That is called wintrading.

Or they are simply tanking down MMR.

Sorry if this is the wrong place to post, but I’ve been trying to figure out a way to prevent basic wintrading, by basic, i mean: Team A and Team B join arena, team A leaves before the match starts, Team B “wins” the arena, and gets all the stat changes they would if they had done it legitimately.

What I’m trying to do is one of the following:


Make is so that if a match lasts less than a certain amount of time, neither team gets any stat changes.


If the total damage done for one team is 0, the team with 0 damage done will count towards a loss, and the other team will not have any stat changes.


prevent players from leaving an arena period.

I tried A first, because i assumed it would be the easiest and best. It probably still is, I just can’t figure out exactly how to do it.

It would need to have a modification in Battleground::EndBattleground(uint32 winner) If I’m not mistaken…

somewhere in this code (I presume at “if (winnerArenaTeam && loserArenaTeam && winnerArenaTeam != loserArenaTeam)” )

//we must set it this way, because end time is sent in packet!

// arena rating calculation
if (isArena() && isRated())
    winnerArenaTeam = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(winner));
    loserArenaTeam = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(winner)));

    if (winnerArenaTeam && loserArenaTeam && winnerArenaTeam != loserArenaTeam)
        if (winner != WINNER_NONE)
            loserTeamRating = loserArenaTeam->GetRating();
            loserMatchmakerRating = GetArenaMatchmakerRating(GetOtherTeam(winner));
            winnerTeamRating = winnerArenaTeam->GetRating();
            winnerMatchmakerRating = GetArenaMatchmakerRating(winner);
            winnerMatchmakerChange = winnerArenaTeam->WonAgainst(winnerMatchmakerRating, loserMatchmakerRating, winnerChange);
            loserMatchmakerChange = loserArenaTeam->LostAgainst(loserMatchmakerRating, winnerMatchmakerRating, loserChange);
            sLog->outDebug(LOG_FILTER_ARENAS, "match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winnerTeamRating, winnerChange, winnerMatchmakerRating,
                winnerMatchmakerChange, loserTeamRating, loserChange, loserMatchmakerRating, loserMatchmakerChange);
            SetArenaMatchmakerRating(winner, winnerMatchmakerRating + winnerMatchmakerChange);
            SetArenaMatchmakerRating(GetOtherTeam(winner), loserMatchmakerRating + loserMatchmakerChange);
            SetArenaTeamRatingChangeForTeam(winner, winnerChange);
            SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loserChange);

            sLog->outDebug(LOG_FILTER_ARENAS, "Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[TEAM_ALLIANCE], m_ArenaTeamIds[TEAM_HORDE], winnerArenaTeam->GetId(), winnerChange, loserChange);
            if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
                for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); ++itr)
                    if (Player* player = ObjectAccessor::FindPlayer(itr->first))
                        sLog->outDebug(LOG_FILTER_ARENAS, "Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows",
                            m_ArenaType, player->GetName().c_str(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3),
                            player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone,
        // Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes
            SetArenaTeamRatingChangeForTeam(ALLIANCE, ARENA_TIMELIMIT_POINTS_LOSS);
            SetArenaTeamRatingChangeForTeam(HORDE, ARENA_TIMELIMIT_POINTS_LOSS);
        SetArenaTeamRatingChangeForTeam(ALLIANCE, 0);
        SetArenaTeamRatingChangeForTeam(HORDE, 0);

however, the problem is: the way to calculate it would need to be something like…

if (m_StartTime + 10 < thetimethatsomeonewon)

BUT… there is no function (that I know of) that calculates the time a team won.

the only thing close is m_EndTime, which calculates the time until the arena kicks all the players out, and is only calculated after someone has won the arena.

I sugest D:

The team with 0 damage losses 10 times or more points.

so… no one has any recommendations as to how to do any of these ideas…? except C >.<

try to arrange your script to arena end (m_EndTime), for e.g.

Arena Starts

Team A and Team B ready to begin match

Team A living arena

We can see window with stats and m_EndTime ready to kick players

If Team B has 0 damage done or received, we are setting their rate to 0 or whatever