mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-21 11:14:34 +00:00
Core/Arena: Create more arena configs (#97)
This commit is contained in:
@@ -655,7 +655,7 @@ int32 ArenaTeam::GetMatchmakerRatingMod(uint32 ownRating, uint32 opponentRating,
|
||||
*/
|
||||
|
||||
// Real rating modification
|
||||
mod *= 24.0f;
|
||||
mod *= sWorld->getFloatConfig(CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER);
|
||||
|
||||
return (int32)ceil(mod);
|
||||
}
|
||||
@@ -665,21 +665,27 @@ int32 ArenaTeam::GetRatingMod(uint32 ownRating, uint32 opponentRating, bool won
|
||||
// 'Chance' calculation - to beat the opponent
|
||||
// This is a simulation. Not much info on how it really works
|
||||
float chance = GetChanceAgainst(ownRating, opponentRating);
|
||||
float won_mod = (won) ? 1.0f : 0.0f;
|
||||
|
||||
// Calculate the rating modification
|
||||
float mod;
|
||||
|
||||
// TODO: Replace this hack with using the confidence factor (limiting the factor to 2.0f)
|
||||
if (won && ownRating < 1300)
|
||||
if (won)
|
||||
{
|
||||
if (ownRating < 1000)
|
||||
mod = 48.0f * (won_mod - chance);
|
||||
if (ownRating < 1300)
|
||||
{
|
||||
float win_rating_modifier1 = sWorld->getFloatConfig(CONFIG_ARENA_WIN_RATING_MODIFIER_1);
|
||||
|
||||
if (ownRating < 1000)
|
||||
mod = win_rating_modifier1 * (1.0f - chance);
|
||||
else
|
||||
mod = ((win_rating_modifier1 / 2.0f) + ((win_rating_modifier1 / 2.0f) * (1300.0f - float(ownRating)) / 300.0f)) * (1.0f - chance);
|
||||
}
|
||||
else
|
||||
mod = (24.0f + (24.0f * (1300.0f - float(ownRating)) / 300.0f)) * (won_mod - chance);
|
||||
mod = sWorld->getFloatConfig(CONFIG_ARENA_WIN_RATING_MODIFIER_2) * (1.0f - chance);
|
||||
}
|
||||
else
|
||||
mod = 24.0f * (won_mod - chance);
|
||||
mod = sWorld->getFloatConfig(CONFIG_ARENA_LOSE_RATING_MODIFIER) * (-chance);
|
||||
|
||||
return (int32)ceil(mod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user