[CORE] Arena points rate , thanks to Mik1983 for import

This commit is contained in:
Yehonal
2016-08-08 11:15:20 +02:00
parent 1fcfb9af5a
commit 895558c85c
4 changed files with 17 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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,

View File

@@ -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.