diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index 0d1fec965..7d53cfa10 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -2276,7 +2276,7 @@ namespace Game.Entities SendPacket(unlearnedSpells); } } - bool IsNeedCastPassiveSpellAtLearn(SpellInfo spellInfo) + bool HandlePassiveSpellLearn(SpellInfo spellInfo) { // note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell // talent dependent passives activated at form apply have proper stance data @@ -2288,12 +2288,18 @@ namespace Game.Entities need_cast &= IsCurrentSpecMasterySpell(spellInfo); // Check EquippedItemClass - // passive spells which apply aura and have an item requirement are to be added in Player::ApplyItemDependentAuras - if (spellInfo.IsPassive() && spellInfo.EquippedItemClass >= 0) + // passive spells which apply aura and have an item requirement are to be added manually, instead of casted + if (spellInfo.EquippedItemClass >= 0) { foreach (SpellEffectInfo effectInfo in spellInfo.GetEffectsForDifficulty(Difficulty.None)) + { if (effectInfo != null && effectInfo.IsAura()) + { + if (!HasAura(spellInfo.Id) && HasItemFitToSpellRequirements(spellInfo)) + AddAura(spellInfo.Id, this); return false; + } + } } //Check CasterAuraStates @@ -2400,7 +2406,7 @@ namespace Game.Entities if (active) { - if (spellInfo.IsPassive() && IsNeedCastPassiveSpellAtLearn(spellInfo)) + if (spellInfo.IsPassive() && HandlePassiveSpellLearn(spellInfo)) CastSpell(this, spellId, true); } else if (IsInWorld) @@ -2528,7 +2534,7 @@ namespace Game.Entities // also cast passive spells (including all talents without SPELL_EFFECT_LEARN_SPELL) with additional checks else if (spellInfo.IsPassive()) { - if (IsNeedCastPassiveSpellAtLearn(spellInfo)) + if (HandlePassiveSpellLearn(spellInfo)) CastSpell(this, spellId, true); } else if (spellInfo.HasEffect(SpellEffectName.SkillStep))