add disenchant, remove milling/prospecting

This commit is contained in:
Tereneckla
2025-07-26 00:47:10 +02:00
parent 93022fe930
commit c212b6b49b
2 changed files with 22 additions and 26 deletions

View File

@@ -26,10 +26,11 @@ ProfessionExperience.MultOrange = 1.25
# #
# ProfessionExperience.*.Enabled # ProfessionExperience.*.Enabled
# Description: Enable experience gain when crafting or gathering with this profession. Enchanting governs both Enchanting and Disenchanting # Description: Enable experience gain when crafting or gathering with this profession
# Default: 0 - (Disabled, ProfessionExperience.Alchemy.Enabled) # Default: 0 - (Disabled, ProfessionExperience.Alchemy.Enabled)
# 0 - (Disabled, ProfessionExperience.Blacksmith.Enabled) # 0 - (Disabled, ProfessionExperience.Blacksmith.Enabled)
# 0 - (Disabled, ProfessionExperience.Cooking.Enabled) # 0 - (Disabled, ProfessionExperience.Cooking.Enabled)
# 0 - (Disabled, ProfessionExperience.Disenchanting.Enabled)
# 0 - (Disabled, ProfessionExperience.Enchanting.Enabled) # 0 - (Disabled, ProfessionExperience.Enchanting.Enabled)
# 0 - (Disabled, ProfessionExperience.Engineering.Enabled) # 0 - (Disabled, ProfessionExperience.Engineering.Enabled)
# 1 - (Enabled, ProfessionExperience.Fishing.Enabled) # 1 - (Enabled, ProfessionExperience.Fishing.Enabled)
@@ -39,9 +40,7 @@ ProfessionExperience.MultOrange = 1.25
# 0 - (Disabled, ProfessionExperience.Jewelcrafting.Enabled) # 0 - (Disabled, ProfessionExperience.Jewelcrafting.Enabled)
# 0 - (Disabled, ProfessionExperience.Leatherworking.Enabled) # 0 - (Disabled, ProfessionExperience.Leatherworking.Enabled)
# 0 - (Disabled, ProfessionExperience.Lockpick.Enabled) # 0 - (Disabled, ProfessionExperience.Lockpick.Enabled)
# 0 - (Disabled, ProfessionExperience.Milling.Enabled)
# 1 - (Enabled, ProfessionExperience.Mining.Enabled) # 1 - (Enabled, ProfessionExperience.Mining.Enabled)
# 0 - (Disabled, ProfessionExperience.Prospecting.Enabled)
# 0 - (Disabled, ProfessionExperience.Skinning.Enabled) # 0 - (Disabled, ProfessionExperience.Skinning.Enabled)
# 0 - (Disabled, ProfessionExperience.Smelting.Enabled) # 0 - (Disabled, ProfessionExperience.Smelting.Enabled)
# 0 - (Disabled, ProfessionExperience.Tailoring.Enabled) # 0 - (Disabled, ProfessionExperience.Tailoring.Enabled)
@@ -49,6 +48,7 @@ ProfessionExperience.MultOrange = 1.25
ProfessionExperience.Alchemy.Enabled = 0 ProfessionExperience.Alchemy.Enabled = 0
ProfessionExperience.Blacksmith.Enabled = 0 ProfessionExperience.Blacksmith.Enabled = 0
ProfessionExperience.Cooking.Enabled = 0 ProfessionExperience.Cooking.Enabled = 0
ProfessionExperience.Disenchanting.Enabled = 0
ProfessionExperience.Enchanting.Enabled = 0 ProfessionExperience.Enchanting.Enabled = 0
ProfessionExperience.Engineering.Enabled = 0 ProfessionExperience.Engineering.Enabled = 0
ProfessionExperience.Fishing.Enabled = 1 ProfessionExperience.Fishing.Enabled = 1
@@ -58,9 +58,7 @@ ProfessionExperience.Inscription.Enabled = 0
ProfessionExperience.Jewelcrafting.Enabled = 0 ProfessionExperience.Jewelcrafting.Enabled = 0
ProfessionExperience.Leatherworking.Enabled = 0 ProfessionExperience.Leatherworking.Enabled = 0
ProfessionExperience.Lockpick.Enabled = 0 ProfessionExperience.Lockpick.Enabled = 0
ProfessionExperience.Milling.Enabled = 0
ProfessionExperience.Mining.Enabled = 1 ProfessionExperience.Mining.Enabled = 1
ProfessionExperience.Prospecting.Enabled = 0
ProfessionExperience.Skinning.Enabled = 0 ProfessionExperience.Skinning.Enabled = 0
ProfessionExperience.Smelting.Enabled = 0 ProfessionExperience.Smelting.Enabled = 0
ProfessionExperience.Tailoring.Enabled = 0 ProfessionExperience.Tailoring.Enabled = 0
@@ -74,6 +72,7 @@ ProfessionExperience.Tailoring.Enabled = 0
ProfessionExperience.Alchemy.Experience = 0.01 ProfessionExperience.Alchemy.Experience = 0.01
ProfessionExperience.Blacksmith.Experience = 0.01 ProfessionExperience.Blacksmith.Experience = 0.01
ProfessionExperience.Cooking.Experience = 0.01 ProfessionExperience.Cooking.Experience = 0.01
ProfessionExperience.Disenchanting.Experience = 0.01
ProfessionExperience.Enchanting.Experience = 0.01 ProfessionExperience.Enchanting.Experience = 0.01
ProfessionExperience.Engineering.Experience = 0.01 ProfessionExperience.Engineering.Experience = 0.01
ProfessionExperience.Fishing.Experience = 0.01 ProfessionExperience.Fishing.Experience = 0.01
@@ -83,9 +82,7 @@ ProfessionExperience.Inscription.Experience = 0.01
ProfessionExperience.Jewelcrafting.Experience = 0.01 ProfessionExperience.Jewelcrafting.Experience = 0.01
ProfessionExperience.Leatherworking.Experience = 0.01 ProfessionExperience.Leatherworking.Experience = 0.01
ProfessionExperience.Lockpick.Experience = 0.01 ProfessionExperience.Lockpick.Experience = 0.01
ProfessionExperience.Milling.Experience = 0.01
ProfessionExperience.Mining.Experience = 0.01 ProfessionExperience.Mining.Experience = 0.01
ProfessionExperience.Prospecting.Experience = 0.01
ProfessionExperience.Skinning.Experience = 0.01 ProfessionExperience.Skinning.Experience = 0.01
ProfessionExperience.Smelting.Experience = 0.01 ProfessionExperience.Smelting.Experience = 0.01
ProfessionExperience.Tailoring.Experience = 0.01 ProfessionExperience.Tailoring.Experience = 0.01

View File

@@ -16,6 +16,8 @@ enum class PEConfig
BLACKSMITH_EXPERIENCE, BLACKSMITH_EXPERIENCE,
COOKING_ENABLED, COOKING_ENABLED,
COOKING_EXPERIENCE, COOKING_EXPERIENCE,
DISENCHANTING_ENABLED,
DISENCHANTING_EXPERIENCE,
ENCHANTING_ENABLED, ENCHANTING_ENABLED,
ENCHANTING_EXPERIENCE, ENCHANTING_EXPERIENCE,
ENGINEERING_ENABLED, ENGINEERING_ENABLED,
@@ -46,7 +48,7 @@ enum class PEConfig
SMELTING_EXPERIENCE, SMELTING_EXPERIENCE,
TAILORING_ENABLED, TAILORING_ENABLED,
TAILORING_EXPERIENCE, TAILORING_EXPERIENCE,
MULT_GREY, MULT_GRAY,
MULT_GREEN, MULT_GREEN,
MULT_YELLOW, MULT_YELLOW,
MULT_ORANGE, MULT_ORANGE,
@@ -70,6 +72,9 @@ public:
SetConfigValue<bool>(PEConfig::COOKING_ENABLED, "ProfessionExperience.Cooking.Enabled", false); 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<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<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<float>(PEConfig::ENCHANTING_EXPERIENCE, "ProfessionExperience.Enchanting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
@@ -97,15 +102,9 @@ public:
SetConfigValue<bool>(PEConfig::LOCKPICK_ENABLED, "ProfessionExperience.Lockpick.Enabled", false); 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<float>(PEConfig::LOCKPICK_EXPERIENCE, "ProfessionExperience.Lockpick.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
SetConfigValue<bool>(PEConfig::MILLING_ENABLED, "ProfessionExperience.Milling.Enabled", false);
SetConfigValue<float>(PEConfig::MILLING_EXPERIENCE, "ProfessionExperience.Milling.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
SetConfigValue<bool>(PEConfig::MINING_ENABLED, "ProfessionExperience.Mining.Enabled", true); 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<float>(PEConfig::MINING_EXPERIENCE, "ProfessionExperience.Mining.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
SetConfigValue<bool>(PEConfig::PROSPECTING_ENABLED, "ProfessionExperience.Prospecting.Enabled", false);
SetConfigValue<float>(PEConfig::PROSPECTING_EXPERIENCE, "ProfessionExperience.Prospecting.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
SetConfigValue<bool>(PEConfig::SKINNING_ENABLED, "ProfessionExperience.Skinning.Enabled", false); 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<float>(PEConfig::SKINNING_EXPERIENCE, "ProfessionExperience.Skinning.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
@@ -115,7 +114,7 @@ public:
SetConfigValue<bool>(PEConfig::TAILORING_ENABLED, "ProfessionExperience.Tailoring.Enabled", false); 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::TAILORING_EXPERIENCE, "ProfessionExperience.Tailoring.Experience", 0.01, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value > 0.0f; }, "> 0");
SetConfigValue<float>(PEConfig::MULT_GREY, "ProfessionExperience.MultGrey", 0.0f, 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"); SetConfigValue<float>(PEConfig::MULT_GREEN, "ProfessionExperience.MultGreen", 0.75f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_YELLOW, "ProfessionExperience.MultYellow", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); SetConfigValue<float>(PEConfig::MULT_YELLOW, "ProfessionExperience.MultYellow", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_ORANGE, "ProfessionExperience.MultOrange", 1.25f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); SetConfigValue<float>(PEConfig::MULT_ORANGE, "ProfessionExperience.MultOrange", 1.25f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
@@ -162,14 +161,6 @@ RewardExperienceScript() : PlayerScript("RewardExperienceScript", {
enabledSetting = PEConfig::LOCKPICK_ENABLED; enabledSetting = PEConfig::LOCKPICK_ENABLED;
experienceSetting = PEConfig::LOCKPICK_EXPERIENCE; experienceSetting = PEConfig::LOCKPICK_EXPERIENCE;
break; break;
case SKILL_JEWELCRAFTING:
enabledSetting = PEConfig::PROSPECTING_ENABLED;
experienceSetting = PEConfig::PROSPECTING_EXPERIENCE;
break;
case SKILL_INSCRIPTION:
enabledSetting = PEConfig::MILLING_ENABLED;
experienceSetting = PEConfig::MILLING_EXPERIENCE;
break;
default: default:
return; return;
} }
@@ -197,8 +188,16 @@ RewardExperienceScript() : PlayerScript("RewardExperienceScript", {
experienceSetting = PEConfig::COOKING_EXPERIENCE; experienceSetting = PEConfig::COOKING_EXPERIENCE;
break; break;
case SKILL_ENCHANTING: case SKILL_ENCHANTING:
if (skill->Spell == 13262)
{
enabledSetting = PEConfig::DISENCHANTING_ENABLED;
experienceSetting = PEConfig::DISENCHANTING_EXPERIENCE;
}
else
{
enabledSetting = PEConfig::ENCHANTING_ENABLED; enabledSetting = PEConfig::ENCHANTING_ENABLED;
experienceSetting = PEConfig::ENCHANTING_EXPERIENCE; experienceSetting = PEConfig::ENCHANTING_EXPERIENCE;
}
break; break;
case SKILL_ENGINEERING: case SKILL_ENGINEERING:
enabledSetting = PEConfig::ENGINEERING_ENABLED; enabledSetting = PEConfig::ENGINEERING_ENABLED;
@@ -244,7 +243,7 @@ RewardExperienceScript() : PlayerScript("RewardExperienceScript", {
{ {
uint32 xp = player->GetUInt32Value(PLAYER_NEXT_LEVEL_XP) * xpFraction; uint32 xp = player->GetUInt32Value(PLAYER_NEXT_LEVEL_XP) * xpFraction;
if (currentLevel >= gray) if (currentLevel >= gray)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_GREY); xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_GRAY);
else if (currentLevel >= green) else if (currentLevel >= green)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_GREEN); xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_GREEN);
else if (currentLevel >= yellow) else if (currentLevel >= yellow)