From 8cce62b210976c0bbfa2878b7899f9f82ba54037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Fri, 9 Sep 2022 12:33:51 -0600 Subject: [PATCH] Fishing leveling fix --- conf/individualProgression.conf.dist | 13 ++++++++++++- src/IndividualProgression.cpp | 14 +++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/conf/individualProgression.conf.dist b/conf/individualProgression.conf.dist index 9f9c121..fa34bf6 100644 --- a/conf/individualProgression.conf.dist +++ b/conf/individualProgression.conf.dist @@ -148,4 +148,15 @@ IndividualProgression.MoltenCore.ManualRuneHandling = 1 # # -IndividualProgression.MoltenCore.AqualEssenceCooldownReduction = 0 \ No newline at end of file +IndividualProgression.MoltenCore.AqualEssenceCooldownReduction = 0 +# +# IndividualProgression.FishingFix +# Description: Before patch 3.1, fishing skill had progression and had to be leveled in low level zones before high level areas could add skill +# In patch 3.1, it was changed to allow leveling fishing even when catching junk in high level zones, allowing progression to be skipped +# This reverts that changed. +# Default: 1 - Enabled (Pre 3.1 behavior - Fishing requires progression through zone levels) +# 0 - Disabled (Post 3.1 behavior - Allow leveling fishing in any area) +# +# + +IndividualProgression.FishingFix = 1 diff --git a/src/IndividualProgression.cpp b/src/IndividualProgression.cpp index 19d0732..d0026be 100644 --- a/src/IndividualProgression.cpp +++ b/src/IndividualProgression.cpp @@ -5,7 +5,7 @@ #include "IndividualProgression.h" static float vanillaPowerAdjustment, vanillaHealthAdjustment, tbcPowerAdjustment, tbcHealthAdjustment, vanillaHealingAdjustment, tbcHealingAdjustment, previousGearTuning; -static bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules; +static bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix; class gobject_ipp_wotlk : public GameObjectScript { @@ -180,6 +180,7 @@ private: hunterPetLevelFix = sConfigMgr->GetOption("IndividualProgression.HunterPetLevelFix", true); requirePreAQQuests = sConfigMgr->GetOption("IndividualProgression.RequirePreAQQuests", true); enforceGroupRules = sConfigMgr->GetOption("IndividualProgression.EnforceGroupRules", true); + fishingFix = sConfigMgr->GetOption("IndividualProgression.FishingFix", true); previousGearTuning = sConfigMgr->GetOption("IndividualProgression.PreviousGearTuning", 0.03); } @@ -665,6 +666,17 @@ public: break; } } + + // Once this PR is merged, this will be required: https://github.com/azerothcore/azerothcore-wotlk/pull/12996 + // Currently, due to AC bug, the "enabled" behavior is actually the current behavior anyway +// bool OnUpdateFishingSkill(Player* player, int32 /*skill*/, int32 /*zone_skill*/, int32 chance, int32 roll) override +// { +// if (!enabled || !fishingFix) +// return true; +// if (chance < roll) +// return false; +// return true; +// } }; // Add all scripts in one