mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
Replace hack code in Spell::EffectOpenLock by generic way for check lock key items/skills
This commit is contained in:
parent
7dd997617e
commit
991376067d
3 changed files with 86 additions and 76 deletions
|
|
@ -1696,6 +1696,8 @@ inline uint8 ClassByQuestSort(int32 QuestSort)
|
|||
|
||||
enum SkillType
|
||||
{
|
||||
SKILL_NONE = 0,
|
||||
|
||||
SKILL_FROST = 6,
|
||||
SKILL_FIRE = 8,
|
||||
SKILL_ARMS = 26,
|
||||
|
|
@ -1850,6 +1852,20 @@ enum SkillType
|
|||
|
||||
#define MAX_SKILL_TYPE 789
|
||||
|
||||
inline SkillType SkillByLockType(LockType locktype)
|
||||
{
|
||||
switch(locktype)
|
||||
{
|
||||
case LOCKTYPE_PICKLOCK: return SKILL_LOCKPICKING;
|
||||
case LOCKTYPE_HERBALISM: return SKILL_HERBALISM;
|
||||
case LOCKTYPE_MINING: return SKILL_MINING;
|
||||
case LOCKTYPE_FISHING: return SKILL_FISHING;
|
||||
case LOCKTYPE_INSCRIPTION: return SKILL_INSCRIPTION;
|
||||
default: break;
|
||||
}
|
||||
return SKILL_NONE;
|
||||
}
|
||||
|
||||
inline uint32 SkillByQuestSort(int32 QuestSort)
|
||||
{
|
||||
switch(QuestSort)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue