mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Conditions: Make CONDITION_CLASS and CONDITION_RACE use a mask, this will reduce the amount of conditions needed
Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
@@ -73,10 +73,10 @@ bool Condition::Meets(Player* player, Unit* invoker)
|
||||
condMeets = player->GetTeam() == mConditionValue1;
|
||||
break;
|
||||
case CONDITION_CLASS:
|
||||
condMeets = player->getClass() == mConditionValue1;
|
||||
condMeets = player->getClassMask() & mConditionValue1;
|
||||
break;
|
||||
case CONDITION_RACE:
|
||||
condMeets = player->getRace() == mConditionValue1;
|
||||
condMeets = player->getRaceMask() & mConditionValue1;
|
||||
break;
|
||||
case CONDITION_SKILL:
|
||||
condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2;
|
||||
|
||||
Reference in New Issue
Block a user