From bb5ccde9d3498faf7bcbb4824e6780df9f9136ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Thu, 6 Apr 2023 22:21:49 -0600 Subject: [PATCH] Clarify functionality of Enable config option --- conf/individualProgression.conf.dist | 3 +++ src/IndividualProgressionPlayer.cpp | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/conf/individualProgression.conf.dist b/conf/individualProgression.conf.dist index 8b74d08..40e0c67 100644 --- a/conf/individualProgression.conf.dist +++ b/conf/individualProgression.conf.dist @@ -10,6 +10,9 @@ # # IndividualProgression.Enable # Description: Enable Individual Progression Module +# Please note that like all AzerothCore modules, database changes cannot be undone through config settings. +# This means that world changes like restoring Vanilla quests and NPC stats will remain in place even if disabled. +# Disabling the module will disable functionality like access restrictions, level caps, damage adjustments, etc. # Default: 1 - Enabled # 0 - Disabled # diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index 2cfdbdb..07a9f40 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -475,7 +475,7 @@ public: void ModifyHealReceived(Unit* /*target*/, Unit *healer, uint32 &heal, SpellInfo const *spellInfo) override { // Skip potions, bandages, percentage based heals like Rune Tap, etc. - if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || spellInfo->Mechanic == MECHANIC_BANDAGE || spellInfo->Id == SPELL_RUNE_TAP) + if (!sIndividualProgression->enabled || spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || spellInfo->Mechanic == MECHANIC_BANDAGE || spellInfo->Id == SPELL_RUNE_TAP) { return; } @@ -507,8 +507,7 @@ public: void ModifySpellDamageTaken(Unit* /*target*/, Unit* attacker, int32& damage, SpellInfo const* spellInfo) override { - // NPCBots Compatibility - attacker may be null - if (!attacker) + if (!sIndividualProgression->enabled || !attacker) return; bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER; @@ -534,8 +533,7 @@ public: void ModifyMeleeDamage(Unit* /*target*/, Unit* attacker, uint32& damage) override { - // NPCBots Compatibility - attacker may be null - if (!attacker) + if (!sIndividualProgression->enabled || !attacker) return; bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER;