mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
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:
12
sql/updates/world/2012_01_17_01_world_conditions.sql
Normal file
12
sql/updates/world/2012_01_17_01_world_conditions.sql
Normal file
@@ -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');
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user