mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[12190] Remove no more existant lockpicking skill.
Implement archaeology lock Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
65dfa1470e
commit
8726754f7a
5 changed files with 14 additions and 14 deletions
|
|
@ -8347,10 +8347,7 @@ SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial)
|
||||||
return SKILL_RANGE_MONO;
|
return SKILL_RANGE_MONO;
|
||||||
case SKILL_CATEGORY_ARMOR:
|
case SKILL_CATEGORY_ARMOR:
|
||||||
case SKILL_CATEGORY_CLASS:
|
case SKILL_CATEGORY_CLASS:
|
||||||
if (pSkill->id != SKILL_LOCKPICKING)
|
return SKILL_RANGE_MONO;
|
||||||
return SKILL_RANGE_MONO;
|
|
||||||
else
|
|
||||||
return SKILL_RANGE_LEVEL;
|
|
||||||
case SKILL_CATEGORY_SECONDARY:
|
case SKILL_CATEGORY_SECONDARY:
|
||||||
case SKILL_CATEGORY_PROFESSION:
|
case SKILL_CATEGORY_PROFESSION:
|
||||||
// not set skills for professions and racial abilities
|
// not set skills for professions and racial abilities
|
||||||
|
|
|
||||||
|
|
@ -3295,7 +3295,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
|
||||||
|
|
||||||
if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ||
|
if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ||
|
||||||
// lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
|
// lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
|
||||||
((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0))
|
(pSkill->id == SKILL_RUNEFORGING && _spell_idx->second->max_value == 0))
|
||||||
{
|
{
|
||||||
switch (GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0))
|
switch (GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0))
|
||||||
{
|
{
|
||||||
|
|
@ -3526,7 +3526,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bo
|
||||||
if ((_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL &&
|
if ((_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL &&
|
||||||
pSkill->categoryId != SKILL_CATEGORY_CLASS) ||// not unlearn class skills (spellbook/talent pages)
|
pSkill->categoryId != SKILL_CATEGORY_CLASS) ||// not unlearn class skills (spellbook/talent pages)
|
||||||
// lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
|
// lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
|
||||||
((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0))
|
(pSkill->id == SKILL_RUNEFORGING && _spell_idx->second->max_value == 0))
|
||||||
{
|
{
|
||||||
// not reset skills for professions and racial abilities
|
// not reset skills for professions and racial abilities
|
||||||
if ((pSkill->categoryId == SKILL_CATEGORY_SECONDARY || pSkill->categoryId == SKILL_CATEGORY_PROFESSION) &&
|
if ((pSkill->categoryId == SKILL_CATEGORY_SECONDARY || pSkill->categoryId == SKILL_CATEGORY_PROFESSION) &&
|
||||||
|
|
@ -5511,7 +5511,6 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve
|
||||||
switch (SkillId)
|
switch (SkillId)
|
||||||
{
|
{
|
||||||
case SKILL_HERBALISM:
|
case SKILL_HERBALISM:
|
||||||
case SKILL_LOCKPICKING:
|
|
||||||
case SKILL_JEWELCRAFTING:
|
case SKILL_JEWELCRAFTING:
|
||||||
case SKILL_INSCRIPTION:
|
case SKILL_INSCRIPTION:
|
||||||
return UpdateSkillPro(SkillId, SkillGainChance(SkillValue, RedLevel + 100, RedLevel + 50, RedLevel + 25) * Multiplicator, gathering_skill_gain);
|
return UpdateSkillPro(SkillId, SkillGainChance(SkillValue, RedLevel + 100, RedLevel + 50, RedLevel + 25) * Multiplicator, gathering_skill_gain);
|
||||||
|
|
|
||||||
|
|
@ -2217,7 +2217,9 @@ enum LockType
|
||||||
LOCKTYPE_SLOW_CLOSE = 18,
|
LOCKTYPE_SLOW_CLOSE = 18,
|
||||||
LOCKTYPE_FISHING = 19,
|
LOCKTYPE_FISHING = 19,
|
||||||
LOCKTYPE_INSCRIPTION = 20,
|
LOCKTYPE_INSCRIPTION = 20,
|
||||||
LOCKTYPE_OPEN_FROM_VEHICLE = 21
|
LOCKTYPE_OPEN_FROM_VEHICLE = 21,
|
||||||
|
LOCKTYPE_ARCHAEOLOGY = 22,
|
||||||
|
LOCKTYPE_PVP_OPEN_FAST = 23,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TrainerType // this is important type for npcs!
|
enum TrainerType // this is important type for npcs!
|
||||||
|
|
@ -2555,7 +2557,6 @@ enum SkillType
|
||||||
SKILL_DESTRUCTION = 593,
|
SKILL_DESTRUCTION = 593,
|
||||||
SKILL_HOLY2 = 594,
|
SKILL_HOLY2 = 594,
|
||||||
SKILL_DISCIPLINE = 613,
|
SKILL_DISCIPLINE = 613,
|
||||||
SKILL_LOCKPICKING = 633,
|
|
||||||
SKILL_PET_BAT = 653,
|
SKILL_PET_BAT = 653,
|
||||||
SKILL_PET_HYENA = 654,
|
SKILL_PET_HYENA = 654,
|
||||||
SKILL_PET_BIRD_OF_PREY = 655,
|
SKILL_PET_BIRD_OF_PREY = 655,
|
||||||
|
|
@ -2619,11 +2620,12 @@ inline SkillType SkillByLockType(LockType locktype)
|
||||||
{
|
{
|
||||||
switch (locktype)
|
switch (locktype)
|
||||||
{
|
{
|
||||||
case LOCKTYPE_PICKLOCK: return SKILL_LOCKPICKING;
|
case LOCKTYPE_PICKLOCK: return SkillType(MAX_SKILL_TYPE);
|
||||||
case LOCKTYPE_HERBALISM: return SKILL_HERBALISM;
|
case LOCKTYPE_HERBALISM: return SKILL_HERBALISM;
|
||||||
case LOCKTYPE_MINING: return SKILL_MINING;
|
case LOCKTYPE_MINING: return SKILL_MINING;
|
||||||
case LOCKTYPE_FISHING: return SKILL_FISHING;
|
case LOCKTYPE_FISHING: return SKILL_FISHING;
|
||||||
case LOCKTYPE_INSCRIPTION: return SKILL_INSCRIPTION;
|
case LOCKTYPE_INSCRIPTION: return SKILL_INSCRIPTION;
|
||||||
|
case LOCKTYPE_ARCHAEOLOGY: return SKILL_ARCHAEOLOGY;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return SKILL_NONE;
|
return SKILL_NONE;
|
||||||
|
|
|
||||||
|
|
@ -7573,7 +7573,7 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
|
||||||
|
|
||||||
skillId = SkillByLockType(LockType(lockInfo->Index[j]));
|
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)
|
// 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)
|
// 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];
|
reqSkillValue = lockInfo->Skill[j];
|
||||||
|
|
||||||
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.
|
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.
|
||||||
skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ?
|
if (skillId == MAX_SKILL_TYPE)
|
||||||
0 : ((Player*)m_caster)->GetSkillValue(skillId);
|
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;
|
skillValue += spellSkillBonus;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12189"
|
#define REVISION_NR "12190"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue