From 5dd6b8b2dcc99644f103a31e48fd5194795db123 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 17 Jan 2012 14:31:22 +0100 Subject: 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*) --- src/server/game/Conditions/ConditionMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/Conditions') 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: -- cgit v1.2.3