mirror of
https://github.com/Tereneckla/mod-profession-experience.git
synced 2026-01-13 00:58:38 +00:00
shorten settings
This commit is contained in:
@@ -47,65 +47,28 @@ ProfessionExperience.MultMaster = 5.0
|
||||
ProfessionExperience.MultGrandMaster = 6.0
|
||||
|
||||
|
||||
#
|
||||
# ProfessionExperience.*.Enabled
|
||||
# Description: Enable experience gain when crafting or gathering with this profession
|
||||
# Default: 0 - (Disabled, ProfessionExperience.Alchemy.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Blacksmith.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Cooking.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Disenchanting.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Enchanting.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Engineering.Enabled)
|
||||
# 1 - (Enabled, ProfessionExperience.Fishing.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.FirstAid.Enabled)
|
||||
# 1 - (Enabled, ProfessionExperience.Herbalism.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Inscription.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Jewelcrafting.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Leatherworking.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Lockpick.Enabled)
|
||||
# 1 - (Enabled, ProfessionExperience.Mining.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Skinning.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Smelting.Enabled)
|
||||
# 0 - (Disabled, ProfessionExperience.Tailoring.Enabled)
|
||||
|
||||
ProfessionExperience.Alchemy.Enabled = 0
|
||||
ProfessionExperience.Blacksmith.Enabled = 0
|
||||
ProfessionExperience.Cooking.Enabled = 0
|
||||
ProfessionExperience.Disenchanting.Enabled = 0
|
||||
ProfessionExperience.Enchanting.Enabled = 0
|
||||
ProfessionExperience.Engineering.Enabled = 0
|
||||
ProfessionExperience.Fishing.Enabled = 1
|
||||
ProfessionExperience.FirstAid.Enabled = 0
|
||||
ProfessionExperience.Herbalism.Enabled = 1
|
||||
ProfessionExperience.Inscription.Enabled = 0
|
||||
ProfessionExperience.Jewelcrafting.Enabled = 0
|
||||
ProfessionExperience.Leatherworking.Enabled = 0
|
||||
ProfessionExperience.Lockpick.Enabled = 0
|
||||
ProfessionExperience.Mining.Enabled = 1
|
||||
ProfessionExperience.Skinning.Enabled = 0
|
||||
ProfessionExperience.Smelting.Enabled = 0
|
||||
ProfessionExperience.Tailoring.Enabled = 0
|
||||
|
||||
|
||||
#
|
||||
# ProfessionExperience.*.Experience
|
||||
# Description: Part of a level gained for performing the action
|
||||
# Default: 0.01 - (1%, All of them)
|
||||
# Default: 0.01 - (1%, ProfessionExperience.Fishing.Experience)
|
||||
# 0.01 - (1%, ProfessionExperience.Herbalism.Experience)
|
||||
# 0.01 - (1%, ProfessionExperience.Mining.Experience)
|
||||
# 0.00 - (Disabled, the rest)
|
||||
|
||||
ProfessionExperience.Alchemy.Experience = 0.01
|
||||
ProfessionExperience.Blacksmith.Experience = 0.01
|
||||
ProfessionExperience.Cooking.Experience = 0.01
|
||||
ProfessionExperience.Disenchanting.Experience = 0.01
|
||||
ProfessionExperience.Enchanting.Experience = 0.01
|
||||
ProfessionExperience.Engineering.Experience = 0.01
|
||||
ProfessionExperience.Alchemy.Experience = 0.00
|
||||
ProfessionExperience.Blacksmith.Experience = 0.00
|
||||
ProfessionExperience.Cooking.Experience = 0.00
|
||||
ProfessionExperience.Disenchanting.Experience = 0.00
|
||||
ProfessionExperience.Enchanting.Experience = 0.00
|
||||
ProfessionExperience.Engineering.Experience = 0.00
|
||||
ProfessionExperience.Fishing.Experience = 0.01
|
||||
ProfessionExperience.FirstAid.Experience = 0.01
|
||||
ProfessionExperience.FirstAid.Experience = 0.00
|
||||
ProfessionExperience.Herbalism.Experience = 0.01
|
||||
ProfessionExperience.Inscription.Experience = 0.01
|
||||
ProfessionExperience.Jewelcrafting.Experience = 0.01
|
||||
ProfessionExperience.Leatherworking.Experience = 0.01
|
||||
ProfessionExperience.Lockpick.Experience = 0.01
|
||||
ProfessionExperience.Inscription.Experience = 0.00
|
||||
ProfessionExperience.Jewelcrafting.Experience = 0.00
|
||||
ProfessionExperience.Leatherworking.Experience = 0.00
|
||||
ProfessionExperience.Lockpick.Experience = 0.00
|
||||
ProfessionExperience.Mining.Experience = 0.01
|
||||
ProfessionExperience.Skinning.Experience = 0.01
|
||||
ProfessionExperience.Smelting.Experience = 0.01
|
||||
ProfessionExperience.Tailoring.Experience = 0.01
|
||||
ProfessionExperience.Skinning.Experience = 0.00
|
||||
ProfessionExperience.Smelting.Experience = 0.00
|
||||
ProfessionExperience.Tailoring.Experience = 0.00
|
||||
|
||||
@@ -10,39 +10,22 @@
|
||||
|
||||
enum class PEConfig
|
||||
{
|
||||
ALCHEMY_ENABLED,
|
||||
ALCHEMY_EXPERIENCE,
|
||||
BLACKSMITH_ENABLED,
|
||||
BLACKSMITH_EXPERIENCE,
|
||||
COOKING_ENABLED,
|
||||
COOKING_EXPERIENCE,
|
||||
DISENCHANTING_ENABLED,
|
||||
DISENCHANTING_EXPERIENCE,
|
||||
ENCHANTING_ENABLED,
|
||||
ENCHANTING_EXPERIENCE,
|
||||
ENGINEERING_ENABLED,
|
||||
ENGINEERING_EXPERIENCE,
|
||||
FISHING_ENABLED,
|
||||
FISHING_EXPERIENCE,
|
||||
FIRST_AID_ENABLED,
|
||||
FIRST_AID_EXPERIENCE,
|
||||
HERBALISM_ENABLED,
|
||||
HERBALISM_EXPERIENCE,
|
||||
INSCRIPTION_ENABLED,
|
||||
INSCRIPTION_EXPERIENCE,
|
||||
JEWELCRAFTING_ENABLED,
|
||||
JEWELCRAFTING_EXPERIENCE,
|
||||
LEATHERWORKING_ENABLED,
|
||||
LEATHERWORKING_EXPERIENCE,
|
||||
LOCKPICK_ENABLED,
|
||||
LOCKPICK_EXPERIENCE,
|
||||
MINING_ENABLED,
|
||||
MINING_EXPERIENCE,
|
||||
SKINNING_ENABLED,
|
||||
SKINNING_EXPERIENCE,
|
||||
SMELTING_ENABLED,
|
||||
SMELTING_EXPERIENCE,
|
||||
TAILORING_ENABLED,
|
||||
TAILORING_EXPERIENCE,
|
||||
MULT_GRAY,
|
||||
MULT_GREEN,
|
||||
@@ -65,56 +48,23 @@ public:
|
||||
|
||||
void BuildConfigCache() override
|
||||
{
|
||||
SetConfigValue<bool>(PEConfig::ALCHEMY_ENABLED, "ProfessionExperience.Alchemy.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::ALCHEMY_EXPERIENCE, "ProfessionExperience.Alchemy.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::BLACKSMITH_ENABLED, "ProfessionExperience.Blacksmith.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::BLACKSMITH_EXPERIENCE, "ProfessionExperience.Blacksmith.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::COOKING_ENABLED, "ProfessionExperience.Cooking.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::COOKING_EXPERIENCE, "ProfessionExperience.Cooking.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::DISENCHANTING_ENABLED, "ProfessionExperience.Disenchanting.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::DISENCHANTING_EXPERIENCE, "ProfessionExperience.Disenchanting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::ENCHANTING_ENABLED, "ProfessionExperience.Enchanting.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::ENCHANTING_EXPERIENCE, "ProfessionExperience.Enchanting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::ENGINEERING_ENABLED, "ProfessionExperience.Engineering.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::ENGINEERING_EXPERIENCE, "ProfessionExperience.Engineering.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::FISHING_ENABLED, "ProfessionExperience.Fishing.Enabled", true);
|
||||
SetConfigValue<float>(PEConfig::FISHING_EXPERIENCE, "ProfessionExperience.Fishing.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::FIRST_AID_ENABLED, "ProfessionExperience.FirstAid.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::FIRST_AID_EXPERIENCE, "ProfessionExperience.FirstAid.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::HERBALISM_ENABLED, "ProfessionExperience.Herbalism.Enabled", true);
|
||||
SetConfigValue<float>(PEConfig::HERBALISM_EXPERIENCE, "ProfessionExperience.Herbalism.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::INSCRIPTION_ENABLED, "ProfessionExperience.Inscription.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::INSCRIPTION_EXPERIENCE, "ProfessionExperience.Inscription.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::JEWELCRAFTING_ENABLED, "ProfessionExperience.Jewelcrafting.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::JEWELCRAFTING_EXPERIENCE, "ProfessionExperience.Jewelcrafting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::LEATHERWORKING_ENABLED, "ProfessionExperience.Leatherworking.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::LEATHERWORKING_EXPERIENCE, "ProfessionExperience.Leatherworking.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::LOCKPICK_ENABLED, "ProfessionExperience.Lockpick.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::LOCKPICK_EXPERIENCE, "ProfessionExperience.Lockpick.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::MINING_ENABLED, "ProfessionExperience.Mining.Enabled", true);
|
||||
SetConfigValue<float>(PEConfig::MINING_EXPERIENCE, "ProfessionExperience.Mining.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::SKINNING_ENABLED, "ProfessionExperience.Skinning.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::SKINNING_EXPERIENCE, "ProfessionExperience.Skinning.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::SMELTING_ENABLED, "ProfessionExperience.Smelting.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::SMELTING_EXPERIENCE, "ProfessionExperience.Smelting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
|
||||
SetConfigValue<bool>(PEConfig::TAILORING_ENABLED, "ProfessionExperience.Tailoring.Enabled", false);
|
||||
SetConfigValue<float>(PEConfig::TAILORING_EXPERIENCE, "ProfessionExperience.Tailoring.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
|
||||
SetConfigValue<float>(PEConfig::ALCHEMY_EXPERIENCE, "ProfessionExperience.Alchemy.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::BLACKSMITH_EXPERIENCE, "ProfessionExperience.Blacksmith.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::COOKING_EXPERIENCE, "ProfessionExperience.Cooking.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::DISENCHANTING_EXPERIENCE, "ProfessionExperience.Disenchanting.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::ENCHANTING_EXPERIENCE, "ProfessionExperience.Enchanting.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::ENGINEERING_EXPERIENCE, "ProfessionExperience.Engineering.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::FISHING_EXPERIENCE, "ProfessionExperience.Fishing.Experience", 0.01f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::FIRST_AID_EXPERIENCE, "ProfessionExperience.FirstAid.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::HERBALISM_EXPERIENCE, "ProfessionExperience.Herbalism.Experience", 0.01f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::INSCRIPTION_EXPERIENCE, "ProfessionExperience.Inscription.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::JEWELCRAFTING_EXPERIENCE, "ProfessionExperience.Jewelcrafting.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::LEATHERWORKING_EXPERIENCE, "ProfessionExperience.Leatherworking.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::LOCKPICK_EXPERIENCE, "ProfessionExperience.Lockpick.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::MINING_EXPERIENCE, "ProfessionExperience.Mining.Experience", 0.01f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::SKINNING_EXPERIENCE, "ProfessionExperience.Skinning.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::SMELTING_EXPERIENCE, "ProfessionExperience.Smelting.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::TAILORING_EXPERIENCE, "ProfessionExperience.Tailoring.Experience", 0.00f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
|
||||
SetConfigValue<float>(PEConfig::MULT_GRAY, "ProfessionExperience.MultGray", 0.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
SetConfigValue<float>(PEConfig::MULT_GREEN, "ProfessionExperience.MultGreen", 0.75f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
@@ -143,109 +93,87 @@ RewardExperienceScript() : PlayerScript("RewardExperienceScript", {
|
||||
|
||||
bool OnPlayerUpdateFishingSkill(Player* player, int32 skill, int32 zone_skill, int32 /*chance*/, int32 /*roll*/) override
|
||||
{
|
||||
if (peConfigData.GetConfigValue<bool>(PEConfig::FISHING_ENABLED))
|
||||
RewardXP(player, skill, zone_skill + 100, zone_skill + 50, zone_skill + 25, peConfigData.GetConfigValue<float>(PEConfig::FISHING_EXPERIENCE));
|
||||
if (float xpFactor = peConfigData.GetConfigValue<float>(PEConfig::FISHING_EXPERIENCE))
|
||||
RewardXP(player, skill, zone_skill + 100, zone_skill + 50, zone_skill + 25, xpFactor);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnPlayerUpdateGatheringSkill(Player* player, uint32 skillId, uint32 currentLevel, uint32 gray, uint32 green, uint32 yellow, uint32& /*gain*/) override
|
||||
{
|
||||
PEConfig enabledSetting;
|
||||
PEConfig experienceSetting;
|
||||
switch (skillId)
|
||||
{
|
||||
case SKILL_HERBALISM:
|
||||
enabledSetting = PEConfig::HERBALISM_ENABLED;
|
||||
experienceSetting = PEConfig::HERBALISM_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_MINING:
|
||||
enabledSetting = PEConfig::MINING_ENABLED;
|
||||
experienceSetting = PEConfig::MINING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_SKINNING:
|
||||
enabledSetting = PEConfig::SKINNING_ENABLED;
|
||||
experienceSetting = PEConfig::SKINNING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_LOCKPICKING:
|
||||
enabledSetting = PEConfig::LOCKPICK_ENABLED;
|
||||
experienceSetting = PEConfig::LOCKPICK_EXPERIENCE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (peConfigData.GetConfigValue<bool>(enabledSetting))
|
||||
RewardXP(player, currentLevel, gray, green, yellow, peConfigData.GetConfigValue<float>(experienceSetting));
|
||||
if (float xpFactor = peConfigData.GetConfigValue<float>(experienceSetting))
|
||||
RewardXP(player, currentLevel, gray, green, yellow, xpFactor);
|
||||
}
|
||||
|
||||
void OnPlayerUpdateCraftingSkill(Player *player, SkillLineAbilityEntry const* skill, uint32 currentLevel, uint32& /*gain*/) override
|
||||
{
|
||||
PEConfig enabledSetting;
|
||||
PEConfig experienceSetting;
|
||||
switch (skill->SkillLine)
|
||||
{
|
||||
case SKILL_ALCHEMY:
|
||||
enabledSetting = PEConfig::ALCHEMY_ENABLED;
|
||||
experienceSetting = PEConfig::ALCHEMY_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_BLACKSMITHING:
|
||||
enabledSetting = PEConfig::BLACKSMITH_ENABLED;
|
||||
experienceSetting = PEConfig::BLACKSMITH_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_COOKING:
|
||||
enabledSetting = PEConfig::COOKING_ENABLED;
|
||||
experienceSetting = PEConfig::COOKING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_ENCHANTING:
|
||||
if (skill->Spell == 13262)
|
||||
{
|
||||
enabledSetting = PEConfig::DISENCHANTING_ENABLED;
|
||||
experienceSetting = PEConfig::DISENCHANTING_EXPERIENCE;
|
||||
}
|
||||
else
|
||||
{
|
||||
enabledSetting = PEConfig::ENCHANTING_ENABLED;
|
||||
experienceSetting = PEConfig::ENCHANTING_EXPERIENCE;
|
||||
}
|
||||
break;
|
||||
case SKILL_ENGINEERING:
|
||||
enabledSetting = PEConfig::ENGINEERING_ENABLED;
|
||||
experienceSetting = PEConfig::ENGINEERING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_FIRST_AID:
|
||||
enabledSetting = PEConfig::FIRST_AID_ENABLED;
|
||||
experienceSetting = PEConfig::FIRST_AID_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_INSCRIPTION:
|
||||
enabledSetting = PEConfig::INSCRIPTION_ENABLED;
|
||||
experienceSetting = PEConfig::INSCRIPTION_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_JEWELCRAFTING:
|
||||
enabledSetting = PEConfig::JEWELCRAFTING_ENABLED;
|
||||
experienceSetting = PEConfig::JEWELCRAFTING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_LEATHERWORKING:
|
||||
enabledSetting = PEConfig::LEATHERWORKING_ENABLED;
|
||||
experienceSetting = PEConfig::LEATHERWORKING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_MINING:
|
||||
enabledSetting = PEConfig::SMELTING_ENABLED;
|
||||
experienceSetting = PEConfig::SMELTING_EXPERIENCE;
|
||||
break;
|
||||
case SKILL_TAILORING:
|
||||
enabledSetting = PEConfig::TAILORING_ENABLED;
|
||||
experienceSetting = PEConfig::TAILORING_EXPERIENCE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (peConfigData.GetConfigValue<bool>(enabledSetting))
|
||||
if (float xpFactor = peConfigData.GetConfigValue<float>(experienceSetting))
|
||||
{
|
||||
uint32 gray = skill->TrivialSkillLineRankHigh;
|
||||
uint32 green = (skill->TrivialSkillLineRankHigh + skill->TrivialSkillLineRankLow) / 2;
|
||||
uint32 yellow = skill->TrivialSkillLineRankLow;
|
||||
RewardXP(player, currentLevel, gray, green, yellow, peConfigData.GetConfigValue<float>(experienceSetting));
|
||||
RewardXP(player, currentLevel, gray, green, yellow, xpFactor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user