From 2396638a70d5b807032185b46b231b9b49341134 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:45:47 +0100 Subject: [PATCH 01/17] fix(Core): Crashfix. (#15448) --- src/server/game/Entities/Vehicle/Vehicle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index daf0d5e50..c12a7f431 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -491,11 +491,11 @@ void Vehicle::RemovePassenger(Unit* unit) if (_me->IsFlying() && !_me->GetInstanceId() && unit->GetTypeId() == TYPEID_PLAYER && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/) _me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true); + if (_me->GetTypeId() == TYPEID_UNIT) + sScriptMgr->OnRemovePassenger(this, unit); + if (_me->GetTypeId() == TYPEID_UNIT && _me->ToCreature()->IsAIEnabled) _me->ToCreature()->AI()->PassengerBoarded(unit, seat->first, false); - - if (_me && _me->GetTypeId() == TYPEID_UNIT) - sScriptMgr->OnRemovePassenger(this, unit); } void Vehicle::RelocatePassengers() From 80ac0c958db4dd964c1d22ec29b7ec45f1078dac Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:04:18 -0600 Subject: [PATCH 02/17] fix(Scripts/Naxxramas): Improve Four Horsemen (#14247) * init * remove aggro reduction * add visibility sql file --------- Co-authored-by: Si1ker --- .../rev_1677603589341678000.sql | 3 ++ .../Naxxramas/boss_four_horsemen.cpp | 44 ++++++++++--------- 2 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1677603589341678000.sql diff --git a/data/sql/updates/pending_db_world/rev_1677603589341678000.sql b/data/sql/updates/pending_db_world/rev_1677603589341678000.sql new file mode 100644 index 000000000..2767b1bfa --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1677603589341678000.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_addon` SET `visibilityDistanceType` = 3 WHERE `guid` IN (130964, 130961, 130962, 130963); + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index c37bad72e..2dfa3eec2 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -56,8 +56,7 @@ enum Events EVENT_MARK_CAST = 1, EVENT_PRIMARY_SPELL = 2, EVENT_SECONDARY_SPELL = 3, - EVENT_PUNISH = 4, - EVENT_BERSERK = 5 + EVENT_BERSERK = 4 }; enum Misc @@ -75,12 +74,12 @@ enum Misc enum FourHorsemen { - SAY_AGGRO = 0, - SAY_TAUNT = 1, - SAY_SPECIAL = 2, - SAY_SLAY = 3, - SAY_DEATH = 4, - EMOTE_RAGECAST = 7 + SAY_AGGRO = 0, + SAY_TAUNT = 1, + SAY_SPECIAL = 2, + SAY_SLAY = 3, + SAY_DEATH = 4, + EMOTE_RAGECAST = 7 }; // MARKS @@ -201,7 +200,6 @@ public: } else { - events.RescheduleEvent(EVENT_PUNISH, 5s); events.RescheduleEvent(EVENT_SECONDARY_SPELL, 15s); } if (pInstance) @@ -348,25 +346,29 @@ public: me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false); events.Repeat(15s); return; - case EVENT_PUNISH: - if (!SelectTarget(SelectTargetMethod::MaxDistance, 0, 45.0f, true)) - { - me->CastSpell(me, TABLE_SPELL_PUNISH[horsemanId], false); - Talk(EMOTE_RAGECAST); - } - events.Repeat(2s); - return; case EVENT_SECONDARY_SPELL: me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_SECONDARY_10[horsemanId], TABLE_SPELL_SECONDARY_25[horsemanId]), false); events.Repeat(15s); return; } - if ((me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK)) + if (me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK) { - if (Unit* target = SelectTarget(SelectTargetMethod::MaxDistance, 0, 45.0f, true)) + if (Unit* pTarget = me->SelectNearestPlayer(300.0f)) { - me->CastSpell(target, RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false); + if (pTarget && me->IsValidAttackTarget(pTarget)) + { + AttackStart(pTarget); + } + } + if (me->IsWithinDistInMap(me->GetVictim(), 45.0f) && me->IsValidAttackTarget(me->GetVictim())) + { + DoCastVictim(RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId])); + } + else if (!me->IsWithinDistInMap(me->GetVictim(), 45.0f) || !me->IsValidAttackTarget(me->GetVictim())) + { + DoCastAOE(TABLE_SPELL_PUNISH[horsemanId]); + Talk(EMOTE_RAGECAST); } } else @@ -406,7 +408,7 @@ public: damage = 4000; break; case 5: - damage = 12000; + damage = 12500; break; case 6: damage = 20000; From 9aee5c41e2e969e40e3497234dcaacf08af5dfb2 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:05:04 -0300 Subject: [PATCH 03/17] fix(Scripts/Misc): Fix bosses not reseting after the despawn update (#15507) * fix bosses not reseting * fix lk * fix tirion not respawning * up --- .../rev_1679368320710232700.sql | 2 ++ .../RubySanctum/boss_halion.cpp | 11 ++---- .../IcecrownCitadel/boss_the_lich_king.cpp | 34 +++++++++---------- 3 files changed, 22 insertions(+), 25 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1679368320710232700.sql diff --git a/data/sql/updates/pending_db_world/rev_1679368320710232700.sql b/data/sql/updates/pending_db_world/rev_1679368320710232700.sql new file mode 100644 index 000000000..b78c74254 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679368320710232700.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature` WHERE `guid` = 150212; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index dbf583d55..72f8554ae 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -277,6 +277,9 @@ public: if (IsAnyPlayerValid()) return; + instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); + if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_HALION_CONTROLLER))) + controller->AI()->DoAction(ACTION_RESET_ENCOUNTER); BossAI::EnterEvadeMode(why); } @@ -286,14 +289,6 @@ public: BossAI::AttackStart(who); } - void JustReachedHome() override - { - instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); - if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_HALION_CONTROLLER))) - controller->AI()->DoAction(ACTION_RESET_ENCOUNTER); - BossAI::JustReachedHome(); - } - void JustEngagedWith(Unit* who) override { BossAI::JustEngagedWith(who); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index f73a557c6..85ceb9d3d 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -308,6 +308,7 @@ enum Phases }; Position const CenterPosition = {503.6282f, -2124.655f, 840.8569f, 0.0f}; +Position const TirionSpawn = { 505.2118f, -2124.353f, 840.9403f, 3.141593f }; Position const TirionIntro = {488.2970f, -2124.840f, 840.8569f, 0.0f}; Position const TirionCharge = {472.8500f, -2124.350f, 840.8570f, 0.0f}; Position const LichKingIntro[3] = { {432.0851f, -2123.673f, 864.6582f, 0.0f}, {457.8351f, -2123.423f, 841.1582f, 0.0f}, {465.0730f, -2123.470f, 840.8569f, 0.0f} }; @@ -660,6 +661,21 @@ public: SetEquipmentSlots(true); if (me->IsImmuneToPC()) me->SetStandState(UNIT_STAND_STATE_SIT); + + DoAction(ACTION_RESTORE_LIGHT); + + // Reset The Frozen Throne gameobjects + FrozenThroneResetWorker reset; + Acore::GameObjectWorker worker(me, reset); + Cell::VisitGridObjects(me, worker, 333.0f); + + me->AddAura(SPELL_EMOTE_SIT_NO_SHEATH, me); + me->SetImmuneToPC(true); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SIT); + + if (!ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HIGHLORD_TIRION_FORDRING))) + me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING_LK, TirionSpawn, TEMPSUMMON_MANUAL_DESPAWN); } void JustDied(Unit* /*killer*/) override @@ -693,22 +709,6 @@ public: events.ScheduleEvent(EVENT_SHADOW_TRAP, 15s + 500ms, EVENT_GROUP_ABILITIES); } - void JustReachedHome() override - { - _JustReachedHome(); - DoAction(ACTION_RESTORE_LIGHT); - - // Reset The Frozen Throne gameobjects - FrozenThroneResetWorker reset; - Acore::GameObjectWorker worker(me, reset); - Cell::VisitGridObjects(me, worker, 333.0f); - - me->AddAura(SPELL_EMOTE_SIT_NO_SHEATH, me); - me->SetImmuneToPC(true); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SIT); - } - bool CanAIAttack(Unit const* target) const override { return me->IsVisible() && IsValidPlatformTarget(target) && !target->GetVehicle(); @@ -1262,7 +1262,7 @@ public: me->SetReactState(REACT_AGGRESSIVE); if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HIGHLORD_TIRION_FORDRING))) - tirion->AI()->EnterEvadeMode(); + tirion->DespawnOrUnsummon(); } }; From d6dc93f0f1f6995ed0c24532361f718da28f3e5f Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 21 Mar 2023 18:07:51 +0000 Subject: [PATCH 04/17] chore(DB): import pending files Referenced commit(s): 9aee5c41e2e969e40e3497234dcaacf08af5dfb2 --- .../rev_1677603589341678000.sql => db_world/2023_03_21_02.sql} | 1 + .../rev_1679368320710232700.sql => db_world/2023_03_21_03.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1677603589341678000.sql => db_world/2023_03_21_02.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1679368320710232700.sql => db_world/2023_03_21_03.sql} (52%) diff --git a/data/sql/updates/pending_db_world/rev_1677603589341678000.sql b/data/sql/updates/db_world/2023_03_21_02.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1677603589341678000.sql rename to data/sql/updates/db_world/2023_03_21_02.sql index 2767b1bfa..eda5e529a 100644 --- a/data/sql/updates/pending_db_world/rev_1677603589341678000.sql +++ b/data/sql/updates/db_world/2023_03_21_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_21_01 -> 2023_03_21_02 -- UPDATE `creature_addon` SET `visibilityDistanceType` = 3 WHERE `guid` IN (130964, 130961, 130962, 130963); diff --git a/data/sql/updates/pending_db_world/rev_1679368320710232700.sql b/data/sql/updates/db_world/2023_03_21_03.sql similarity index 52% rename from data/sql/updates/pending_db_world/rev_1679368320710232700.sql rename to data/sql/updates/db_world/2023_03_21_03.sql index b78c74254..6fd18f47f 100644 --- a/data/sql/updates/pending_db_world/rev_1679368320710232700.sql +++ b/data/sql/updates/db_world/2023_03_21_03.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_21_02 -> 2023_03_21_03 -- DELETE FROM `creature` WHERE `guid` = 150212; From a9318af239cf9ba0c88c78bc5951dbf4f14c2c71 Mon Sep 17 00:00:00 2001 From: Revision Date: Tue, 21 Mar 2023 19:33:50 +0100 Subject: [PATCH 05/17] fix(DB/Trainer) Add Flying Carpet to Tailoring trainers (#15161) * Create rev_1677089599224449400.sql * Update rev_1677089599224449400.sql * Reference Moved the spell to a reference. Still one trainer missing the spell and waiting for help on how to deal with it. * Update rev_1677089599224449400.sql * Cleanup Removed the useless delete... * Update data/sql/updates/pending_db_world/rev_1677089599224449400.sql Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --------- Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1677089599224449400.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1677089599224449400.sql diff --git a/data/sql/updates/pending_db_world/rev_1677089599224449400.sql b/data/sql/updates/pending_db_world/rev_1677089599224449400.sql new file mode 100644 index 000000000..27c3c4dae --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1677089599224449400.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `npc_trainer` WHERE `SpellID`=60969 AND `ID` IN (201040, 201041); +INSERT INTO `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`, `ReqSpell`) VALUES +(201040, 60969, 105000, 197, 300, 0, 0); From e85fe8d2c94dd6509cc63b0cd8a9a8816495f443 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 21 Mar 2023 18:36:25 +0000 Subject: [PATCH 06/17] chore(DB): import pending files Referenced commit(s): a9318af239cf9ba0c88c78bc5951dbf4f14c2c71 --- .../rev_1677089599224449400.sql => db_world/2023_03_21_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1677089599224449400.sql => db_world/2023_03_21_04.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1677089599224449400.sql b/data/sql/updates/db_world/2023_03_21_04.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1677089599224449400.sql rename to data/sql/updates/db_world/2023_03_21_04.sql index 27c3c4dae..6321d0ccc 100644 --- a/data/sql/updates/pending_db_world/rev_1677089599224449400.sql +++ b/data/sql/updates/db_world/2023_03_21_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_21_03 -> 2023_03_21_04 -- DELETE FROM `npc_trainer` WHERE `SpellID`=60969 AND `ID` IN (201040, 201041); INSERT INTO `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`, `ReqSpell`) VALUES From 341ef8658ed700201a4e40bd314be39ddf9ef74f Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:26:05 -0300 Subject: [PATCH 07/17] chore(DB/Spells): Remove duplicated entries from spelldifficulty_dbc (#15526) Create rev_1679396183321763400.sql --- .../pending_db_world/rev_1679396183321763400.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679396183321763400.sql diff --git a/data/sql/updates/pending_db_world/rev_1679396183321763400.sql b/data/sql/updates/pending_db_world/rev_1679396183321763400.sql new file mode 100644 index 000000000..3fa1a4799 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679396183321763400.sql @@ -0,0 +1,14 @@ +-- +DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (3262,3263,3264,3265,3266,3267,5000,5001,5002,5003,5004,5005,5006,5007,5008); + +DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (57570,57579,57581,39529,57757,57728,56908,56910,57598); +INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES +(57570, 57570, 59126, 0, 0), +(57579, 57579, 59127, 0, 0), +(57581, 57581, 59128, 0, 0), +(39529, 39529, 58940, 0, 0), +(57757, 57757, 58936, 0, 0), +(57728, 57728, 58947, 0, 0), +(56908, 56908, 58956, 0, 0), +(56910, 56910, 58957, 0, 0), +(57598, 57598, 58964, 0, 0); From d6c7e9f630ad0db062087a498c0e3e77f4829fdb Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:27:00 +0200 Subject: [PATCH 08/17] fix(Scripts/Zangarmarsh): Move zangarmarsh npcs to SAI (#15504) * fix(DB/SAI): Move Ashyen & Keleth to SAI. Co-authored-by: offl * Delete rev_1679303594025981500.sql * fix(Scripts/Zone): Move zangarmarsh npcs to SAI. Co-Authored-By: Alli <6288119+aletson@users.noreply.github.com> Co-Authored-By: Faq <322016+Faq@users.noreply.github.com> Co-Authored-By: offl <11556157+offl@users.noreply.github.com> * Add Healing Touch * " -> ' * update * Use player_distance instead of invoker * remove script_waypoints --------- Co-authored-by: offl Co-authored-by: Alli <6288119+aletson@users.noreply.github.com> Co-authored-by: Faq <322016+Faq@users.noreply.github.com> Co-authored-by: offl <11556157+offl@users.noreply.github.com> --- .../rev_1679307378050076600.sql | 154 +++++++++ .../scripts/Outland/outland_script_loader.cpp | 4 +- .../scripts/Outland/zone_zangarmarsh.cpp | 325 ------------------ 3 files changed, 156 insertions(+), 327 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1679307378050076600.sql delete mode 100644 src/server/scripts/Outland/zone_zangarmarsh.cpp diff --git a/data/sql/updates/pending_db_world/rev_1679307378050076600.sql b/data/sql/updates/pending_db_world/rev_1679307378050076600.sql new file mode 100644 index 000000000..9a29ee866 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679307378050076600.sql @@ -0,0 +1,154 @@ +-- Coosh'coosh (18586) +-- Co-authored-by: aletson https://github.com/TrinityCore/TrinityCore/pull/20773 +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 18586; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=18586 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18586, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3000, 3000, 0, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - In Combat - Cast \'Lightning Bolt\''), +(18586, 0, 1, 2, 62, 0, 100, 0, 7730, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Close Gossip'), +(18586, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 2, 45, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Set Faction Ogre'), +(18586, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Say Line 0'), +(18586, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Start Attacking'), +(18586, 0, 5, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Reset - Set Default Faction'), +(18586, 0, 6, 0, 23, 0, 100, 0, 12550, 0, 10000, 10000, 0, 11, 12550, 64, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Missing Buff - Cast Lightning Shield'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7730; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7730, 0, 0, 0, 9, 0, 10009, 0, 0, 0, 0, 0, '', 'Coosh\'coosh - Show gossip menu 7730 option id 0 if quest Crackin\' Some Skulls has been taken.'); + +-- Mortog Steamhead (23373) +-- Co-authored-by: tkrokli https://github.com/TrinityCore/TrinityCore/commit/0c6eeb3abc54dbc0f147e5098619e8e19e27accd +UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry`= 23373; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 8692; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8692,0,0,0,5,0,942,128,0,0,0,0,'', 'Mortog Steamhead - Show gossip menu 8692 option id 0 if player is Exalted with Cenarion Expedition.'); + +-- Timothy Daniels (18019) +-- Co-authored-by: tkrokli https://github.com/TrinityCore/TrinityCore/commit/e2f395863a7fb1a85dc7d09f2692198faae16f46 +UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry` = 18019; + +-- Elder Kuruti (18197) +-- Co-authored-by: aletson https://github.com/TrinityCore/TrinityCore/pull/20430 +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 18197; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 18197 AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(18197, 0, 0, 0, 62, 0, 100, 0, 7585, 0, 0, 0, 11, 32152, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elder Kuruti - On Gossip Option 0 Selected - Cast \'Serverside - Summon Elder Kuruti`s Response\''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7582; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,7582,0,0,1,8,0,9803,0,0,1,0,'','Elder Kuruti - Show gossip menu 7582 option id 0 if Quest 9803 is not rewarded'), +(15,7582,0,0,1,9,0,9803,0,0,0,0,'','Elder Kuruti -Show gossip menu 7582 option id 0 if Quest 9803 is taken'), +(15,7582,0,0,1,2,0,24573,1,0,1,0,'','Elder Kuruti - Show gossip menu 7582 option id 0 if player does not have item 24573 in inventory'); + +-- Escape from Umbrafen - Slavebinder(18042) & Kayra Longmane(17969) +-- Co-authored-by: Faq +-- Co-authored-by: offl https://github.com/Faq/TrinityCore/commit/2219319d5a5a3e04e81548d23efaa177879bbb29 + +-- Creature_text +DELETE FROM `creature_text` WHERE `CreatureID`=18042; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(18042, 0, 0, 'You won\'t escape us, druid!', 12, 0, 100, 0, 0, 0, 14731, 0, 'Slavebinder'); + +DELETE FROM `creature_text` WHERE `CreatureID`=17969; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17969, 0, 0, 'Is the way clear? Let\'s get out while we can, $n.', 12, 0, 100, 0, 0, 0, 14724, 0, 'Kayra Longmane'), +(17969, 1, 0, 'Looks like we won\'t get away so easily. Get ready!', 12, 0, 100, 0, 0, 0, 14725, 0, 'Kayra Longmane'), +(17969, 2, 0, 'Let\'s keep moving. We\'re not safe here!', 12, 0, 100, 0, 0, 0, 14726, 0, 'Kayra Longmane'), +(17969, 3, 0, 'Look out, $n! Enemies ahead!', 12, 0, 100, 0, 0, 0, 14727, 0, 'Kayra Longmane'), +(17969, 4, 0, 'We\'re almost to the refuge! Let\'s go.', 12, 0, 100, 0, 0, 0, 14728, 0, 'Kayra Longmane'), +(17969, 5, 0, 'I can see my fellow druids from here. Thank you, $n. I\'m sure Ysiel will reward you for your actions!', 12, 0, 100, 0, 0, 0, 14729, 0, 'Kayra Longmane'); + +-- Slavebinder +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 18042; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 18042 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 1804200 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18042, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 80, 1804200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Umbrafen Slavebinder - On Just Summoned - Run Script'), +(1804200, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 17969, 0, 0, 0, 0, 0, 0, 0, 'Umbrafen Slavebinder - On Script - Start Attacking Closest Creature \'Kayra Longmane\''); + +-- Kayra Longmane +DELETE FROM `script_waypoint` WHERE `entry`=17969; + +DELETE FROM `waypoints` WHERE `entry` = 17969; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(17969,1,-930.049,5288.08,23.8484,'Kayra Longmane'), +(17969,2,-925.678,5296.48,18.1837,'Kayra Longmane'), +(17969,3,-924.297,5299.02,17.7109,'Kayra Longmane'), +(17969,4,-928.39,5317.02,18.2086,'Kayra Longmane'), +(17969,5,-930.621,5329.92,18.7734,'Kayra Longmane'), +(17969,6,-931.49,5357.65,18.0272,'Kayra Longmane'), +(17969,7,-934.778,5369.34,22.278,'Kayra Longmane'), +(17969,8,-934.522,5373.41,22.8347,'Kayra Longmane'), +(17969,9,-937.009,5382.98,22.6991,'Kayra Longmane'), +(17969,10,-941.948,5404.14,22.6697,'Kayra Longmane'), +(17969,11,-931.244,5415.85,23.064,'Kayra Longmane'), +(17969,12,-901.498,5420.32,24.2133,'Kayra Longmane'), +(17969,13,-860.312,5415.62,23.6711,'Kayra Longmane'), +(17969,14,-777.989,5391.98,23.0017,'Kayra Longmane'), +(17969,15,-750.362,5385.79,22.7658,'Kayra Longmane'), +(17969,16,-731.339,5382.45,22.5171,'Kayra Longmane'), +(17969,17,-681.236,5381.38,22.0502,'Kayra Longmane'), +(17969,18,-637.944,5384.34,22.2056,'Kayra Longmane'), +(17969,19,-608.954,5408.72,21.6304,'Kayra Longmane'), +(17969,20,-598.134,5413.61,21.4123,'Kayra Longmane'), +(17969,21,-571.269,5420.77,21.1849,'Kayra Longmane'), +(17969,22,-553.1,5424.62,21.1937,'Kayra Longmane'), +(17969,23,-524.745,5443.95,20.977,'Kayra Longmane'), +(17969,24,-502.985,5446.28,22.1494,'Kayra Longmane'), +(17969,25,-472.464,5449.55,22.5615,'Kayra Longmane'), +(17969,26,-454.533,5461.3,22.6028,'Kayra Longmane'); + +-- Summon groups +DELETE FROM `creature_summon_groups` WHERE `summonerId` = 17969; +INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES +(17969,0,0,18042,-916.4861,5355.635,18.25233,5.0,1,60000), +(17969,0,0,18042,-918.9288,5358.430,18.05894,5.0,1,60000), +(17969,0,1,18042,-668.2899,5382.913,22.32479,5.0,1,60000), +(17969,0,1,18042,-669.2795,5386.802,23.01249,5.0,1,60000); + +SET @ID := 17969; +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ID; +UPDATE `creature_template_addon` SET `bytes1`=0 WHERE `entry` = @ID; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @ID AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN @ID*100+0 AND @ID*100+5 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ID,0,0,11,19,0,100,0,9752,0,0,0,0,80,@ID*100+0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Quest \'Escape from Umbrafen\' Taken - Run Script'), +(@ID,0,1,0,40,0,100,0,5,0,0,0,0,80,@ID*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Waypoint 5 Reached - Run Script'), +(@ID,0,2,0,40,0,100,0,6,0,0,0,0,80,@ID*100+2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Waypoint 6 Reached - Run Script'), +(@ID,0,3,0,40,0,100,0,17,0,0,0,0,80,@ID*100+3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Waypoint 17 Reached - Run Script'), +(@ID,0,4,0,40,0,100,0,18,0,0,0,0,80,@ID*100+4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Waypoint 18 Reached - Run Script'), +(@ID,0,5,0,40,0,100,0,26,0,0,0,0,80,@ID*100+5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Waypoint 26 Reached - Run Script'), +(@ID,0,6,0,6,0,100,0,0,0,0,0,0,6,9752,0,0,0,0,0,16,0,0,0,0,0,0,0,0,'Kayra Longmane - On Death - Fail Quest \'Escape from Umbrafen\''), +(@ID,0,7,0,11,0,100,0,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On spawn - Set Flag Standstate Kneel'), +(@ID,0,8,0,0,0,100,0,1000,2000,2000,3000,0,11,9739,64,0,0,0,0,2,0,0,0,0,0,0,0,0,'Kayra Longmane - In Combat - Cast Wrath'), +(@ID,0,9,0,0,0,100,0,5000,6000,6000,7000,0,11,31401,64,0,0,0,0,2,0,0,0,0,0,0,0,0,'Kayra Longmane - In Combat - Cast Moonfire'), +(@ID, 0, 10, 0, 74, 1, 100, 0, 0, 25, 8000, 15000, 0, 11, 23381, 64, 0, 0, 0, 0, 18, 25, 0, 0, 0, 0, 0, 0, 0, 'Kayra Longmane - On Friendly Between 0-25% Health (Range: 25) - Cast \'Healing Touch\' (Phase 1)'), +(@ID, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kayra Longmane - On Quest \'Escape from Umbrafen\' Taken - Set Event Phase 1'), +(@ID*100+0,9,0,0,0,0,100,0,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Store Targetlist'), +(@ID*100+0,9,1,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 0'), +(@ID*100+0,9,2,0,0,0,100,0,0,0,0,0,0,2,495,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Set Faction 495'), +(@ID*100+0,9,3,0,0,0,100,0,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Remove NPC Flag Questgiver'), +(@ID*100+0,9,4,0,0,0,100,0,3000,3000,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Remove Flag Standstate Kneel'), +(@ID*100+0,9,5,0,0,0,100,0,0,0,0,0,0,53,0,17969,0,0,0,2,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Start Waypoint'), +-- Seems like with no time and resume when all creatures are killed +(@ID*100+1,9,0,0,0,0,100,0,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Pause Waypoint'), +(@ID*100+1,9,1,0,0,0,100,0,0,0,0,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 1'), +(@ID*100+1,9,2,0,0,0,100,0,2000,2000,0,0,0,107,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Summon Group 0'), +(@ID*100+1,9,3,0,0,0,100,0,1000,1000,0,0,0,1,0,0,0,0,0,0,19,18042,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say text'), +(@ID*100+2,9,0,0,0,0,100,0,0,0,0,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Pause Waypoint'), +(@ID*100+2,9,1,0,0,0,100,0,4000,4000,0,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 2'), +(@ID*100+2,9,2,0,0,0,100,0,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Set Run On'), +-- Seems like with no time and resume when all creatures are killed +(@ID*100+3,9,0,0,0,0,100,0,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Pause Waypoint'), +(@ID*100+3,9,1,0,0,0,100,0,3000,3000,0,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 3'), +(@ID*100+3,9,2,0,0,0,100,0,2000,2000,0,0,0,107,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Summon Group 1'), +(@ID*100+3,9,3,0,0,0,100,0,1000,1000,0,0,0,1,0,0,0,0,0,0,19,18042,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say text'), +(@ID*100+4,9,0,0,0,0,100,0,0,0,0,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Pause Waypoint'), +(@ID*100+4,9,1,0,0,0,100,0,1000,1000,0,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 4'), +(@ID*100+5,9,0,0,0,0,100,0,0,0,0,0,0,54,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Pause Waypoint'), +(@ID*100+5,9,1,0,0,0,100,0,0,0,0,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Say Line 5'), +(@ID*100+5,9,2,0,0,0,100,0,0,0,0,0,0,15,9752,0,0,0,0,0,16,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Quest Credit \'Escape from Umbrafen\''), +(@ID*100+5,9,3,0,0,0,100,0,0,0,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kayra Longmane - On Script - Despawn (10000)'), +(@ID*100+5, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kayra Longmane - Actionlist - Set Event Phase 0'); diff --git a/src/server/scripts/Outland/outland_script_loader.cpp b/src/server/scripts/Outland/outland_script_loader.cpp index 86be80f95..976a507d8 100644 --- a/src/server/scripts/Outland/outland_script_loader.cpp +++ b/src/server/scripts/Outland/outland_script_loader.cpp @@ -107,7 +107,7 @@ void AddSC_netherstorm(); void AddSC_shadowmoon_valley(); void AddSC_shattrath_city(); void AddSC_terokkar_forest(); -void AddSC_zangarmarsh(); +//void AddSC_zangarmarsh(); // The name of this function should match: // void Add${NameOfDirectory}Scripts() @@ -204,5 +204,5 @@ void AddOutlandScripts() AddSC_shadowmoon_valley(); AddSC_shattrath_city(); AddSC_terokkar_forest(); - AddSC_zangarmarsh(); + //AddSC_zangarmarsh(); } diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp deleted file mode 100644 index f9bef01d0..000000000 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ /dev/null @@ -1,325 +0,0 @@ -/* - * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by the - * Free Software Foundation; either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" - -/*###### -## npc_cooshcoosh -######*/ - -#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!" - -enum Cooshhooosh -{ - SPELL_LIGHTNING_BOLT = 9532, - QUEST_CRACK_SKULLS = 10009 -}; - -class npc_cooshcoosh : public CreatureScript -{ -public: - npc_cooshcoosh() : CreatureScript("npc_cooshcoosh") { } - - struct npc_cooshcooshAI : public ScriptedAI - { - npc_cooshcooshAI(Creature* creature) : ScriptedAI(creature) - { - m_uiNormFaction = creature->GetFaction(); - } - - uint32 m_uiNormFaction; - uint32 LightningBolt_Timer; - - void Reset() override - { - LightningBolt_Timer = 2000; - if (me->GetFaction() != m_uiNormFaction) - me->SetFaction(m_uiNormFaction); - } - - void JustEngagedWith(Unit* /*who*/) override { } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - if (LightningBolt_Timer <= diff) - { - DoCastVictim(SPELL_LIGHTNING_BOLT); - LightningBolt_Timer = 5000; - } - else LightningBolt_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_cooshcooshAI(creature); - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - SendGossipMenuFor(player, 9441, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_INFO_DEF) - { - CloseGossipMenuFor(player); - creature->SetFaction(FACTION_OGRE); - creature->AI()->AttackStart(player); - } - return true; - } -}; - -/*###### -## npc_elder_kuruti -######*/ - -#define GOSSIP_ITEM_KUR1 "Greetings, elder. It is time for your people to end their hostility towards the draenei and their allies." -#define GOSSIP_ITEM_KUR2 "I did not mean to deceive you, elder. The draenei of Telredor thought to approach you in a way that would seem familiar to you." -#define GOSSIP_ITEM_KUR3 "I will tell them. Farewell, elder." - -class npc_elder_kuruti : public CreatureScript -{ -public: - npc_elder_kuruti() : CreatureScript("npc_elder_kuruti") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - SendGossipMenuFor(player, 9226, creature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, 9227, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - SendGossipMenuFor(player, 9229, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - if (!player->HasItemCount(24573)) - { - ItemPosCountVec dest; - uint32 itemId = 24573; - InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1, nullptr); - if (msg == EQUIP_ERR_OK) - { - player->StoreNewItem(dest, itemId, true); - } - else - player->SendEquipError(msg, nullptr, nullptr, itemId); - } - SendGossipMenuFor(player, 9231, creature->GetGUID()); - break; - } - } - return true; - } -}; - -/*###### -## npc_mortog_steamhead -######*/ -class npc_mortog_steamhead : public CreatureScript -{ -public: - npc_mortog_steamhead() : CreatureScript("npc_mortog_steamhead") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsVendor() && player->GetReputationRank(942) == REP_EXALTED) - AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - return true; - } -}; - -/*###### -## npc_kayra_longmane -######*/ - -enum Kayra -{ - SAY_START = 0, - SAY_AMBUSH1 = 1, - SAY_PROGRESS = 2, - SAY_AMBUSH2 = 3, - SAY_END = 4, - - QUEST_ESCAPE_FROM = 9752, - NPC_SLAVEBINDER = 18042 -}; - -class npc_kayra_longmane : public CreatureScript -{ -public: - npc_kayra_longmane() : CreatureScript("npc_kayra_longmane") { } - - struct npc_kayra_longmaneAI : public npc_escortAI - { - npc_kayra_longmaneAI(Creature* creature) : npc_escortAI(creature) { } - - void Reset() override { } - - void WaypointReached(uint32 waypointId) override - { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) - { - case 4: - Talk(SAY_AMBUSH1, player); - DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 5: - Talk(SAY_PROGRESS, player); - SetRun(); - break; - case 16: - Talk(SAY_AMBUSH2, player); - DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 17: - SetRun(false); - break; - case 25: - Talk(SAY_END, player); - player->GroupEventHappens(QUEST_ESCAPE_FROM, me); - break; - } - } - }; - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_ESCAPE_FROM) - { - creature->AI()->Talk(SAY_START, player); - - if (npc_escortAI* pEscortAI = CAST_AI(npc_kayra_longmane::npc_kayra_longmaneAI, creature->AI())) - pEscortAI->Start(false, false, player->GetGUID()); - } - return true; - } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_kayra_longmaneAI(creature); - } -}; - -/*###### -## npc_timothy_daniels -######*/ - -#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?" -#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies." - -enum Timothy -{ - GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239 -}; - -class npc_timothy_daniels : public CreatureScript -{ -public: - npc_timothy_daniels() : CreatureScript("npc_timothy_daniels") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsVendor()) - AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - SendGossipMenuFor(player, GOSSIP_TEXTID_TIMOTHY_DANIELS1, creature->GetGUID()); - break; - case GOSSIP_ACTION_TRADE: - player->GetSession()->SendListInventory(creature->GetGUID()); - break; - } - - return true; - } -}; - -/*###### -## AddSC -######*/ - -void AddSC_zangarmarsh() -{ - // Theirs - new npc_cooshcoosh(); - new npc_elder_kuruti(); - new npc_mortog_steamhead(); - new npc_kayra_longmane(); - new npc_timothy_daniels(); -} From 4273b8dadd91fcb4764dd57ac7da9a57fd2038fe Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 21 Mar 2023 21:29:43 +0000 Subject: [PATCH 09/17] chore(DB): import pending files Referenced commit(s): d6c7e9f630ad0db062087a498c0e3e77f4829fdb --- .../rev_1679307378050076600.sql => db_world/2023_03_21_05.sql} | 1 + .../rev_1679396183321763400.sql => db_world/2023_03_21_06.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1679307378050076600.sql => db_world/2023_03_21_05.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1679396183321763400.sql => db_world/2023_03_21_06.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1679307378050076600.sql b/data/sql/updates/db_world/2023_03_21_05.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1679307378050076600.sql rename to data/sql/updates/db_world/2023_03_21_05.sql index 9a29ee866..c91a4c1f2 100644 --- a/data/sql/updates/pending_db_world/rev_1679307378050076600.sql +++ b/data/sql/updates/db_world/2023_03_21_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_21_04 -> 2023_03_21_05 -- Coosh'coosh (18586) -- Co-authored-by: aletson https://github.com/TrinityCore/TrinityCore/pull/20773 UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 18586; diff --git a/data/sql/updates/pending_db_world/rev_1679396183321763400.sql b/data/sql/updates/db_world/2023_03_21_06.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1679396183321763400.sql rename to data/sql/updates/db_world/2023_03_21_06.sql index 3fa1a4799..49d77a226 100644 --- a/data/sql/updates/pending_db_world/rev_1679396183321763400.sql +++ b/data/sql/updates/db_world/2023_03_21_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_21_05 -> 2023_03_21_06 -- DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (3262,3263,3264,3265,3266,3267,5000,5001,5002,5003,5004,5005,5006,5007,5008); From ed31c22cc5fdc0a43882ad9b1a769777941ddd89 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:30:43 +0100 Subject: [PATCH 10/17] fix(Core/Gossip): Do not close gossip on target deselection. (#15457) Fixes #12399 --- src/server/game/Handlers/MiscHandler.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 4d14585a2..7146fea21 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -538,16 +538,6 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket& recv_data) ObjectGuid guid; recv_data >> guid; - if (!guid) - { - // Clear any active gossip related to current selection if not present at player's client - GossipMenu& gossipMenu = _player->PlayerTalkClass->GetGossipMenu(); - if (gossipMenu.GetSenderGUID() == _player->GetTarget()) - { - _player->PlayerTalkClass->SendCloseGossip(); - } - } - _player->SetSelection(guid); // Change target of current autoshoot spell From 2e4d19a42f50b6696bc7d2b88785c618c45a0b39 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:32:39 +0200 Subject: [PATCH 11/17] fix(Core/Spells): Add more exceptions to Aura of Despair. (#15231) * fix(Core/Spells): Add more exceptions to Aura of Despair. * Remove mana shield, works on Animus aoe... Probably needs more work to proc only on searing flames, and not on profound darkness. --- src/server/game/Entities/Unit/Unit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e7acdae40..8ef65f6da 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -21385,15 +21385,20 @@ bool Unit::CanRestoreMana(SpellInfo const* spellInfo) const // Aura of Despair exceptions switch (spellInfo->Id) { + case 16666: // Demonic Rune + case 27869: // Dark Rune case 30824: // Shamanistic Rage case 31786: // Spiritual Attunement case 31930: // Judgements of the Wise case 34075: // Aspect of the Viper case 34720: // Thrill of the hunt case 47755: // Rapture + case 54425: // Improved Felhunter + case 57319: // Blessing of Sanctuary case 63337: // Saronite Vapors (regenerate mana) case 63375: // Improved stormstrike case 64372: // Lifebloom + case 68285: // Improved Leader of the Pack return true; case 54428: // Divine Plea - only with talent Guarded by the Light return HasSpell(53583); From e3e321bf2ab9148de9e18efac2c18fa2aafe3933 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:56:14 -0300 Subject: [PATCH 12/17] fix(DB/Creature): Correct Onkill Reputation for Mechanar and Arcatraz (#15532) Create rev_1679445688489984800.sql --- .../rev_1679445688489984800.sql | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679445688489984800.sql diff --git a/data/sql/updates/pending_db_world/rev_1679445688489984800.sql b/data/sql/updates/pending_db_world/rev_1679445688489984800.sql new file mode 100644 index 000000000..ae5e68137 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679445688489984800.sql @@ -0,0 +1,57 @@ +-- +DELETE FROM `creature_onkill_reputation` WHERE (`creature_id` IN (20481,21538,20478,21521,20865,21607,21303,21592,21304,21623,21395,21609,19712,19716,19735,21543,21522,21523,21524,21539,21540,21541,21527,21528,21532,21531,21542,20864,20866,20867,20869,20875,20873,20879,20883,20881,20882,20902,20901,20898,20900,21587,21585,21608,21614,21591,21593,21586,21604,21605,21594,21595,21615,21619,21613,21596,21597,22346,21610,21611,21598,21621)); +INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES +-- Mechanar Normal +(19712, 935, 0, 7, 0, 12, 0, 0, 0, 0), +(19716, 935, 0, 7, 0, 6, 0, 0, 0, 0), +(19735, 935, 0, 7, 0, 24, 0, 0, 0, 0), +-- Mechanar Heroic +(21543, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21522, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21523, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21524, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21539, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21540, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21541, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21527, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21528, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21532, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21531, 935, 0, 7, 0, 7.5, 0, 0, 0, 0), +(21542, 935, 0, 7, 0, 30, 0, 0, 0, 0), +-- Arcatraz Normal +(20864, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20866, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20867, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20869, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20875, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20873, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20879, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20883, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20881, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20882, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20902, 935, 0, 7, 0, 18, 0, 0, 0, 0), +(20901, 935, 0, 7, 0, 18, 0, 0, 0, 0), +(20898, 935, 0, 7, 0, 24, 0, 0, 0, 0), +(20900, 935, 0, 7, 0, 24, 0, 0, 0, 0), +-- Arcatraz Heroic +(21587, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21585, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21608, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21614, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21591, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21593, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21586, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21604, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21605, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21594, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21595, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21615, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21619, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21613, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21596, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(21597, 935, 0, 7, 0, 15, 0, 0, 0, 0), +(22346, 935, 0, 7, 0, 12, 0, 0, 0, 0), -- Yes, 12 +(21610, 935, 0, 7, 0, 22.5, 0, 0, 0, 0), +(21611, 935, 0, 7, 0, 22.5, 0, 0, 0, 0), +(21598, 935, 0, 7, 0, 30, 0, 0, 0, 0), +(21621, 935, 0, 7, 0, 30, 0, 0, 0, 0); From f1ac2b43612fe923ec8dd3146c5b20b70f7a5305 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 22 Mar 2023 01:58:47 +0000 Subject: [PATCH 13/17] chore(DB): import pending files Referenced commit(s): e3e321bf2ab9148de9e18efac2c18fa2aafe3933 --- .../rev_1679445688489984800.sql => db_world/2023_03_22_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1679445688489984800.sql => db_world/2023_03_22_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1679445688489984800.sql b/data/sql/updates/db_world/2023_03_22_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1679445688489984800.sql rename to data/sql/updates/db_world/2023_03_22_00.sql index ae5e68137..91415c7da 100644 --- a/data/sql/updates/pending_db_world/rev_1679445688489984800.sql +++ b/data/sql/updates/db_world/2023_03_22_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_21_06 -> 2023_03_22_00 -- DELETE FROM `creature_onkill_reputation` WHERE (`creature_id` IN (20481,21538,20478,21521,20865,21607,21303,21592,21304,21623,21395,21609,19712,19716,19735,21543,21522,21523,21524,21539,21540,21541,21527,21528,21532,21531,21542,20864,20866,20867,20869,20875,20873,20879,20883,20881,20882,20902,20901,20898,20900,21587,21585,21608,21614,21591,21593,21586,21604,21605,21594,21595,21615,21619,21613,21596,21597,22346,21610,21611,21598,21621)); INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES From 8b8883d2770f51418a400d9b20d3e0baf33f1d51 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:05:49 +0200 Subject: [PATCH 14/17] fix(DB/SAI): Brazen & Erozion having wrong gossips. (#15521) fix(DB/SAI): Brazen & Erozion having wrong gossips --- .../rev_1679350928099099300.sql | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679350928099099300.sql diff --git a/data/sql/updates/pending_db_world/rev_1679350928099099300.sql b/data/sql/updates/pending_db_world/rev_1679350928099099300.sql new file mode 100644 index 000000000..aa496fc6c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679350928099099300.sql @@ -0,0 +1,27 @@ +-- Brazen (18725) +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 18725; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18725, 0, 0, 1, 62, 0, 100, 0, 7959, 0, 0, 0, 0, 11, 32892, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Brazen - On Gossip Option 0 Selected - Cast \'Brazen Taxi\''), +(18725, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Brazen - On Linked Actions - Close Gossip'), +(18725, 0, 2, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Brazen - On Data Set - Talk (Invoker)'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=7959; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 7959, 9779, 0, 0, 2, 0, 25853, 1, 0, 0, 0, 0, '', 'Brazen - Show gossip menu text if player has item 25853'), +(14, 7959, 9780, 0, 0, 2, 0, 25853, 1, 0, 1, 0, 0, '', 'Brazen - Show gossip menu text if player does not have item 25853'), +(15, 7959, 0, 0, 0, 2, 0, 25853, 1, 0, 0, 0, 0, '', 'Brazen - Show gossip option 0 if player has item 25853'); + +-- Erozion (18723) +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 18723; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18723, 0, 0, 1, 62, 0, 100, 512, 7769, 0, 0, 0, 0, 56, 25853, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Erozion - On Gossip Option 0 Selected - Add Item \'Pack of Incendiary Bombs\''), +(18723, 0, 1, 2, 61, 0, 100, 512, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Erozion - On Gossip Option 0 Selected - Close Gossip'), +(18723, 0, 2, 4, 61, 0, 100, 512, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Erozion - On Gossip Option 0 Selected - Store Targetlist'), +(18723, 0, 3, 4, 19, 0, 100, 512, 10283, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Erozion - On Quest \'Taretha\'s Diversion\' Taken - Store Targetlist'), +(18723, 0, 4, 5, 61, 0, 100, 512, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 18725, 20, 0, 0, 0, 0, 0, 0, 'Erozion - On Gossip Option 0 Selected - Send Target 1'), +(18723, 0, 5, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 18725, 20, 0, 0, 0, 0, 0, 0, 'Erozion - On Gossip Option 0 Selected - Set Data 1 1'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup`=7769; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7769, 0, 0, 0, 2, 0, 25853, 1, 0, 1, 0, 0, '', '(AND) Erozion - Show gossip menu option if player doesn\'t have item 25853'), +(15, 7769, 0, 0, 0, 47, 0, 10283, 74, 0, 0, 0, 0, '', '(AND) Erozion - Show gossip menu option if quest 10283 has been rewarded or incomplete.'); From 35195a6eef1c076075a035da5e4b527d33541d5b Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 22 Mar 2023 10:06:32 +0100 Subject: [PATCH 15/17] =?UTF-8?q?refactor(Scripts/Item):=20Make=20Goblin?= =?UTF-8?q?=20Weather=20Machiene=20script=20more=20read=E2=80=A6=20(#15467?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(Scripts/Item): Make Goblin Weather Machiene script more readable * need to validate spells ofc * initialize the var to make ci happy --- .../rev_1679187240830246700.sql | 9 +++ src/server/scripts/Spells/spell_item.cpp | 59 ++++++++++++++----- 2 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1679187240830246700.sql diff --git a/data/sql/updates/pending_db_world/rev_1679187240830246700.sql b/data/sql/updates/pending_db_world/rev_1679187240830246700.sql new file mode 100644 index 000000000..427d6ca71 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679187240830246700.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_item_goblin_weather_machine'; +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_item_goblin_weather_machine_aura'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(46203, 'spell_item_goblin_weather_machine'), +(46736, 'spell_item_goblin_weather_machine_aura'), +(46738, 'spell_item_goblin_weather_machine_aura'), +(46739, 'spell_item_goblin_weather_machine_aura'), +(46740, 'spell_item_goblin_weather_machine_aura'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 973c38622..a8dd7acd2 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -811,6 +811,44 @@ class spell_item_gnomish_shrink_ray : public SpellScript } }; +enum GoblinWeatherMachiene +{ + SPELL_PERSONALIZED_WEATHER_RAIN = 46736, + SPELL_PERSONALIZED_WEATHER_SNOW = 46738, + SPELL_PERSONALIZED_WEATHER_SUN = 46739, + SPELL_PERSONALIZED_WEATHER_CLOUDS = 46740 +}; + +uint32 WeatherForcast() +{ + if (!SpellScript::ValidateSpellInfo({ + SPELL_PERSONALIZED_WEATHER_RAIN, + SPELL_PERSONALIZED_WEATHER_SNOW, + SPELL_PERSONALIZED_WEATHER_SUN, + SPELL_PERSONALIZED_WEATHER_CLOUDS + })) + return 0; + + uint32 spellId = 0; + switch (urand(0, 3)) + { + case 0: + spellId = SPELL_PERSONALIZED_WEATHER_RAIN; + break; + case 1: + spellId = SPELL_PERSONALIZED_WEATHER_SNOW; + break; + case 2: + spellId = SPELL_PERSONALIZED_WEATHER_SUN; + break; + case 3: + spellId = SPELL_PERSONALIZED_WEATHER_CLOUDS; + break; + } + + return spellId; +} + class spell_item_goblin_weather_machine : public SpellScript { PrepareSpellScript(spell_item_goblin_weather_machine); @@ -819,18 +857,13 @@ class spell_item_goblin_weather_machine : public SpellScript { if (Unit* target = GetHitUnit()) { - uint32 spellId = 46736; - if (uint8 add = urand(0, 3)) - spellId += add + 1; - - target->CastSpell(target, spellId, true); + target->CastSpell(target, WeatherForcast(), true); } } void Register() override { - if (m_scriptSpellId == 46203) - OnEffectHitTarget += SpellEffectFn(spell_item_goblin_weather_machine::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffectHitTarget += SpellEffectFn(spell_item_goblin_weather_machine::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -843,17 +876,12 @@ class spell_item_goblin_weather_machine_aura : public AuraScript if (roll_chance_i(50)) return; - uint32 spellId = 46736; - if (uint8 add = urand(0, 3)) - spellId += add + 1; - - GetUnitOwner()->CastSpell(GetUnitOwner(), spellId, true); + GetUnitOwner()->CastSpell(GetUnitOwner(), WeatherForcast(), true); } void Register() override { - if (m_scriptSpellId != 46203) - AfterEffectRemove += AuraEffectRemoveFn(spell_item_goblin_weather_machine_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_item_goblin_weather_machine_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; @@ -3845,7 +3873,8 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_strong_anti_venom); RegisterSpellScript(spell_item_anti_venom); RegisterSpellScript(spell_item_gnomish_shrink_ray); - RegisterSpellAndAuraScriptPair(spell_item_goblin_weather_machine, spell_item_goblin_weather_machine_aura); + RegisterSpellScript(spell_item_goblin_weather_machine); + RegisterSpellScript(spell_item_goblin_weather_machine_aura); RegisterSpellScript(spell_item_light_lamp); RegisterSpellScript(spell_item_fetch_ball); RegisterSpellScript(spell_item_oracle_ablutions); From 7c1cab38616ce729544dae6c143bde2d073816ad Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 22 Mar 2023 10:07:00 +0100 Subject: [PATCH 16/17] =?UTF-8?q?fix(DB/SAI):=20Eyeless=20Watcher=20and=20?= =?UTF-8?q?Unseen=20Servant=20use=20Greater=20Invisibil=E2=80=A6=20(#15456?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Eyeless Watcher and Unseen Servant use Greater Invisibility. Fixes #12403 --- data/sql/updates/pending_db_world/rev_1679150777005298100.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679150777005298100.sql diff --git a/data/sql/updates/pending_db_world/rev_1679150777005298100.sql b/data/sql/updates/pending_db_world/rev_1679150777005298100.sql new file mode 100644 index 000000000..b2c99700c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679150777005298100.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param1`=16380 WHERE `entryorguid` IN (8539,8538) AND `source_type`=0 AND `id`=2; From 2f52fc9a85cdb0f31eb7e66715e489e3c833d829 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 22 Mar 2023 09:09:43 +0000 Subject: [PATCH 17/17] chore(DB): import pending files Referenced commit(s): 7c1cab38616ce729544dae6c143bde2d073816ad --- .../rev_1679150777005298100.sql => db_world/2023_03_22_01.sql} | 1 + .../rev_1679187240830246700.sql => db_world/2023_03_22_02.sql} | 1 + .../rev_1679350928099099300.sql => db_world/2023_03_22_03.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1679150777005298100.sql => db_world/2023_03_22_01.sql} (73%) rename data/sql/updates/{pending_db_world/rev_1679187240830246700.sql => db_world/2023_03_22_02.sql} (92%) rename data/sql/updates/{pending_db_world/rev_1679350928099099300.sql => db_world/2023_03_22_03.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1679150777005298100.sql b/data/sql/updates/db_world/2023_03_22_01.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1679150777005298100.sql rename to data/sql/updates/db_world/2023_03_22_01.sql index b2c99700c..c1c232225 100644 --- a/data/sql/updates/pending_db_world/rev_1679150777005298100.sql +++ b/data/sql/updates/db_world/2023_03_22_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_22_00 -> 2023_03_22_01 -- UPDATE `smart_scripts` SET `action_param1`=16380 WHERE `entryorguid` IN (8539,8538) AND `source_type`=0 AND `id`=2; diff --git a/data/sql/updates/pending_db_world/rev_1679187240830246700.sql b/data/sql/updates/db_world/2023_03_22_02.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1679187240830246700.sql rename to data/sql/updates/db_world/2023_03_22_02.sql index 427d6ca71..cb26d390b 100644 --- a/data/sql/updates/pending_db_world/rev_1679187240830246700.sql +++ b/data/sql/updates/db_world/2023_03_22_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_22_01 -> 2023_03_22_02 -- DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_item_goblin_weather_machine'; DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_item_goblin_weather_machine_aura'; diff --git a/data/sql/updates/pending_db_world/rev_1679350928099099300.sql b/data/sql/updates/db_world/2023_03_22_03.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1679350928099099300.sql rename to data/sql/updates/db_world/2023_03_22_03.sql index aa496fc6c..ccb015a0b 100644 --- a/data/sql/updates/pending_db_world/rev_1679350928099099300.sql +++ b/data/sql/updates/db_world/2023_03_22_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_22_02 -> 2023_03_22_03 -- Brazen (18725) DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 18725; INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES