mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11849] Implement Condition CONDITION_SKILL_BELOW to be able to check if a player has a skill lower than a given value
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
9eb96b7811
commit
e19943b907
2 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue