[12190] Remove no more existant lockpicking skill.

Implement archaeology lock

Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
Yaki Khadafi 2012-09-06 10:04:43 +03:00 committed by Antz
parent 65dfa1470e
commit 8726754f7a
5 changed files with 14 additions and 14 deletions

View file

@ -7573,7 +7573,7 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
skillId = SkillByLockType(LockType(lockInfo->Index[j]));
if (skillId != SKILL_NONE)
if (skillId != SKILL_NONE || skillId == MAX_SKILL_TYPE)
{
// skill bonus provided by casting spell (mostly item spells)
// add the damage modifier from the spell casted (cheat lock / skeleton key etc.) (use m_currentBasePoints, CalculateDamage returns wrong value)
@ -7581,8 +7581,10 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
reqSkillValue = lockInfo->Skill[j];
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.
skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ?
0 : ((Player*)m_caster)->GetSkillValue(skillId);
if (skillId == MAX_SKILL_TYPE)
skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ? 0 : m_caster->getLevel() * 5;
else
skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ? 0 : ((Player*)m_caster)->GetSkillValue(skillId);
skillValue += spellSkillBonus;