Core/Spells: Fix Pick Lock calculation

Closes: #4323
This commit is contained in:
Vincent-Michael
2012-08-27 18:17:34 +02:00
parent 543ec0c02a
commit ccb20a1947

View File

@@ -6826,9 +6826,9 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk
0 : m_caster->ToPlayer()->GetSkillValue(skillId);
// skill bonus provided by casting spell (mostly item spells)
// add the damage 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)
skillValue += uint32(CalculateDamage(effIndex, NULL));
skillValue += m_spellInfo->Effects[effIndex].CalcValue();
if (skillValue < reqSkillValue)
return SPELL_FAILED_LOW_CASTLEVEL;