mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
[CORE] Arena points rate , thanks to Mik1983 for import
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "Player.h"
|
||||
#include "WorldSession.h"
|
||||
#include "Opcodes.h"
|
||||
#include <Config.h>
|
||||
|
||||
ArenaTeam::ArenaTeam()
|
||||
: TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0),
|
||||
@@ -590,6 +591,8 @@ uint32 ArenaTeam::GetPoints(uint32 memberRating)
|
||||
points *= 0.76f;
|
||||
else if (Type == ARENA_TEAM_3v3)
|
||||
points *= 0.88f;
|
||||
|
||||
points *= sWorld->getRate(RATE_ARENA_POINTS);
|
||||
|
||||
return (uint32) points;
|
||||
}
|
||||
|
||||
@@ -601,6 +601,12 @@ void World::LoadConfigSettings(bool reload)
|
||||
sLog->outError("DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]);
|
||||
rate_values[RATE_DURABILITY_LOSS_BLOCK] = 0.0f;
|
||||
}
|
||||
rate_values[RATE_ARENA_POINTS] = sConfigMgr->GetFloatDefault("Arena.Points.Rate", 1.0f);
|
||||
if (rate_values[RATE_ARENA_POINTS] < 1.0f)
|
||||
{
|
||||
sLog->outError("Rate.ArenaPoints (%f) must be >=1. Using 1.0 instead.", rate_values[RATE_ARENA_POINTS]);
|
||||
rate_values[RATE_ARENA_POINTS] = 1.0f;
|
||||
}
|
||||
///- Read other configuration items from the config file
|
||||
|
||||
m_bool_configs[CONFIG_DURABILITY_LOSS_IN_PVP] = sConfigMgr->GetBoolDefault("DurabilityLoss.InPvP", false);
|
||||
|
||||
@@ -375,6 +375,7 @@ enum Rates
|
||||
RATE_AUCTION_DEPOSIT,
|
||||
RATE_AUCTION_CUT,
|
||||
RATE_HONOR,
|
||||
RATE_ARENA_POINTS,
|
||||
RATE_TALENT,
|
||||
RATE_CORPSE_DECAY_LOOTED,
|
||||
RATE_INSTANCE_RESET_TIME,
|
||||
|
||||
@@ -2224,6 +2224,13 @@ Rate.Auction.Cut = 1
|
||||
|
||||
Rate.Honor = 1
|
||||
|
||||
#
|
||||
# Rate.ArenaPoints
|
||||
# Description: Arena points gain rate.
|
||||
# Default: 1
|
||||
|
||||
Rate.ArenaPoints = 1
|
||||
|
||||
#
|
||||
# Rate.Mining.Amount
|
||||
# Description: Rate for minimum/maximum times a deposit can be used.
|
||||
|
||||
Reference in New Issue
Block a user