Core/Conditions: Change CONDITION_REPUTATION_RANK. It now no longer explicitly checks if ConditionValue2 is equal to the reputation rank. It now checks if the player's reputation rank is in the bitmask of ConditionValue2, where each bits are (1 << ReputationRank).

Idea by Aokromes and Malcrom
Data conversion query by Malcrom (*WATCH OUT WITH CUSTOM CONTENT AS THIS DELETES ALL CONDITION TYPE 5's AND RE-ADDS STOCK DATA ONLY*)
This commit is contained in:
Machiavelli
2012-01-17 14:31:22 +01:00
parent 67ef6f494f
commit 5dd6b8b2dc
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ bool Condition::Meets(Player* player, Unit* invoker)
case CONDITION_REPUTATION_RANK:
{
if (FactionEntry const* faction = sFactionStore.LookupEntry(mConditionValue1))
condMeets = uint32(player->GetReputationMgr().GetRank(faction)) == mConditionValue2;
condMeets = (mConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
break;
}
case CONDITION_ACHIEVEMENT: