diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index dced66a5a..d364ae6cb 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7654,6 +7654,11 @@ bool PlayerCondition::Meets(Player const * player) const return false; } + case CONDITION_SKILL_BELOW: + if (value2 == 1) + return !player->HasSkill(value1); + else + return player->HasSkill(value1) && player->GetBaseSkillValue(value1) < value2; default: return false; } @@ -7744,6 +7749,7 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val break; } case CONDITION_SKILL: + case CONDITION_SKILL_BELOW: { SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(value1); if (!pSkill) diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 234035500..1e97f7385 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -367,6 +367,9 @@ enum ConditionType // True when player can learn ability (using min skill value from SkillLineAbility). // Item_id can be defined in addition, to check if player has one (1) item in inventory or bank. // When player has spell or has item (when defined), condition return false. + CONDITION_SKILL_BELOW = 29, // skill_id skill_value + // True if player has skill skill_id and skill less than (and not equal) skill_value (for skill_value > 1) + // If skill_value == 1, then true if player has not skill skill_id }; struct PlayerCondition