From d63aba78bd145ba429be54c13a3dcc7c149cede3 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:40:41 +0200 Subject: [PATCH 01/15] refactor(Scripts/SSC): modernise Morogrim Tidewalker with BossAI (#17028) * fix ohf * revert * initial * make bench happy * make bench happier --- .../boss_morogrim_tidewalker.cpp | 184 ++++++++---------- .../SerpentShrine/serpent_shrine.h | 2 + 2 files changed, 82 insertions(+), 104 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 65c4aa659..34411df6a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -23,7 +23,7 @@ enum Yells { SAY_AGGRO = 0, SAY_SUMMON = 1, - SAY_SUMMON_BUBLE = 2, + SAY_SUMMON_BUBBLE = 2, SAY_SLAY = 3, SAY_DEATH = 4, EMOTE_WATERY_GRAVE = 5, @@ -47,120 +47,95 @@ enum Spells SPELL_SUMMON_WATER_GLOBULE_4 = 37861 }; -enum Misc +const uint32 wateryGraveIds[4] = {SPELL_WATERY_GRAVE_1, SPELL_WATERY_GRAVE_2, SPELL_WATERY_GRAVE_3, SPELL_WATERY_GRAVE_4}; +const uint32 waterGlobuleIds[4] = {SPELL_SUMMON_WATER_GLOBULE_1, SPELL_SUMMON_WATER_GLOBULE_2, SPELL_SUMMON_WATER_GLOBULE_3, SPELL_SUMMON_WATER_GLOBULE_4}; + +struct boss_morogrim_tidewalker : public BossAI { - // Creatures - NPC_WATER_GLOBULE = 21913, - NPC_TIDEWALKER_LURKER = 21920, - - EVENT_SPELL_TIDAL_WAVE = 1, - EVENT_SPELL_WATERY_GRAVE = 2, - EVENT_SPELL_EARTHQUAKE = 3, - EVENT_SUMMON_MURLOCS = 4, - EVENT_KILL_TALK = 5 -}; - -const uint32 wateryGraveId[4] = {SPELL_WATERY_GRAVE_1, SPELL_WATERY_GRAVE_2, SPELL_WATERY_GRAVE_3, SPELL_WATERY_GRAVE_4}; -const uint32 waterGlobuleId[4] = {SPELL_SUMMON_WATER_GLOBULE_1, SPELL_SUMMON_WATER_GLOBULE_2, SPELL_SUMMON_WATER_GLOBULE_3, SPELL_SUMMON_WATER_GLOBULE_4}; - -class boss_morogrim_tidewalker : public CreatureScript -{ -public: - boss_morogrim_tidewalker() : CreatureScript("boss_morogrim_tidewalker") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_morogrim_tidewalker(Creature* creature) : BossAI(creature, DATA_MOROGRIM_TIDEWALKER) { - return GetSerpentShrineAI(creature); + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } - struct boss_morogrim_tidewalkerAI : public BossAI + void Reset() override { - boss_morogrim_tidewalkerAI(Creature* creature) : BossAI(creature, DATA_MOROGRIM_TIDEWALKER) + BossAI::Reset(); + _recentlySpoken = false; + } + + void KilledUnit(Unit*) override + { + if (!_recentlySpoken) { + Talk(SAY_SLAY); + _recentlySpoken = true; } - void Reset() override + scheduler.Schedule(6s, [this](TaskContext) { - BossAI::Reset(); - } + _recentlySpoken = false; + }); + } - void KilledUnit(Unit*) override + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + summon->SetInCombatWithZone(); + } + + void JustDied(Unit* killer) override + { + Talk(SAY_DEATH); + BossAI::JustDied(killer); + } + + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + Talk(SAY_AGGRO); + + scheduler.Schedule(10s, [this](TaskContext context) { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) + DoCastVictim(SPELL_TIDAL_WAVE); + context.Repeat(20s); + }).Schedule(20s, [this](TaskContext context) + { + Talk(SAY_SUMMON_BUBBLE); + if (me->HealthAbovePct(25)) { - Talk(SAY_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); + Talk(EMOTE_WATERY_GRAVE); + me->CastCustomSpell(SPELL_WATERY_GRAVE, SPELLVALUE_MAX_TARGETS, 4, me, false); } - } - - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - summon->SetInCombatWithZone(); - } - - void JustDied(Unit* killer) override - { - Talk(SAY_DEATH); - BossAI::JustDied(killer); - } - - void JustEngagedWith(Unit* who) override - { - BossAI::JustEngagedWith(who); - Talk(SAY_AGGRO); - - events.ScheduleEvent(EVENT_SPELL_TIDAL_WAVE, 10000); - events.ScheduleEvent(EVENT_SPELL_WATERY_GRAVE, 28000); - events.ScheduleEvent(EVENT_SPELL_EARTHQUAKE, 40000); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - switch (events.ExecuteEvent()) + else { - case EVENT_SPELL_TIDAL_WAVE: - me->CastSpell(me->GetVictim(), SPELL_TIDAL_WAVE, false); - events.ScheduleEvent(EVENT_SPELL_TIDAL_WAVE, 20000); - break; - case EVENT_SPELL_WATERY_GRAVE: - Talk(SAY_SUMMON_BUBLE); - if (me->HealthAbovePct(25)) - { - Talk(EMOTE_WATERY_GRAVE); - me->CastCustomSpell(SPELL_WATERY_GRAVE, SPELLVALUE_MAX_TARGETS, 4, me, false); - } - else - { - Talk(EMOTE_WATERY_GLOBULES); - for (uint8 i = 0; i < 4; ++i) - me->CastSpell(me, waterGlobuleId[i], true); - } - events.ScheduleEvent(EVENT_SPELL_WATERY_GRAVE, 25000); - break; - case EVENT_SPELL_EARTHQUAKE: - Talk(EMOTE_EARTHQUAKE); - me->CastSpell(me, SPELL_EARTHQUAKE, false); - events.ScheduleEvent(EVENT_SPELL_EARTHQUAKE, urand(45000, 60000)); - events.ScheduleEvent(EVENT_SUMMON_MURLOCS, 8000); - break; - case EVENT_SUMMON_MURLOCS: - Talk(SAY_SUMMON); - for (uint32 i = SPELL_SUMMON_MURLOC1; i < SPELL_SUMMON_MURLOC1 + 11; ++i) - me->CastSpell(me, i, true); - break; + Talk(EMOTE_WATERY_GLOBULES); + for (uint8 waterGlobuleId : waterGlobuleIds) + { + DoCastSelf(waterGlobuleId, true); + } } + context.Repeat(25s); + }).Schedule(40s, [this](TaskContext context) + { + Talk(EMOTE_EARTHQUAKE); - DoMeleeAttackIfReady(); - } - }; + DoCastSelf(SPELL_EARTHQUAKE); + scheduler.Schedule(8s, [this](TaskContext) + { + Talk(SAY_SUMMON); + for (uint32 murlocSpellId = SPELL_SUMMON_MURLOC1; murlocSpellId < SPELL_SUMMON_MURLOC1 + 11; ++murlocSpellId) + { + DoCastSelf(murlocSpellId, true); + } + }); + context.Repeat(45s, 60s); + }); + } +private: + bool _recentlySpoken; }; class spell_morogrim_tidewalker_watery_grave : public SpellScriptLoader @@ -174,7 +149,7 @@ public: bool Load() override { - targetNumber = 0; + _targetNumber = 0; return true; } @@ -182,8 +157,8 @@ public: { PreventHitDefaultEffect(effIndex); if (Unit* target = GetHitUnit()) - if (targetNumber < 4) - GetCaster()->CastSpell(target, wateryGraveId[targetNumber++], true); + if (_targetNumber < 4) + GetCaster()->CastSpell(target, wateryGraveIds[_targetNumber++], true); } void Register() override @@ -192,7 +167,7 @@ public: } private: - uint8 targetNumber; + uint8 _targetNumber; }; SpellScript* GetSpellScript() const override @@ -225,6 +200,7 @@ public: return; // Xinef: acquire new target + // TODO: sniffs to see how this actually happens if (Unit* target = GetHitUnit()) GetCaster()->AddThreat(target, 1000000.0f); } @@ -244,7 +220,7 @@ public: void AddSC_boss_morogrim_tidewalker() { - new boss_morogrim_tidewalker(); + RegisterSerpentShrineAI(boss_morogrim_tidewalker); new spell_morogrim_tidewalker_watery_grave(); new spell_morogrim_tidewalker_water_globule_new_target(); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index ad3b54f5f..3963cb6c2 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -89,4 +89,6 @@ inline AI* GetSerpentShrineAI(T* obj) return GetInstanceAI(obj, SerpentShrineScriptName); } +#define RegisterSerpentShrineAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetSerpentShrineAI) + #endif From b1c8b0eaa26376ea5f4b54b640a967c6ec7b6fed Mon Sep 17 00:00:00 2001 From: The GhostRider Date: Fri, 25 Aug 2023 12:45:06 +0100 Subject: [PATCH 02/15] fix(Core/Item): Complimentary Brewfest Sampler (#16992) * Fix(DB/C++):Item - Complimentary Brewfest Sampler * Delete PlayerStorage.cpp * Update rev_1691843684176706600.sql Correction * Ripristino il file PlayerStorage.cpp * New file: SpellInfoCorrections.cpp * Update rev_1691843684176706600.sql --- .../updates/pending_db_world/rev_1691843684176706600.sql | 3 +++ src/server/game/Spells/SpellInfoCorrections.cpp | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1691843684176706600.sql diff --git a/data/sql/updates/pending_db_world/rev_1691843684176706600.sql b/data/sql/updates/pending_db_world/rev_1691843684176706600.sql new file mode 100644 index 000000000..cb2a75766 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1691843684176706600.sql @@ -0,0 +1,3 @@ +-- Insertion Aura Has Brewfest Mug +DELETE FROM `spell_custom_attr` WHERE (`spell_id` = 42533); +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (42533, 16777216); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 6934add0c..1b4586b2a 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -57,6 +57,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT; }); + // Has Brewfest Mug + ApplySpellFix({ 42533 }, [](SpellInfo* spellInfo) + { + spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(347); // 15 min + }); + // Elixir of Minor Fortitude ApplySpellFix({ 2378 }, [](SpellInfo* spellInfo) { From 13a9f48e39ac071c2666eb959d8f6aa1b175906b Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 25 Aug 2023 11:47:32 +0000 Subject: [PATCH 03/15] chore(DB): import pending files Referenced commit(s): b1c8b0eaa26376ea5f4b54b640a967c6ec7b6fed --- .../rev_1691843684176706600.sql => db_world/2023_08_25_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1691843684176706600.sql => db_world/2023_08_25_00.sql} (80%) diff --git a/data/sql/updates/pending_db_world/rev_1691843684176706600.sql b/data/sql/updates/db_world/2023_08_25_00.sql similarity index 80% rename from data/sql/updates/pending_db_world/rev_1691843684176706600.sql rename to data/sql/updates/db_world/2023_08_25_00.sql index cb2a75766..9300bfc93 100644 --- a/data/sql/updates/pending_db_world/rev_1691843684176706600.sql +++ b/data/sql/updates/db_world/2023_08_25_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_08_24_02 -> 2023_08_25_00 -- Insertion Aura Has Brewfest Mug DELETE FROM `spell_custom_attr` WHERE (`spell_id` = 42533); INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (42533, 16777216); From 820eac083c7bc24c0913acf569804355190c4d45 Mon Sep 17 00:00:00 2001 From: podmepodme <57728656+podmepodme@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:52:51 +0200 Subject: [PATCH 04/15] fix(Scripts/Orgrimmar): replace hardcoded gossips in zone_orgrimmar (#16947) * fix(CORE/Creature): replace hardcoded gossips in zone_orgrimmar Closes AzerothCore issue #4179 * fix(CORE): Codestyle * refactor(CORE/Character): Switch statement for thrall dialog * fix(CORE): Codestyle --- .../scripts/Kalimdor/zone_orgrimmar.cpp | 74 ++++++++----------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index 00cea506b..0f9f3dbd7 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -37,7 +37,7 @@ EndContentData */ ## npc_shenthul ######*/ -enum Shenthul +enum Shenthul : uint32 { QUEST_SHATTERED_SALUTE = 2460 }; @@ -134,10 +134,8 @@ public: ## npc_thrall_warchief ######*/ -enum ThrallWarchief +enum ThrallWarchief : uint32 { - QUEST_6566 = 6566, - SPELL_CHAIN_LIGHTNING = 16033, SPELL_SHOCK = 16034, @@ -153,19 +151,17 @@ enum ThrallWarchief AREA_ORGRIMMAR = 1637, AREA_RAZOR_HILL = 362, AREA_CAMP_TAURAJO = 378, - AREA_CROSSROADS = 380 + AREA_CROSSROADS = 380, + + // What the Wind Carries (ID: 6566) + QUEST_WHAT_THE_WIND_CARRIES = 6566, + GOSSIP_MENU_THRALL = 3664, + GOSSIP_RESPONSE_THRALL_FIRST = 5733, + GOSSIP_OPTION_DEFAULT = 0 }; const Position heraldOfThrallPos = { -462.404f, -2637.68f, 96.0656f, 5.8606f }; -#define GOSSIP_HTW "Please share your wisdom with me, Warchief." -#define GOSSIP_STW1 "What discoveries?" -#define GOSSIP_STW2 "Usurper?" -#define GOSSIP_STW3 "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?" -#define GOSSIP_STW4 "I... I did not think of it that way, Warchief." -#define GOSSIP_STW5 "I live only to serve, Warchief! My life is empty and meaningless without your guidance." -#define GOSSIP_STW6 "Of course, Warchief!" - /// @todo verify abilities/timers class npc_thrall_warchief : public CreatureScript { @@ -175,47 +171,37 @@ public: bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override { ClearGossipMenuFor(player); - switch (action) + + uint32 DiscussionOrder = action - GOSSIP_ACTION_INFO_DEF; + + if (DiscussionOrder>= 1 && DiscussionOrder <= 6) { - case GOSSIP_ACTION_INFO_DEF+1: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - SendGossipMenuFor(player, 5733, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, 5734, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - SendGossipMenuFor(player, 5735, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - SendGossipMenuFor(player, 5736, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - SendGossipMenuFor(player, 5737, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_STW6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - SendGossipMenuFor(player, 5738, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - CloseGossipMenuFor(player); - player->AreaExploredOrEventHappens(QUEST_6566); - break; + uint32 NextAction = GOSSIP_ACTION_INFO_DEF + DiscussionOrder + 1; + uint32 GossipResponse = GOSSIP_RESPONSE_THRALL_FIRST + DiscussionOrder - 1; + + AddGossipItemFor(player, GOSSIP_MENU_THRALL + DiscussionOrder, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, NextAction); + SendGossipMenuFor(player, GossipResponse, creature->GetGUID()); } + else if (DiscussionOrder == 7) + { + CloseGossipMenuFor(player); + player->AreaExploredOrEventHappens(QUEST_WHAT_THE_WIND_CARRIES); + } + return true; } bool OnGossipHello(Player* player, Creature* creature) override { if (creature->IsQuestGiver()) + { player->PrepareQuestMenu(creature->GetGUID()); + } - if (player->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HTW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (player->GetQuestStatus(QUEST_WHAT_THE_WIND_CARRIES) == QUEST_STATUS_INCOMPLETE) + { + AddGossipItemFor(player, GOSSIP_MENU_THRALL, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); return true; From cee630774c530cdf60acbb430dc48d5537ea45f1 Mon Sep 17 00:00:00 2001 From: Christopher Galbraith <39371221+ChrisCGalbraith@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:02:27 +0100 Subject: [PATCH 05/15] fix(Core/Spells): Add SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK to Hand of Sac and Divine Sac spells (#17041) * add no spell pushback flag to auras * Revert "add no spell pushback flag to auras" This reverts commit 545e9fe4ee69bb079b69a4f2ba6039b834568a59. * spellInfoCorrection for no pushback on HoS and Divine Sac --------- Co-authored-by: ChrisCGalbraith --- src/server/game/Spells/SpellInfoCorrections.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 1b4586b2a..6363a6b68 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -598,6 +598,14 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY; // just a marker }); + ApplySpellFix({ + 6940, // Hand of Sacrifice + 64205 // Divine Sacrifice + }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx7 |= SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK; + }); + // Seal of Command trigger ApplySpellFix({ 20424 }, [](SpellInfo* spellInfo) { From 2aee8bb1c3cf5b5d8872bffb8b904499bbc16aa4 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:06:30 +0200 Subject: [PATCH 06/15] fix(Scripts/Karazhan): allow sequence of releases to continue even if Dorothee dies early (#17077) * initial initial Co-authored-by: danqu <3050620+danqu@users.noreply.github.com> * some changes because reset dun work * oops * fixes hopefully * debug * more debug * bruh * cleanup --------- Co-authored-by: danqu <3050620+danqu@users.noreply.github.com> --- .../EasternKingdoms/Karazhan/bosses_opera.cpp | 122 +++++++++++------- 1 file changed, 76 insertions(+), 46 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 287c4eab9..39e17f168 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -97,6 +97,11 @@ enum Creatures CREATURE_CRONE = 18168, }; +enum OZActions +{ + ACTION_RELEASE = 1, +}; + void SummonCroneIfReady(InstanceScript* instance, Creature* creature) { instance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount @@ -137,13 +142,26 @@ void DespawnAll(InstanceScript* instance) } } +void DoActions(InstanceScript* instance) +{ + uint32 datas[4] = {DATA_DOROTHEE, DATA_ROAR, DATA_STRAWMAN, DATA_TINHEAD}; + + for (uint32 data : datas) + { + if (Creature* actionCreature = instance->GetCreature(data)) + { + actionCreature->AI()->DoAction(ACTION_RELEASE); + } + } +} + struct boss_dorothee : public ScriptedAI { boss_dorothee(Creature* creature) : ScriptedAI(creature) { SetCombatMovement(false); //this is kinda a big no-no. but it will prevent her from moving to chase targets. she should just cast her spells. in this case, since there is not really something to LOS her with or get out of range this would work. but a more elegant solution would be better - Initialize(); + instance = creature->GetInstanceScript(); _scheduler.SetValidator([this] @@ -152,47 +170,26 @@ struct boss_dorothee : public ScriptedAI }); } - void ScheduleActivation() - { - _scheduler.Schedule(16670ms, [this](TaskContext) - { - if (Creature* roar = instance->GetCreature(DATA_ROAR)) - { - roar->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); - roar->SetImmuneToPC(false); - roar->SetInCombatWithZone(); - } - }).Schedule(26300ms, [this](TaskContext) - { - if (Creature* strawman = instance->GetCreature(DATA_STRAWMAN)) - { - strawman->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); - strawman->SetImmuneToPC(false); - strawman->SetInCombatWithZone(); - } - }).Schedule(34470ms, [this](TaskContext) - { - if (Creature* tinhead = instance->GetCreature(DATA_TINHEAD)) - { - tinhead->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); - tinhead->SetImmuneToPC(false); - tinhead->SetInCombatWithZone(); - } - }); - } - - void Initialize() - { - titoDied = false; - _startIntro = false; - } - InstanceScript* instance; bool titoDied; + void DoAction(int32 action) override + { + if (action == ACTION_RELEASE) + { + _scheduler.Schedule(11700ms, [this](TaskContext) + { + me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); + me->SetImmuneToPC(false); + me->SetInCombatWithZone(); + }); + } + } + void Reset() override { - Initialize(); + titoDied = false; + _startIntro = false; } void JustEngagedWith(Unit* /*who*/) override @@ -270,13 +267,7 @@ struct boss_dorothee : public ScriptedAI if (!_startIntro) { - ScheduleActivation(); - _scheduler.Schedule(12s, [this](TaskContext) - { - me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); - me->SetImmuneToPC(false); - me->SetInCombatWithZone(); - }); + DoActions(instance); _startIntro = true; } DoMeleeAttackIfReady(); @@ -347,6 +338,19 @@ struct boss_roar : public ScriptedAI InstanceScript* instance; + void DoAction(int32 action) override + { + if (action == ACTION_RELEASE) + { + _scheduler.Schedule(16670ms, [this](TaskContext) + { + me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); + me->SetImmuneToPC(false); + me->SetInCombatWithZone(); + }); + } + } + void Reset() override { } void MoveInLineOfSight(Unit* who) override @@ -441,6 +445,19 @@ struct boss_strawman : public ScriptedAI InstanceScript* instance; + void DoAction(int32 action) override + { + if (action == ACTION_RELEASE) + { + _scheduler.Schedule(26300ms, [this](TaskContext) + { + me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); + me->SetImmuneToPC(false); + me->SetInCombatWithZone(); + }); + } + } + void Reset() override { } void AttackStart(Unit* who) override @@ -516,11 +533,11 @@ struct boss_strawman : public ScriptedAI void UpdateAI(uint32 diff) override { + _scheduler.Update(diff); + if (!UpdateVictim()) return; - _scheduler.Update(diff); - DoMeleeAttackIfReady(); } private: @@ -541,6 +558,19 @@ struct boss_tinhead : public ScriptedAI InstanceScript* instance; + void DoAction(int32 action) override + { + if (action == ACTION_RELEASE) + { + _scheduler.Schedule(34470ms, [this](TaskContext) + { + me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); + me->SetImmuneToPC(false); + me->SetInCombatWithZone(); + }); + } + } + void Reset() override { _rustCount = 0; From 6b583089f35f04fd51b9c47ac56daa87944e03f1 Mon Sep 17 00:00:00 2001 From: Synful-Syn Date: Fri, 25 Aug 2023 08:14:27 -0400 Subject: [PATCH 07/15] fix(Core/Spell): Stop `Blink` from the falling player to move upward by 1y and stop moving backward when facing a wall (#16657) * blink-bad-warps * Change formatting of an if --- src/common/Collision/Maps/MapTree.cpp | 8 +------- src/server/game/Spells/Spell.cpp | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index 2223c58d3..27c4c1ded 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -176,13 +176,7 @@ namespace VMAP // direction with length of 1 G3D::Ray ray = G3D::Ray::fromOriginAndDirection(pos1, (pos2 - pos1) / maxDist); - if (GetIntersectionTime(ray, maxDist, true, ignoreFlags)) - { - - return false; - } - - return true; + return !GetIntersectionTime(ray, maxDist, true, ignoreFlags); } //========================================================= /** diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 06fa659d2..e239466c7 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1412,16 +1412,16 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici uint32 mapid = m_caster->GetMapId(); uint32 phasemask = m_caster->GetPhaseMask(); float collisionHeight = m_caster->GetCollisionHeight(); - float destx = 0.0f, desty = 0.0f, destz = 0.0f, ground = 0.0f, startx = 0.0f, starty = 0.0f, startz = 0.0f, starto = 0.0f; + float destz = 0.0f, startx = 0.0f, starty = 0.0f, startz = 0.0f, starto = 0.0f; Position pos; Position lastpos; m_caster->GetPosition(startx, starty, startz, starto); pos.Relocate(startx, starty, startz, starto); - destx = pos.GetPositionX() + distance * cos(pos.GetOrientation()); - desty = pos.GetPositionY() + distance * sin(pos.GetOrientation()); + float destx = pos.GetPositionX() + distance * cos(pos.GetOrientation()); + float desty = pos.GetPositionY() + distance * sin(pos.GetOrientation()); - ground = map->GetHeight(phasemask, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()); + float ground = map->GetHeight(phasemask, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()); bool isCasterInWater = m_caster->IsInWater(); if (!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) || (pos.GetPositionZ() - ground < distance)) @@ -1586,6 +1586,15 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici destz = prevZ; //LOG_ERROR("spells", "(collision) destZ rewrited in prevZ"); + // Don't make the player move backward from the xy adjustments by collisions. + if ((DELTA_X > 0 && startx > destx) || (DELTA_X < 0 && startx < destx) || + (DELTA_Y > 0 && starty > desty) || (DELTA_Y < 0 && starty < desty)) + { + destx = startx; + desty = starty; + destz = startz; + } + break; } // we have correct destz now @@ -1597,9 +1606,9 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici else { float z = pos.GetPositionZ(); - bool col = VMAP::VMapFactory::createOrGetVMapMgr()->GetObjectHitPos(mapid, pos.GetPositionX(), pos.GetPositionY(), z + 0.5f, destx, desty, z + 0.5f, destx, desty, z, -0.5f); + bool col = VMAP::VMapFactory::createOrGetVMapMgr()->GetObjectHitPos(mapid, pos.GetPositionX(), pos.GetPositionY(), z, destx, desty, z, destx, desty, z, -0.5f); // check dynamic collision - bool dcol = m_caster->GetMap()->GetObjectHitPos(phasemask, pos.GetPositionX(), pos.GetPositionY(), z + 0.5f, destx, desty, z + 0.5f, destx, desty, z, -0.5f); + bool dcol = m_caster->GetMap()->GetObjectHitPos(phasemask, pos.GetPositionX(), pos.GetPositionY(), z, destx, desty, z, destx, desty, z, -0.5f); // collision occured if (col || dcol) From f4658a1df2a63bf698a8a25a39a57e0de0cd0f40 Mon Sep 17 00:00:00 2001 From: Anton Popovichenko Date: Fri, 25 Aug 2023 14:15:07 +0200 Subject: [PATCH 08/15] fix(Core/Scripts): Fix scripts where LoadObjectData can leave arrays boundaries. (#17070) * fix(Core/Scripts): Fix scripts where LoadObjectData can leave arrays boundaries. * Fix build --- .../BlackwingLair/instance_blackwing_lair.cpp | 1 + .../scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp | 1 + .../scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp | 3 ++- .../TheBlackMorass/instance_the_black_morass.cpp | 5 +++-- .../scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp | 3 ++- .../Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp | 1 + .../TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp | 3 ++- .../Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp | 3 ++- .../Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp | 3 ++- .../Auchindoun/SethekkHalls/instance_sethekk_halls.cpp | 3 ++- .../CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp | 3 ++- .../CoilfangReservoir/underbog/instance_the_underbog.cpp | 3 ++- .../Outland/TempestKeep/arcatraz/instance_arcatraz.cpp | 3 ++- 13 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 4aec41e16..a8aac9757 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -47,6 +47,7 @@ ObjectData const creatureData[] = { NPC_NEFARIAN_TROOPS, DATA_NEFARIAN_TROOPS }, { NPC_VICTOR_NEFARIUS, DATA_LORD_VICTOR_NEFARIUS }, { NPC_CHROMAGGUS, DATA_CHROMAGGUS }, + { 0, 0 } }; ObjectData const objectData[] = diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 4c98ae614..3f70f5790 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -43,6 +43,7 @@ ObjectData const creatureData[] = { NPC_TINHEAD, DATA_TINHEAD }, { NPC_ROMULO, DATA_ROMULO }, { NPC_JULIANNE, DATA_JULIANNE }, + { 0, 0 } }; class instance_karazhan : public InstanceMapScript diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 25395d4df..91734be85 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -38,7 +38,8 @@ ObjectData const creatureData[] = { NPC_HIGH_PRIEST_THEKAL, DATA_THEKAL }, { NPC_ZEALOT_LORKHAN, DATA_LORKHAN }, { NPC_ZEALOT_ZATH, DATA_ZATH }, - { NPC_PRIESTESS_MARLI, DATA_MARLI } + { NPC_PRIESTESS_MARLI, DATA_MARLI }, + { 0, 0 } }; class instance_zulgurub : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index e4f572fcf..5a2b46316 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -31,9 +31,10 @@ const Position PortalLocation[4] = { -1930.9106f, 7183.5970f, 23.007639f, 3.59537f } }; -ObjectData const creatureData[1] = +ObjectData const creatureData[] = { - { NPC_MEDIVH, DATA_MEDIVH } + { NPC_MEDIVH, DATA_MEDIVH }, + { 0, 0 } }; class instance_the_black_morass : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index 2410d352c..570e29e9d 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -21,7 +21,8 @@ ObjectData const creatureData[] = { - { NPC_ONYXIA, DATA_ONYXIA } + { NPC_ONYXIA, DATA_ONYXIA }, + { 0, 0 } }; class instance_onyxias_lair : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index a1f7e531c..b575abeb3 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -36,6 +36,7 @@ ObjectData const creatureData[] = { NPC_YEGGETH, DATA_YEGGETH }, { NPC_PAKKON, DATA_PAKKON }, { NPC_ZERRAN, DATA_ZERRAN }, + { 0, 0 } }; enum RajaxxWaveEvent diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index ed1299f65..1909fe48a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -35,7 +35,8 @@ ObjectData const creatureData[] = { NPC_MASTERS_EYE, DATA_MASTERS_EYE }, { NPC_VEKLOR, DATA_VEKLOR }, { NPC_VEKNILASH, DATA_VEKNILASH }, - { NPC_VISCIDUS, DATA_VISCIDUS } + { NPC_VISCIDUS, DATA_VISCIDUS }, + { 0, 0 } }; DoorData const doorData[] = diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 551dbca7f..8e747214d 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -32,7 +32,8 @@ DoorData const doorData[] = ObjectData const creatureData[] = { { NPC_KRIKTHIR_THE_GATEWATCHER, DATA_KRIKTHIR_THE_GATEWATCHER_EVENT }, - { NPC_HADRONOX, DATA_HADRONOX_EVENT } + { NPC_HADRONOX, DATA_HADRONOX_EVENT }, + { 0, 0 } }; BossBoundaryData const boundaries = diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index ca9283c49..461daa754 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -118,7 +118,8 @@ DoorData const doorData[] = ObjectData const creatureData[] = { - { NPC_SINDRAGOSA, DATA_SINDRAGOSA } + { NPC_SINDRAGOSA, DATA_SINDRAGOSA }, + { 0, 0 } }; // this doesnt have to only store questgivers, also can be used for related quest spawns diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index d122ab260..248b607ee 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -27,7 +27,8 @@ DoorData const doorData[] = ObjectData const gameObjectData[] = { - { GO_THE_TALON_KINGS_COFFER, DATA_GO_TALON_KING_COFFER } + { GO_THE_TALON_KINGS_COFFER, DATA_GO_TALON_KING_COFFER }, + { 0, 0 } }; class instance_sethekk_halls : public InstanceMapScript diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp index 477d2c110..f57f94830 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp @@ -30,7 +30,8 @@ ObjectData const creatureData[] = { - { NPC_QUAGMIRRAN, DATA_QUAGMIRRAN } + { NPC_QUAGMIRRAN, DATA_QUAGMIRRAN }, + { 0, 0 } }; class instance_the_slave_pens : public InstanceMapScript diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp index a6e8c232d..c06178bb3 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp @@ -23,7 +23,8 @@ ObjectData const creatureData[] = { { NPC_HUNGARFEN, DATA_HUNGARFEN }, - { NPC_GHAZAN, DATA_GHAZAN } + { NPC_GHAZAN, DATA_GHAZAN }, + { 0, 0 } }; class instance_the_underbog : public InstanceMapScript diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index 271be09d4..3f73ddf87 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -30,7 +30,8 @@ ObjectData const creatureData[] = { { NPC_DALLIAH, DATA_DALLIAH }, { NPC_SOCCOTHRATES, DATA_SOCCOTHRATES }, - { NPC_MELLICHAR, DATA_WARDEN_MELLICHAR } + { NPC_MELLICHAR, DATA_WARDEN_MELLICHAR }, + { 0, 0 } }; class instance_arcatraz : public InstanceMapScript From 856d17ac36e188d87cd4ac0739219b4d6c291734 Mon Sep 17 00:00:00 2001 From: pvp100 <134824156+pvp100com@users.noreply.github.com> Date: Fri, 25 Aug 2023 20:16:47 +0800 Subject: [PATCH 09/15] fix(Core/MiscHandler): Dungeon requirements Message (#16701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(DB/Gameobject): fix towercanno error location in Flamewatch Tower adjusted wintergrasp towercanno position * fix(Core/MiscHandler): dungeon access requirements message parameter requirements level variable always 0 requirements item cannot get from locale Co-authored-by: aviar * revert: random edits --------- Co-authored-by: aviar Co-authored-by: Stefano Borzì --- src/server/game/Entities/Player/PlayerStorage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index 3c4feee11..508a0f2b7 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -6880,7 +6880,13 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map } else if (missingPlayerItems.size()) { - GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, sObjectMgr->GetItemTemplate(missingPlayerItems[0]->id)->Name1.c_str()); + LocaleConstant loc_idx = GetSession()->GetSessionDbLocaleIndex(); + std::string name = sObjectMgr->GetItemTemplate(missingPlayerItems[0]->id)->Name1; + if (ItemLocale const* il = sObjectMgr->GetItemLocale(missingPlayerItems[0]->id)) + { + ObjectMgr::GetLocaleString(il->Name, loc_idx, name); + } + GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED_AND_ITEM), ar->levelMin, name.c_str()); } else if (LevelMin) { From cbbb705621f01f7cd216764daaaa3b1b5229caa6 Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Fri, 25 Aug 2023 06:32:44 -0600 Subject: [PATCH 10/15] fix(DB/Creature): Add Taunt immunity to Magtheridon (#17076) init --- data/sql/updates/pending_db_world/rev_1692891069724453500.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1692891069724453500.sql diff --git a/data/sql/updates/pending_db_world/rev_1692891069724453500.sql b/data/sql/updates/pending_db_world/rev_1692891069724453500.sql new file mode 100644 index 000000000..e0a7cd9b0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1692891069724453500.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry`=17257; + From 96135cd1d8dd69285e385dc97fa4fc933d6f1a02 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 25 Aug 2023 12:35:23 +0000 Subject: [PATCH 11/15] chore(DB): import pending files Referenced commit(s): cbbb705621f01f7cd216764daaaa3b1b5229caa6 --- .../rev_1692891069724453500.sql => db_world/2023_08_25_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1692891069724453500.sql => db_world/2023_08_25_01.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1692891069724453500.sql b/data/sql/updates/db_world/2023_08_25_01.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1692891069724453500.sql rename to data/sql/updates/db_world/2023_08_25_01.sql index e0a7cd9b0..92b31da84 100644 --- a/data/sql/updates/pending_db_world/rev_1692891069724453500.sql +++ b/data/sql/updates/db_world/2023_08_25_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_08_25_00 -> 2023_08_25_01 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry`=17257; From 122b7a8eb01e94d58b0a189479f2b2aeb4d7f0db Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:33:44 +0200 Subject: [PATCH 12/15] fix(DB/Creature): rework Agamand Family Crypt creature positions to make sure creatures don't aggro weirdly anymore (#17022) * fix ohf * revert * initial * the right sql file this TIME help * stop crying about codestyle * frick YOU * :( * destroy readability - remove complaining? pog * add new sql file with EOL converted again... sigh * Delete new-agamand-spawns.sql * safety concerning primary key delete based on guids instead of ids --- data/sql/updates/pending_db_world/agamand.sql | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 data/sql/updates/pending_db_world/agamand.sql diff --git a/data/sql/updates/pending_db_world/agamand.sql b/data/sql/updates/pending_db_world/agamand.sql new file mode 100644 index 000000000..b7f767ebd --- /dev/null +++ b/data/sql/updates/pending_db_world/agamand.sql @@ -0,0 +1,66 @@ +-- +DELETE FROM `creature` WHERE `guid` IN (31929, 31932, 31933, 32020, 38237, 38239, 38240, 38244, 38246, 38247, 38440, 43732, 43911, 43912, 45021, 45023, 45028, 45029, 45032, 45035, 45042, 45209, 31930, 38236, 38243, 38245, 38441, 38442, 38444, 43736, 43910, 45024, 45025, 45030, 45041, 45043, 45044, 45045, 45046, 45100, 45101, 45206, 45207, 45038); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(31929, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2874.8179, 837.19354, 111.29426, 6.202622413635253906, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), -- rotting ancestor +(31932, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2837.2488, 708.48346, 138.98007, 1.519538044929504394, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(31933, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2889.9797, 709.3701, 119.96609, 5.184770107269287109, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(32020, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2970.3154, 775.2611, 92.68646, 2.024832963943481445, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38237, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2886.4163, 691.8133, 122.73617, 2.53875589370727539, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38239, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2919.4468, 681.56134, 109.76132, 4.996694087982177734, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38240, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2850.913, 678.58514, 135.78427, 4.290693283081054687, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38244, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2919.2058, 631.01013, 101.22102, 1.763216733932495117, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38246, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2991.666, 716.667, 93.86101, 1.307610034942626953, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38247, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2899.5144, 625.1128, 103.50867, 3.468617916107177734, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(38440, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3024.2627, 655.02637, 75.43317, 0.244346097111701965, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(43732, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3051.9668, 649.5228, 96.2976, 4.592616081237792968, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(43911, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3024.061, 693.17206, 66.15043, 1.364533424377441406, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(43912, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3032.7615, 687.49396, 66.55808, 6.220858097076416015, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45021, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2990.6885, 717.7841, 94.103195, 1.734143614768981933, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45023, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3056.7256, 659.6809, 58.15043, 5.710028648376464843, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45028, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3030.5938, 657.6649, 58.225254, 0.25246506929397583, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45029, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3034.5256, 654.689, 75.43396, 0.698131680488586425, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45032, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3045.4407, 654.6139, 75.43524, 0.890117883682250976, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45035, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3044.265, 683.08966, 66.75043, 1.585389614105224609, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45042, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 2958.9824, 745.5566, 100.98822, 5.651014328002929687, 300, 5, 0, 198, 0, 1, 0, 0, 0, '', 50664), +(45209, 1530, 0, 0, 0, 0, 0, 1, 1, 0, 3042.0586, 665.8919, 58.191853, 0.213877066969871521, 300, 0, 0, 198, 0, 2, 0, 0, 0, '', 50664), +(31930, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2905.0107, 729.7082, 114.53017, 1.04075479507446289, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), -- wailing ancestor +(38236, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2956.2239, 708.47186, 105.88536, 4.775476455688476562, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(38243, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2956.4705, 655.5519, 105.17837, 0.844802618026733398, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(38245, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2985.0789, 680.95526, 96.413246, 5.070845603942871093, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(38441, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2945.2393, 595.05, 93.65392, 6.072173118591308593, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(38442, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2961.1853, 589.23804, 95.84728, 4.353847503662109375, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(38444, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2938.0012, 538.42456, 94.00319, 6.054352760314941406, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(43736, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2946.2646, 562.1707, 91.264786, 3.437937259674072265, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(43910, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2983.8918, 603.40735, 98.23238, 1.835677504539489746, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45024, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2890.2188, 562.94965, 105.55513, 3.020595550537109375, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45025, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 2982.3613, 687.7517, 96.146645, 1.9658128023147583, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45030, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3026.1106, 642.41547, 90.37821, 0.235765904188156127, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45041, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3008.333, 668.75, 90.43538, 3.895724296569824218, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45043, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3026.2622, 685.9423, 66.15042, 1.544373631477355957, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45044, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3043.1206, 671.6966, 81.17922, 4.442644596099853515, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45045, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3060.693, 654.92255, 75.55043, 2.325806140899658203, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45046, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3026.5713, 670.8926, 90.55045, 3.192463636398315429, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45100, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3052.6719, 688.94464, 66.55042, 4.559454917907714843, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45101, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3057.3962, 688.2738, 66.15044, 3.155925750732421875, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45206, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3041.2988, 659.1668, 57.750427, 4.709290504455566406, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45207, 1534, 0, 0, 0, 0, 0, 1, 1, 0, 3065.5005, 685.4639, 66.55043, 1.572624921798706054, 300, 5, 0, 176, 0, 1, 0, 0, 0, '', 50664), +(45038, 1658, 0, 0, 0, 0, 0, 1, 1, 0, 3043.631, 646.9064, 59.14341, 1.553343057632446289, 300, 0, 0, 273, 0, 0, 0, 0, 0, '', 50664); -- dargol + +SET @NPC := 45209 * 10; -- wp data for GUID 45209 rotting ancestor +DELETE FROM `waypoint_data` WHERE `id` = @NPC; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(@NPC, 1, 3032.486, 653.2628, 58.150436, NULL, 0, 0, 0, 100, 0), +(@NPC, 2, 3055.131, 653.4985, 58.150433, NULL, 0, 0, 0, 100, 0), +(@NPC, 3, 3054.8225, 665.8006, 58.291363, NULL, 0, 0, 0, 100, 0), +(@NPC, 4, 3044.513, 666.08704, 58.15043, NULL, 0, 0, 0, 100, 0), +(@NPC, 5, 3044.265, 683.08966, 66.75043, NULL, 0, 0, 0, 100, 0), +(@NPC, 6, 3059.075, 682.25323, 66.55043, NULL, 0, 0, 0, 100, 0), +(@NPC, 7, 3058.806, 657.62976, 75.55043, NULL, 0, 0, 0, 100, 0), +(@NPC, 8, 3027.6272, 657.5499, 75.389946, NULL, 0, 0, 0, 100, 0), +(@NPC, 9, 3027.9175, 682.0833, 66.55043, NULL, 0, 0, 0, 100, 0), +(@NPC, 10, 3042.5554, 665.9998, 58.15043, NULL, 0, 0, 0, 100, 0), +(@NPC, 11, 3032.1685, 666.00415, 58.15043, NULL, 0, 0, 0, 100, 0); + +DELETE FROM `creature_addon` WHERE `guid` = 45209; +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(45209, @NPC, 0, 0, 1, 0, 0, ''); From 9f977a37509b8d6a91de2d47d3ef83553123f9ed Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 25 Aug 2023 14:36:02 +0000 Subject: [PATCH 13/15] chore(DB): import pending files Referenced commit(s): 122b7a8eb01e94d58b0a189479f2b2aeb4d7f0db --- .../{pending_db_world/agamand.sql => db_world/2023_08_25_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/agamand.sql => db_world/2023_08_25_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/agamand.sql b/data/sql/updates/db_world/2023_08_25_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/agamand.sql rename to data/sql/updates/db_world/2023_08_25_02.sql index b7f767ebd..56522281d 100644 --- a/data/sql/updates/pending_db_world/agamand.sql +++ b/data/sql/updates/db_world/2023_08_25_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_08_25_01 -> 2023_08_25_02 -- DELETE FROM `creature` WHERE `guid` IN (31929, 31932, 31933, 32020, 38237, 38239, 38240, 38244, 38246, 38247, 38440, 43732, 43911, 43912, 45021, 45023, 45028, 45029, 45032, 45035, 45042, 45209, 31930, 38236, 38243, 38245, 38441, 38442, 38444, 43736, 43910, 45024, 45025, 45030, 45041, 45043, 45044, 45045, 45046, 45100, 45101, 45206, 45207, 45038); INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES From 23c5e990b6b6fe9dbc8fff1f2df5f3da9bc557e1 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:02:21 -0400 Subject: [PATCH 14/15] fix(Apps/Docker): ensure conf files always exist (#17071) --- apps/compiler/includes/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/compiler/includes/functions.sh b/apps/compiler/includes/functions.sh index 7435e655e..5929816f9 100644 --- a/apps/compiler/includes/functions.sh +++ b/apps/compiler/includes/functions.sh @@ -143,6 +143,15 @@ function comp_compile() { find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chown root:root -- {} + find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chmod u+s -- {} + + if [[ -n "$DOCKER" ]]; then + [[ -f "$confDir/worldserver.conf.dist" ]] && \ + cp -nv "$confDir/worldserver.conf.dist" "$confDir/worldserver.conf" + [[ -f "$confDir/authserver.conf.dist" ]] && \ + cp -nv "$confDir/authserver.conf.dist" "$confDir/authserver.conf" + [[ -f "$confDir/dbimport.conf.dist" ]] && \ + cp -nv "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf" + fi + echo "Done" ;; esac From aea540181b38e191d6f237e6a26e561ca10094f6 Mon Sep 17 00:00:00 2001 From: Christopher Galbraith <39371221+ChrisCGalbraith@users.noreply.github.com> Date: Sat, 26 Aug 2023 16:35:56 +0100 Subject: [PATCH 15/15] fix(Spell): set torment of the worgen to have 3% proc chance (#17005) Co-authored-by: ChrisCGalbraith --- src/server/game/Spells/SpellInfoCorrections.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 6363a6b68..24019070a 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4580,6 +4580,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_TAKE_DAMAGE; }); + // Torment of the Worgen + ApplySpellFix({ 30567 }, [](SpellInfo* spellInfo) + { + spellInfo->ProcChance = 3; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i];