aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2012-01-17 14:31:22 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2012-01-17 14:31:22 +0100
commit5dd6b8b2dcc99644f103a31e48fd5194795db123 (patch)
treee16c860b0612f72dc7e7b84b21c424a0ba3c693b
parent67ef6f494ffee92e99b5327ef6cb4a8e6f0b1a11 (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*)
-rw-r--r--sql/updates/world/2012_01_17_01_world_conditions.sql12
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp2
2 files changed, 13 insertions, 1 deletions
diff --git a/sql/updates/world/2012_01_17_01_world_conditions.sql b/sql/updates/world/2012_01_17_01_world_conditions.sql
new file mode 100644
index 00000000000..1dacd35dd4f
--- /dev/null
+++ b/sql/updates/world/2012_01_17_01_world_conditions.sql
@@ -0,0 +1,12 @@
+-- Condition update to flags
+DELETE FROM `conditions` WHERE `ConditionTypeOrReference`=5;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(19,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'),
+(20,0,13846,0,5,1106,127,0,0,'','Quest Contributin'' To The Cause - Requires Argent Crusade hated thru revered'),
+(14,21258,7594,0,5,270,120,0,0,'','Only show text_id 7594 if player is neutral thru revered with Zandalar Tribe (270)'),
+(14,21258,7595,0,5,270,128,0,0,'','Only show text_id 7594 if player is exalted with Zandalar Tribe (270)'),
+(15,21258,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
+(15,21259,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
+(15,21260,0,0,5,270,128,0,0,'','Only show gossip option if player is exalted with Zandalar Tribe (270)'),
+(1,23342,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted'),
+(1,23286,32726,0,5,1015,240,0,0,'','Murkblood Escape Plans - when Netherwing friendly thru exalted');
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: