mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 21:47:24 +00:00
31 lines
658 B
C++
31 lines
658 B
C++
|
#include "ModifierRarity.h"
|
||
|
#include <unordered_map>
|
||
|
|
||
|
using namespace nejlika;
|
||
|
|
||
|
namespace
|
||
|
{
|
||
|
|
||
|
const std::unordered_map<ModifierRarity, std::string> colorMap = {
|
||
|
{ModifierRarity::Common, "#FFFFFF"},
|
||
|
{ModifierRarity::Uncommon, "#B5AC15"},
|
||
|
{ModifierRarity::Rare, "#3EEA4A"},
|
||
|
{ModifierRarity::Epic, "#2F83C1"},
|
||
|
{ModifierRarity::Legendary, "#852DCA"},
|
||
|
{ModifierRarity::Relic, "#00FFFF"}
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
const std::string& nejlika::ModifierRarityHelper::GetModifierRarityColor(ModifierRarity rarity)
|
||
|
{
|
||
|
const auto color = colorMap.find(rarity);
|
||
|
|
||
|
if (color != colorMap.end()) {
|
||
|
return color->second;
|
||
|
}
|
||
|
|
||
|
static const std::string white = "#FFFFFF";
|
||
|
|
||
|
return white;
|
||
|
}
|