Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
CurrencyFormulas.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRE_CURRENCY_FORMULAS_H
7#define SKYFIRE_CURRENCY_FORMULAS_H
8
9#include "Define.h"
10
11#include <cmath>
12
13namespace Skyfire
14{
15 namespace Currency
16 {
18 {
19 if (rate <= 1500)
20 return 1350; // Default conquest points
21 else if (rate > 3000)
22 rate = 3000;
23
24 // http://www.arenajunkies.com/topic/179536-conquest-point-cap-vs-personal-rating-chart/page__st__60#entry3085246
25 return uint32(1.4326 * ((1511.26 / (1 + 1639.28 / std::exp(0.00412 * rate))) + 850.15));
26 }
27
29 {
30 // WowWiki: Battleground ratings receive a bonus of 22.2% to the cap they generate
31 return uint32((ConquestRatingCalculator(rate) * 1.222f) + 0.5f);
32 }
33 } // namespace Skyfire::Currency
34} // namespace Skyfire
35
36#endif
std::uint32_t uint32
Definition Define.h:77
uint32 BgConquestRatingCalculator(uint32 rate)
uint32 ConquestRatingCalculator(uint32 rate)