diff options
-rw-r--r-- | sql/updates/world/3.3.5/2016_10_04_00_world.sql | 45 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 20 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.h | 3 |
3 files changed, 66 insertions, 2 deletions
diff --git a/sql/updates/world/3.3.5/2016_10_04_00_world.sql b/sql/updates/world/3.3.5/2016_10_04_00_world.sql new file mode 100644 index 00000000000..5558d56650c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_10_04_00_world.sql @@ -0,0 +1,45 @@ +-- +UPDATE `quest_template_addon` SET `ExclusiveGroup`=236 WHERE `ID` IN (13195, 13156, 13194, 13201, 13154, 13196, 13193, 13199, 236, 13197, 13191, 13200, 13153, 13198, 13202, 13192); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19, 20) AND `SourceEntry` IN (13195, 13156, 13194, 13201, 13154, 13196, 13193, 13199, 236, 13197, 13191, 13200, 13153, 13198, 13202, 13192, 13185, 13186, 13222, 13223); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 13195, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Alliance quest 'A Rare Herb' (attackers) is available if Wintergrasp is held by Horde"), +(20, 0, 13195, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Alliance quest 'A Rare Herb' (attackers) is available if Wintergrasp is held by Horde"), +(19, 0, 13156, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Alliance quest 'A Rare Herb' (defenders) is available if Wintergrasp is held by Alliance"), +(20, 0, 13156, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Alliance quest 'A Rare Herb' (defenders) is available if Wintergrasp is held by Alliance"), +(19, 0, 13194, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Horde quest 'Healing with Roses' (defenders) is available if Wintergrasp is held by Horde"), +(20, 0, 13194, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Horde quest 'Healing with Roses' (defenders) is available if Wintergrasp is held by Horde"), +(19, 0, 13201, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Horde quest 'Healing with Roses' (attackers) is available if Wintergrasp is held by Alliance"), +(20, 0, 13201, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Horde quest 'Healing with Roses' (attackers) is available if Wintergrasp is held by Alliance"), +(19, 0, 13154, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Alliance quest 'Bones and Arrows' (defenders) is available if Wintergrasp is held by Alliance"), +(20, 0, 13154, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Alliance quest 'Bones and Arrows' (defenders) is available if Wintergrasp is held by Alliance"), +(19, 0, 13196, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Alliance quest 'Bones and Arrows' (attackers) is available if Wintergrasp is held by Horde"), +(20, 0, 13196, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Alliance quest 'Bones and Arrows' (attackers) is available if Wintergrasp is held by Horde"), +(19, 0, 13193, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Horde quest 'Bones and Arrows' (defenders) is available if Wintergrasp is held by Horde"), +(20, 0, 13193, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Horde quest 'Bones and Arrows' (defenders) is available if Wintergrasp is held by Horde"), +(19, 0, 13199, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Horde quest 'Bones and Arrows' (attackers) is available if Wintergrasp is held by Alliance"), +(20, 0, 13199, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Horde quest 'Bones and Arrows' (attackers) is available if Wintergrasp is held by Alliance"), +(19, 0, 236, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Alliance quest 'Fueling the Demolishers' (defenders) is available if Wintergrasp is held by Alliance"), +(20, 0, 236, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Alliance quest 'Fueling the Demolishers' (defenders) is available if Wintergrasp is held by Alliance"), +(19, 0, 13197, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Alliance quest 'Fueling the Demolishers' (attackers) is available if Wintergrasp is held by Horde"), +(20, 0, 13197, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Alliance quest 'Fueling the Demolishers' (attackers) is available if Wintergrasp is held by Horde"), +(19, 0, 13191, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Horde quest 'Fueling the Demolishers' (defenders) is available if Wintergrasp is held by Horde"), +(20, 0, 13191, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Horde quest 'Fueling the Demolishers' (defenders) is available if Wintergrasp is held by Horde"), +(19, 0, 13200, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Horde quest 'Fueling the Demolishers' (attackers) is available if Wintergrasp is held by Alliance"), +(20, 0, 13200, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Horde quest 'Fueling the Demolishers' (attackers) is available if Wintergrasp is held by Alliance"), +(19, 0, 13153, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Alliance quest 'Warding the Warriors' (defenders) is available if Wintergrasp is held by Alliance"), +(20, 0, 13153, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Alliance quest 'Warding the Warriors' (defenders) is available if Wintergrasp is held by Alliance"), +(19, 0, 13198, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Alliance quest 'Warding the Warriors' (attackers) is available if Wintergrasp is held by Horde"), +(20, 0, 13198, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Alliance quest 'Warding the Warriors' (attackers) is available if Wintergrasp is held by Horde"), +(19, 0, 13202, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Horde quest 'Jinxing the Walls' (attackers) is available if Wintergrasp is held by Alliance"), +(20, 0, 13202, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Horde quest 'Jinxing the Walls' (attackers) is available if Wintergrasp is held by Alliance"), +(19, 0, 13192, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Horde quest 'Warding the Walls' (defenders) is available if Wintergrasp is held by Horde"), +(20, 0, 13192, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Horde quest 'Warding the Walls' (defenders) is available if Wintergrasp is held by Horde"), +(19, 0, 13185, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Horde quest 'Stop the Siege' (defenders) is available if Wintergrasp is held by Horde"), +(20, 0, 13185, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Horde quest 'Stop the Siege' (defenders) is available if Wintergrasp is held by Horde"), +(19, 0, 13186, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Alliance quest 'Stop the Siege' (defenders) is available if Wintergrasp is held by Alliance"), +(20, 0, 13186, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Alliance quest 'Stop the Siege' (defenders) is available if Wintergrasp is held by Alliance"), +(19, 0, 13222, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Alliance quest 'Defend the Siege' (attackers) is available if Wintergrasp is held by Horde"), +(20, 0, 13222, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, "", "Quest mark for Alliance quest 'Defend the Siege' (attackers) is available if Wintergrasp is held by Horde"), +(19, 0, 13223, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Horde quest 'Defend the Siege' (attackers) is available if Wintergrasp is held by Alliance"), +(20, 0, 13223, 0, 0, 48, 0, 0, 0, 0, 1, 0, 0, "", "Quest mark for Horde quest 'Defend the Siege' (attackers) is available if Wintergrasp is held by Alliance"); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index c859031b573..b4d9d097f14 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -18,6 +18,7 @@ #include "ConditionMgr.h" #include "AchievementMgr.h" +#include "BattlefieldMgr.h" #include "GameEventMgr.h" #include "InstanceScript.h" #include "ObjectMgr.h" @@ -109,7 +110,8 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND { "Charmed", false, false, false }, { "Pet type", true, false, false }, { "On Taxi", false, false, false }, - { "Quest state mask", true, true, false } + { "Quest state mask", true, true, false }, + { "Wintergrasp is horde",false, false, false } }; // Checks if object meets the condition @@ -494,6 +496,18 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const } break; } + case CONDITION_WINTERGRASP_HORDE: + { + condMeets = false; + if (Player* player = object->ToPlayer()) + { + Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(1); + if (wintergrasp->IsEnabled()) + if (wintergrasp->GetDefenderTeam() == TEAM_HORDE) + condMeets = true; + } + break; + } default: condMeets = false; break; @@ -682,6 +696,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const case CONDITION_QUESTSTATE: mask |= GRID_MAP_TYPE_MASK_PLAYER; break; + case CONDITION_WINTERGRASP_HORDE: + mask |= GRID_MAP_TYPE_MASK_PLAYER; + break; default: ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); break; @@ -2222,6 +2239,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const case CONDITION_IN_WATER: case CONDITION_CHARMED: case CONDITION_TAXI: + case CONDITION_WINTERGRASP_HORDE: default: break; } diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 7bda1376a0d..1c4bf737e18 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -78,7 +78,8 @@ enum ConditionTypes CONDITION_PET_TYPE = 45, // mask 0 0 true if player has a pet of given type(s) CONDITION_TAXI = 46, // 0 0 0 true if player is on taxi CONDITION_QUESTSTATE = 47, // quest_id state_mask 0 true if player is in any of the provided quest states for the quest (1 = not taken, 2 = completed, 8 = in progress, 32 = failed, 64 = rewarded) - CONDITION_MAX = 48 // MAX + CONDITION_WINTERGRASP_HORDE = 48, // 0 0 0 true if Wintergrasp is enabled and held by horde + CONDITION_MAX = 49 // MAX }; /*! Documentation on implementing a new ConditionSourceType: |