diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2012-01-17 14:31:22 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2012-01-17 14:31:22 +0100 |
commit | 5dd6b8b2dcc99644f103a31e48fd5194795db123 (patch) | |
tree | e16c860b0612f72dc7e7b84b21c424a0ba3c693b /src | |
parent | 67ef6f494ffee92e99b5327ef6cb4a8e6f0b1a11 (diff) |
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*)
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 0bcd1a7864b..49b5d4cba65 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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: |