aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-11-04 17:36:45 +0100
committerShauren <shauren.trinity@gmail.com>2024-11-04 17:36:45 +0100
commit9bab2801c6f7fbad0ac32702c67a76f06718f2da (patch)
treea81ec3f9172cb81f022e4650cf5f33b27936ba8d /src
parent5b278a4ca79dd8aa19cde3892d92ae857d6f1dd4 (diff)
Core/Players: Don't flag unlearned talents and specialization spells as disabled since they are learned with "dependent" flag (and not saved in database)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index fa45b862b94..ff05a3c2efe 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -2714,12 +2714,12 @@ void Player::RemoveTalent(TalentEntry const* talent)
if (!spellInfo)
return;
- RemoveSpell(talent->SpellID, true);
+ RemoveSpell(talent->SpellID);
// search for spells that the talent teaches and unlearn them
for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
if (spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL) && spellEffectInfo.TriggerSpell > 0)
- RemoveSpell(spellEffectInfo.TriggerSpell, true);
+ RemoveSpell(spellEffectInfo.TriggerSpell);
if (talent->OverridesSpellID)
RemoveOverrideSpell(talent->OverridesSpellID, talent->SpellID);
@@ -27214,7 +27214,7 @@ void Player::RemovePvpTalent(PvpTalentEntry const* talent, uint8 activeTalentGro
if (!spellInfo)
return;
- RemoveSpell(talent->SpellID, true);
+ RemoveSpell(talent->SpellID);
// Move this to toggle ?
if (talent->OverridesSpellID)
@@ -27235,7 +27235,7 @@ void Player::TogglePvpTalents(bool enable)
{
if (enable)
{
- LearnSpell(pvpTalentInfo->SpellID, false);
+ LearnSpell(pvpTalentInfo->SpellID, true);
if (pvpTalentInfo->OverridesSpellID)
AddOverrideSpell(pvpTalentInfo->OverridesSpellID, pvpTalentInfo->SpellID);
}
@@ -27243,7 +27243,7 @@ void Player::TogglePvpTalents(bool enable)
{
if (pvpTalentInfo->OverridesSpellID)
RemoveOverrideSpell(pvpTalentInfo->OverridesSpellID, pvpTalentInfo->SpellID);
- RemoveSpell(pvpTalentInfo->SpellID, true);
+ RemoveSpell(pvpTalentInfo->SpellID);
}
}
}
@@ -28226,12 +28226,12 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec)
if (!spellInfo)
continue;
- RemoveSpell(talentInfo->SpellID, true);
+ RemoveSpell(talentInfo->SpellID);
// search for spells that the talent teaches and unlearn them
for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
if (spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL) && spellEffectInfo.TriggerSpell > 0)
- RemoveSpell(spellEffectInfo.TriggerSpell, true);
+ RemoveSpell(spellEffectInfo.TriggerSpell);
if (talentInfo->OverridesSpellID)
RemoveOverrideSpell(talentInfo->OverridesSpellID, talentInfo->SpellID);
@@ -28247,12 +28247,12 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec)
if (!spellInfo)
continue;
- RemoveSpell(talentInfo->SpellID, true);
+ RemoveSpell(talentInfo->SpellID);
// search for spells that the talent teaches and unlearn them
for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
if (spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL) && spellEffectInfo.TriggerSpell > 0)
- RemoveSpell(spellEffectInfo.TriggerSpell, true);
+ RemoveSpell(spellEffectInfo.TriggerSpell);
if (talentInfo->OverridesSpellID)
RemoveOverrideSpell(talentInfo->OverridesSpellID, talentInfo->SpellID);
@@ -30078,7 +30078,7 @@ void Player::RemoveSpecializationSpells()
for (size_t j = 0; j < specSpells->size(); ++j)
{
SpecializationSpellsEntry const* specSpell = (*specSpells)[j];
- RemoveSpell(specSpell->SpellID, true);
+ RemoveSpell(specSpell->SpellID);
if (specSpell->OverridesSpellID)
RemoveOverrideSpell(specSpell->OverridesSpellID, specSpell->SpellID);
}