fix(Core/Spells): basepoints of spell 'Pick Lock' being wrongly added to player's lockpicking skill when evaluating if a lock can be opened (#8072)
This commit is contained in:
@@ -7832,8 +7832,11 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk
|
|||||||
|
|
||||||
// skill bonus provided by casting spell (mostly item spells)
|
// skill bonus provided by casting spell (mostly item spells)
|
||||||
// add the effect base points modifier from the spell casted (cheat lock / skeleton key etc.)
|
// add the effect base points modifier from the spell casted (cheat lock / skeleton key etc.)
|
||||||
if (m_spellInfo->Effects[effIndex].TargetA.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET || m_spellInfo->Effects[effIndex].TargetB.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET)
|
if ((m_spellInfo->Effects[effIndex].TargetA.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET || m_spellInfo->Effects[effIndex].TargetB.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET)
|
||||||
|
&& !m_spellInfo->IsAbilityOfSkillType(SKILL_LOCKPICKING))
|
||||||
|
{
|
||||||
skillValue += m_spellInfo->Effects[effIndex].CalcValue();
|
skillValue += m_spellInfo->Effects[effIndex].CalcValue();
|
||||||
|
}
|
||||||
|
|
||||||
if (skillValue < reqSkillValue)
|
if (skillValue < reqSkillValue)
|
||||||
return SPELL_FAILED_LOW_CASTLEVEL;
|
return SPELL_FAILED_LOW_CASTLEVEL;
|
||||||
|
|||||||
Reference in New Issue
Block a user