From 298b08c9a593b3ab638dbf4261589bc42391dac5 Mon Sep 17 00:00:00 2001 From: Nefertumm Date: Fri, 1 Jul 2022 15:22:13 -0300 Subject: [PATCH 01/33] fix(Core/ZulGurub): Hazza'rah improvements (#12236) * fix(Core/ZulGurub): Hazza'rah improvements * dumb --- .../rev_1656487501551472500.sql | 2 + .../game/Spells/SpellInfoCorrections.cpp | 6 + .../ZulGurub/boss_hazzarah.cpp | 153 +++++++++--------- 3 files changed, 80 insertions(+), 81 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1656487501551472500.sql diff --git a/data/sql/updates/pending_db_world/rev_1656487501551472500.sql b/data/sql/updates/pending_db_world/rev_1656487501551472500.sql new file mode 100644 index 000000000..65ee0b67c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656487501551472500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `DamageModifier` = 26 WHERE `entry` = 15163; diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 985ead07c..95de9e7cb 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4295,6 +4295,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Dispel = DISPEL_NONE; }); + // Summon Nightmare Illusions + ApplySpellFix({ 24681, 24728, 24729 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].MiscValueB = 64; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index d475bd966..be9b57e66 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -15,13 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Hazzarah -SD%Complete: 100 -SDComment: -SDCategory: Zul'Gurub -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" @@ -45,100 +38,98 @@ enum Events EVENT_ILLUSIONS = 4 }; -class boss_hazzarah : public CreatureScript +struct boss_hazzarah : public BossAI { -public: - boss_hazzarah() : CreatureScript("boss_hazzarah") { } + boss_hazzarah(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { } - struct boss_hazzarahAI : public BossAI + void JustSummoned(Creature* summon) override { - boss_hazzarahAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { } + summons.Summon(summon); - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - - summon->SetCorpseDelay(10); - summon->SetReactState(REACT_PASSIVE); - summon->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE); - summon->SetVisible(false); - summon->m_Events.AddEventAtOffset([summon]() + summon->SetCorpseDelay(10); + summon->SetReactState(REACT_PASSIVE); + summon->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE); + summon->SetVisible(false); + summon->m_Events.AddEventAtOffset([summon]() { summon->SetVisible(true); }, 2s); - summon->m_Events.AddEventAtOffset([summon]() + summon->m_Events.AddEventAtOffset([summon]() { summon->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE); summon->SetReactState(REACT_AGGRESSIVE); summon->SetInCombatWithZone(); - }, 3500ms); - } + }, 5s); + } - void EnterCombat(Unit* /*who*/) override + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override + { + summons.Despawn(summon); + summon->DespawnOrUnsummon(); + } + + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + events.ScheduleEvent(EVENT_SLEEP, 12s, 15s); + events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s); + events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s); + events.ScheduleEvent(EVENT_ILLUSIONS, 16s, 24s); + } + + bool CanAIAttack(Unit const* target) const override + { + if (me->GetThreatMgr().getThreatList().size() > 1 && me->GetThreatMgr().getOnlineContainer().getMostHated()->getTarget() == target) + return !target->HasAura(SPELL_SLEEP); + + return true; + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) { - _EnterCombat(); - events.ScheduleEvent(EVENT_SLEEP, 12s, 15s); - events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s); - events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s); - events.ScheduleEvent(EVENT_ILLUSIONS, 16s, 24s); - } - - bool CanAIAttack(Unit const* target) const override - { - if (me->GetThreatMgr().getThreatList().size() > 1 && me->GetThreatMgr().getOnlineContainer().getMostHated()->getTarget() == target) - return !target->HasAura(SPELL_SLEEP); - - return true; - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) + switch (eventId) { - switch (eventId) - { - case EVENT_SLEEP: - DoCastVictim(SPELL_SLEEP, true); - events.ScheduleEvent(EVENT_SLEEP, 24s, 32s); - return; - case EVENT_EARTH_SHOCK: - DoCastVictim(SPELL_EARTH_SHOCK); - events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s); - break; - case EVENT_CHAIN_BURN: + case EVENT_SLEEP: + DoCastVictim(SPELL_SLEEP, true); + events.ScheduleEvent(EVENT_SLEEP, 24s, 32s); + return; + case EVENT_EARTH_SHOCK: + DoCastVictim(SPELL_EARTH_SHOCK); + events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s); + break; + case EVENT_CHAIN_BURN: + if (me->GetPowerPct(POWER_MANA) > 5.f) // totally guessed + { if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; })) { - DoCast(target, SPELL_CHAIN_BURN, false); + DoCast(target, SPELL_CHAIN_BURN); } - events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s); - break; - case EVENT_ILLUSIONS: - DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_LEFT, true); - DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_BACK, true); - DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_RIGHT, true); - events.ScheduleEvent(EVENT_ILLUSIONS, 16s, 24s); - break; - default: - break; - } + } + events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s); + break; + case EVENT_ILLUSIONS: + DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_LEFT, true); + DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_BACK, true); + DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_RIGHT, true); + events.ScheduleEvent(EVENT_ILLUSIONS, 15s, 25s); + break; + default: + break; } - - DoMeleeAttackIfReady(); } - }; - CreatureAI* GetAI(Creature* creature) const override - { - return GetZulGurubAI(creature); + DoMeleeAttackIfReady(); } }; @@ -164,6 +155,6 @@ class spell_chain_burn : public SpellScript void AddSC_boss_hazzarah() { - new boss_hazzarah(); + RegisterZulGurubCreatureAI(boss_hazzarah); RegisterSpellScript(spell_chain_burn); } From 2fd98c2bbc0a42ebe10b2fcda1a0e171492570d6 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 1 Jul 2022 18:24:14 +0000 Subject: [PATCH 02/33] chore(DB): import pending files Referenced commit(s): 298b08c9a593b3ab638dbf4261589bc42391dac5 --- .../rev_1656487501551472500.sql => db_world/2022_07_01_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656487501551472500.sql => db_world/2022_07_01_02.sql} (64%) diff --git a/data/sql/updates/pending_db_world/rev_1656487501551472500.sql b/data/sql/updates/db_world/2022_07_01_02.sql similarity index 64% rename from data/sql/updates/pending_db_world/rev_1656487501551472500.sql rename to data/sql/updates/db_world/2022_07_01_02.sql index 65ee0b67c..787ea78ae 100644 --- a/data/sql/updates/pending_db_world/rev_1656487501551472500.sql +++ b/data/sql/updates/db_world/2022_07_01_02.sql @@ -1,2 +1,3 @@ +-- DB update 2022_07_01_01 -> 2022_07_01_02 -- UPDATE `creature_template` SET `DamageModifier` = 26 WHERE `entry` = 15163; From 7df342b41c81d6a412a07fa902cc324e8bae9711 Mon Sep 17 00:00:00 2001 From: ZhengPeiRu21 <98835050+ZhengPeiRu21@users.noreply.github.com> Date: Fri, 1 Jul 2022 14:24:01 -0600 Subject: [PATCH 03/33] fix(Scripts): Midsummer Music Range (#12248) * fix(Scripts): Midsummer Music Range * Refactor iterating nearby players Co-authored-by: Nefertumm * Update go_scripts.cpp * Update go_scripts.cpp Co-authored-by: Nefertumm --- src/server/scripts/World/go_scripts.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 2109d7265..d14a994e5 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -821,19 +821,19 @@ public: if (!IsHolidayActive(HOLIDAY_FIRE_FESTIVAL)) break; - Map::PlayerList const& players = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + std::list targets; + Acore::AnyPlayerInObjectRangeCheck check(me, me->GetVisibilityRange(), false); + Acore::PlayerListSearcherWithSharedVision searcher(me, targets, check); + Cell::VisitWorldObjects(me, searcher, me->GetVisibilityRange()); + for (Player* player : targets) { - if (Player* player = itr->GetSource()) + if (player->GetTeamId() == TEAM_HORDE) { - if (player->GetTeamId() == TEAM_HORDE) - { - me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_H, player); - } - else - { - me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_A, player); - } + me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_H, player); + } + else + { + me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_A, player); } } From 211a6d4c0871be619315b7313bb11d248bb2318c Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:50:40 -0300 Subject: [PATCH 04/33] fix(DB/Creature) Add CTM to 4 flying creatures (#12182) * Create ctm_1.sql * Update ctm_1.sql * Update ctm_1.sql --- data/sql/updates/pending_db_world/ctm_1.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/ctm_1.sql diff --git a/data/sql/updates/pending_db_world/ctm_1.sql b/data/sql/updates/pending_db_world/ctm_1.sql new file mode 100644 index 000000000..bf6d1c137 --- /dev/null +++ b/data/sql/updates/pending_db_world/ctm_1.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (15242, 18707, 22441, 8276); +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES (15242, 1, 0, 1, 0, 0, 0), +(18707, 1, 0, 1, 0, 0, 0), +(22441, 1, 0, 1, 0, 0, 0), +(8276, 1, 0, 1, 0, 0, 0); From cd576790c9240717fe2e8bfe97c20b9c0c48b53a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 1 Jul 2022 20:52:42 +0000 Subject: [PATCH 05/33] chore(DB): import pending files Referenced commit(s): 211a6d4c0871be619315b7313bb11d248bb2318c --- .../{pending_db_world/ctm_1.sql => db_world/2022_07_01_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/ctm_1.sql => db_world/2022_07_01_03.sql} (87%) diff --git a/data/sql/updates/pending_db_world/ctm_1.sql b/data/sql/updates/db_world/2022_07_01_03.sql similarity index 87% rename from data/sql/updates/pending_db_world/ctm_1.sql rename to data/sql/updates/db_world/2022_07_01_03.sql index bf6d1c137..2cb1c048c 100644 --- a/data/sql/updates/pending_db_world/ctm_1.sql +++ b/data/sql/updates/db_world/2022_07_01_03.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_01_02 -> 2022_07_01_03 -- DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (15242, 18707, 22441, 8276); INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES (15242, 1, 0, 1, 0, 0, 0), From 8de594e0005c1a52c3a4407b153d472b2e134891 Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Sat, 2 Jul 2022 17:41:37 +0430 Subject: [PATCH 06/33] feat(Core/Scripts): Added Boundary in Azjol nerub (#12159) --- .../AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 9c529ca8c..55fa7d7c5 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AreaBoundary.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "azjol_nerub.h" @@ -34,6 +35,13 @@ ObjectData const creatureData[] = { NPC_HADRONOX, DATA_HADRONOX_EVENT } }; +BossBoundaryData const boundaries = +{ + { DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, new RectangleBoundary(400.0f, 580.0f, 623.5f, 810.0f) }, + { DATA_HADRONOX_EVENT, new ZRangeBoundary(666.0f, 776.0f) }, + { DATA_ANUBARAK_EVENT, new CircleBoundary(Position(550.6178f, 253.5917f), 26.0f) } +}; + class instance_azjol_nerub : public InstanceMapScript { public: @@ -44,6 +52,7 @@ public: instance_azjol_nerub_InstanceScript(Map* map) : InstanceScript(map) { SetBossNumber(MAX_ENCOUNTERS); + LoadBossBoundaries(boundaries); LoadDoorData(doorData); LoadObjectData(creatureData, nullptr); }; From 16f2983307aeeb39bd263e3e923c93c16488444f Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 2 Jul 2022 13:37:56 -0300 Subject: [PATCH 07/33] fix(Scripts/ZulGurub): Thekal improvements (#12238) * fix(Scripts/ZulGurub): Thekal improvements * Update boss_thekal.cpp --- .../rev_1656502396301969700.sql | 5 + src/server/game/Entities/Creature/Creature.h | 2 - .../EasternKingdoms/ZulGurub/boss_thekal.cpp | 93 +++++++------------ .../ZulGurub/instance_zulgurub.cpp | 1 - 4 files changed, 38 insertions(+), 63 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1656502396301969700.sql diff --git a/data/sql/updates/pending_db_world/rev_1656502396301969700.sql b/data/sql/updates/pending_db_world/rev_1656502396301969700.sql new file mode 100644 index 000000000..1424f51c7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656502396301969700.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature_formations` WHERE `memberGUID` IN (49313, 49314); +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(49310, 49313, 0, 0, 27, 0, 0), +(49310, 49314, 0, 0, 27, 0, 0); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index e132b7ffb..e404dcc83 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -384,8 +384,6 @@ public: void ModifyThreatPercentTemp(Unit* victim, int32 percent, Milliseconds duration); - void ResetFaction() { SetFaction(GetCreatureTemplate()->faction); } - protected: bool CreateFromProto(ObjectGuid::LowType guidlow, uint32 Entry, uint32 vehId, const CreatureData* data = nullptr); bool InitEntry(uint32 entry, const CreatureData* data = nullptr); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index c646774b6..de71c138f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -71,9 +71,6 @@ public: Initialize(); } - bool Enraged; - bool WasDead; - void Initialize() { Enraged = false; @@ -90,17 +87,16 @@ public: me->SetStandState(UNIT_STAND_STATE_STAND); me->SetReactState(REACT_AGGRESSIVE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->LoadEquipment(1, true); if (Creature* zealot = instance->GetCreature(DATA_LORKHAN)) { zealot->AI()->Reset(); - zealot->ResetFaction(); } if (Creature* zealot = instance->GetCreature(DATA_ZATH)) { zealot->AI()->Reset(); - zealot->ResetFaction(); } _scheduler.SetValidator([this] @@ -157,16 +153,21 @@ public: void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override { - if (!WasDead && damage >= me->GetHealth()) + if (me->GetEntry() == NPC_HIGH_PRIEST_THEKAL && damage >= me->GetHealth()) { damage = me->GetHealth() - 1; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->AttackStop(); - WasDead = true; - CheckPhaseTransition(); - Talk(EMOTE_THEKAL_DIES); + + if (!WasDead) + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->AttackStop(); + DoResetThreat(); + WasDead = true; + CheckPhaseTransition(); + Talk(EMOTE_THEKAL_DIES); + } } if (!Enraged && me->HealthBelowPctDamaged(20, damage) && me->GetEntry() != NPC_HIGH_PRIEST_THEKAL) @@ -182,7 +183,7 @@ public: { me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->ResetFaction(); + me->RestoreFaction(); me->SetReactState(REACT_AGGRESSIVE); me->SetFullHealth(); WasDead = false; @@ -202,11 +203,7 @@ public: { if (Creature* zealot = instance->GetCreature(zealotData)) { - zealot->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - zealot->ResetFaction(); - zealot->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - zealot->SetReactState(REACT_AGGRESSIVE); - zealot->SetFullHealth(); + zealot->Respawn(true); UpdateZealotStatus(zealotData, false); } } @@ -231,10 +228,10 @@ public: Talk(SAY_AGGRO); me->SetStandState(UNIT_STAND_STATE_STAND); me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - DoResetThreat(); _scheduler.Schedule(6s, [this](TaskContext /*context*/) { DoCastSelf(SPELL_TIGER_FORM); + me->LoadEquipment(0, true); me->SetReactState(REACT_AGGRESSIVE); _scheduler.Schedule(30s, [this](TaskContext context) { @@ -261,7 +258,10 @@ public: else { _scheduler.Schedule(10s, [this](TaskContext /*context*/) { - DoAction(ACTION_RESSURRECT); + if (!(WasDead && _lorkhanDied && _zathDied)) + { + DoAction(ACTION_RESSURRECT); + } }); } } @@ -271,6 +271,8 @@ public: GuidVector _catGuids; bool _lorkhanDied; bool _zathDied; + bool Enraged; + bool WasDead; }; CreatureAI* GetAI(Creature* creature) const override @@ -295,10 +297,6 @@ public: void Reset() override { - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetReactState(REACT_AGGRESSIVE); - _scheduler.CancelAll(); _scheduler.SetValidator([this] @@ -339,24 +337,13 @@ public: }); } - void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + void JustDied(Unit* /*killer*/) override { - if (damage >= me->GetHealth() && me->HasReactState(REACT_AGGRESSIVE)) + Talk(EMOTE_ZEALOT_DIES); + + if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) { - Talk(EMOTE_ZEALOT_DIES); - me->RemoveAllAuras(); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->SetReactState(REACT_PASSIVE); - me->InterruptNonMeleeSpells(false); - me->AttackStop(); - - damage = 0; - - if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) - { - thekal->AI()->SetData(ACTION_RESSURRECT, DATA_LORKHAN); - } + thekal->AI()->SetData(ACTION_RESSURRECT, DATA_LORKHAN); } } @@ -395,10 +382,6 @@ public: void Reset() override { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetReactState(REACT_AGGRESSIVE); - _scheduler.CancelAll(); _scheduler.SetValidator([this] @@ -436,23 +419,13 @@ public: }); } - void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + void JustDied(Unit* /*killer*/) override { - if (damage >= me->GetHealth() && me->HasReactState(REACT_AGGRESSIVE)) + Talk(EMOTE_ZEALOT_DIES); + + if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) { - Talk(EMOTE_ZEALOT_DIES); - me->RemoveAllAuras(); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->SetReactState(REACT_PASSIVE); - me->AttackStop(); - - damage = 0; - - if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) - { - thekal->AI()->SetData(ACTION_RESSURRECT, DATA_ZATH); - } + thekal->AI()->SetData(ACTION_RESSURRECT, DATA_ZATH); } } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 2cab32c31..325dd749c 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -51,7 +51,6 @@ public: instance_zulgurub_InstanceMapScript(Map* map) : InstanceScript(map) { SetBossNumber(EncounterCount); - LoadObjectData(creatureData, nullptr); LoadDoorData(doorData); LoadObjectData(creatureData, nullptr); } From 8aa74a23b36bd8d129b68ed2186f458c4e6a758c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 2 Jul 2022 16:39:52 +0000 Subject: [PATCH 08/33] chore(DB): import pending files Referenced commit(s): 16f2983307aeeb39bd263e3e923c93c16488444f --- .../rev_1656502396301969700.sql => db_world/2022_07_02_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656502396301969700.sql => db_world/2022_07_02_00.sql} (85%) diff --git a/data/sql/updates/pending_db_world/rev_1656502396301969700.sql b/data/sql/updates/db_world/2022_07_02_00.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1656502396301969700.sql rename to data/sql/updates/db_world/2022_07_02_00.sql index 1424f51c7..247f6bd61 100644 --- a/data/sql/updates/pending_db_world/rev_1656502396301969700.sql +++ b/data/sql/updates/db_world/2022_07_02_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_01_03 -> 2022_07_02_00 -- DELETE FROM `creature_formations` WHERE `memberGUID` IN (49313, 49314); INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES From 5282ef7ff8e3039b5d3606ded7072fa4b64b1c3f Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 2 Jul 2022 19:51:00 +0200 Subject: [PATCH 09/33] fix(DB/Quest): Fixed getting kill credit for quest "A Delicate Touch" (#12272) Fixes #12210 --- data/sql/updates/pending_db_world/rev_1656776031584499100.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656776031584499100.sql diff --git a/data/sql/updates/pending_db_world/rev_1656776031584499100.sql b/data/sql/updates/pending_db_world/rev_1656776031584499100.sql new file mode 100644 index 000000000..6f0091bfc --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656776031584499100.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x00200000 WHERE `entry` IN (29618,29619); +UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid`=29475 AND `source_type`=0 AND `id` IN (2,3); From ea453acec0f1b55f6e641b372641931d5010acec Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 2 Jul 2022 17:53:03 +0000 Subject: [PATCH 10/33] chore(DB): import pending files Referenced commit(s): 5282ef7ff8e3039b5d3606ded7072fa4b64b1c3f --- .../rev_1656776031584499100.sql => db_world/2022_07_02_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656776031584499100.sql => db_world/2022_07_02_01.sql} (82%) diff --git a/data/sql/updates/pending_db_world/rev_1656776031584499100.sql b/data/sql/updates/db_world/2022_07_02_01.sql similarity index 82% rename from data/sql/updates/pending_db_world/rev_1656776031584499100.sql rename to data/sql/updates/db_world/2022_07_02_01.sql index 6f0091bfc..50f873011 100644 --- a/data/sql/updates/pending_db_world/rev_1656776031584499100.sql +++ b/data/sql/updates/db_world/2022_07_02_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_02_00 -> 2022_07_02_01 -- UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x00200000 WHERE `entry` IN (29618,29619); UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid`=29475 AND `source_type`=0 AND `id` IN (2,3); From e1e4c6cddc44971054c61df1a884ac7c795c8b73 Mon Sep 17 00:00:00 2001 From: Meramaf <76571216+Meramaf@users.noreply.github.com> Date: Sat, 2 Jul 2022 22:30:58 +0200 Subject: [PATCH 11/33] Script/Spell: fix Midsummer's Juggling Torch (#12198) * Script/Spell: fix Midsummer's Juggling Torch * Update juggling_torch_fix.sql * Update data/sql/updates/pending_db_world/juggling_torch_fix.sql Co-authored-by: Nefertumm * Update midsummer.cpp Co-authored-by: Nefertumm --- .../pending_db_world/juggling_torch_fix.sql | 3 ++ src/server/scripts/Events/midsummer.cpp | 34 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/juggling_torch_fix.sql diff --git a/data/sql/updates/pending_db_world/juggling_torch_fix.sql b/data/sql/updates/pending_db_world/juggling_torch_fix.sql new file mode 100644 index 000000000..aa85b3bd0 --- /dev/null +++ b/data/sql/updates/pending_db_world/juggling_torch_fix.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` = 45644; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(45644, "spell_midsummer_torch_catch"); diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 66e217d0c..3fe6b35e1 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -453,7 +453,8 @@ enum eJuggle SPELL_TORCH_CHECK = 45644, SPELL_GIVE_TORCH = 45280, - QUEST_CHECK = 11937, + QUEST_TORCH_CATCHING_A = 11657, + QUEST_TORCH_CATCHING_H = 11923 }; class spell_midsummer_juggling_torch : public SpellScript @@ -507,6 +508,36 @@ class spell_midsummer_juggling_torch : public SpellScript } }; +// 45644 - Juggle Torch (Catch) +class spell_midsummer_torch_catch : public SpellScript +{ + PrepareSpellScript(spell_midsummer_torch_catch); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_GIVE_TORCH }); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Player* player = GetHitPlayer(); + if (!player) + { + return; + } + + if (player->GetQuestStatus(QUEST_TORCH_CATCHING_A) == QUEST_STATUS_REWARDED || player->GetQuestStatus(QUEST_TORCH_CATCHING_H) == QUEST_STATUS_REWARDED) + { + player->CastSpell(player, SPELL_GIVE_TORCH); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_midsummer_torch_catch::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_event_midsummer_scripts() { // NPCs @@ -520,4 +551,5 @@ void AddSC_event_midsummer_scripts() RegisterSpellScript(spell_midsummer_torch_quest); RegisterSpellScript(spell_midsummer_fling_torch); RegisterSpellScript(spell_midsummer_juggling_torch); + RegisterSpellScript(spell_midsummer_torch_catch); } From 0de832cdca8bd109a87bb0a59dea579b8daf7788 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 2 Jul 2022 20:32:56 +0000 Subject: [PATCH 12/33] chore(DB): import pending files Referenced commit(s): e1e4c6cddc44971054c61df1a884ac7c795c8b73 --- .../juggling_torch_fix.sql => db_world/2022_07_02_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/juggling_torch_fix.sql => db_world/2022_07_02_02.sql} (79%) diff --git a/data/sql/updates/pending_db_world/juggling_torch_fix.sql b/data/sql/updates/db_world/2022_07_02_02.sql similarity index 79% rename from data/sql/updates/pending_db_world/juggling_torch_fix.sql rename to data/sql/updates/db_world/2022_07_02_02.sql index aa85b3bd0..4b26ebfb3 100644 --- a/data/sql/updates/pending_db_world/juggling_torch_fix.sql +++ b/data/sql/updates/db_world/2022_07_02_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_02_01 -> 2022_07_02_02 DELETE FROM `spell_script_names` WHERE `spell_id` = 45644; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (45644, "spell_midsummer_torch_catch"); From 70a77d9dda6d5b5c2efdff8f513680344778d23b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:33:33 +0200 Subject: [PATCH 13/33] =?UTF-8?q?fix(DB/SAI):=20Fixed=20completing=20"Iron?= =?UTF-8?q?=20Rune=20Constructs=20and=20You:=20The=20Bluf=E2=80=A6=20(#122?= =?UTF-8?q?99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Fixed completing "Iron Rune Constructs and You: The Bluff" quest. Fixes #12237 --- data/sql/updates/pending_db_world/rev_1656850805352764600.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656850805352764600.sql diff --git a/data/sql/updates/pending_db_world/rev_1656850805352764600.sql b/data/sql/updates/pending_db_world/rev_1656850805352764600.sql new file mode 100644 index 000000000..78762e44c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656850805352764600.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=24823 AND `source_type`=0; +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_param3`=5000, `event_param4`=5000 WHERE `entryorguid`=24718 AND `source_type`=0 AND `id`=1; From a87860dd7fde9adc610e92b10ae8215aaf760e90 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 14:35:42 +0000 Subject: [PATCH 14/33] chore(DB): import pending files Referenced commit(s): 70a77d9dda6d5b5c2efdff8f513680344778d23b --- .../rev_1656850805352764600.sql => db_world/2022_07_03_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656850805352764600.sql => db_world/2022_07_03_00.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1656850805352764600.sql b/data/sql/updates/db_world/2022_07_03_00.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1656850805352764600.sql rename to data/sql/updates/db_world/2022_07_03_00.sql index 78762e44c..465971ea5 100644 --- a/data/sql/updates/pending_db_world/rev_1656850805352764600.sql +++ b/data/sql/updates/db_world/2022_07_03_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_02_02 -> 2022_07_03_00 -- UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=24823 AND `source_type`=0; UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_param3`=5000, `event_param4`=5000 WHERE `entryorguid`=24718 AND `source_type`=0 AND `id`=1; From 0a71a46c50da51bafe4ab6b5bf6b9ca4f1c83b7d Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:35:51 +0200 Subject: [PATCH 15/33] fix(Core/Spells): Place Fake Fur should activate Caribou Trap. (#12297) Fixes #12226 --- 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 95de9e7cb..546057bbc 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4301,6 +4301,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].MiscValueB = 64; }); + // Place Fake Fur + ApplySpellFix({ 46085 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].MiscValue = 8; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 44094613b57a6cc561d11fc84d1611f780bec0f0 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:37:02 +0200 Subject: [PATCH 16/33] fix(Core): Crashfix. (#12296) --- .../scripts/Northrend/zone_howling_fjord.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index 786b7b5a3..94379e484 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -125,20 +125,27 @@ public: { if (HealthBelowPct(50) && !health50) { - WorldObject* summoner = nullptr; if (TempSummon const* tempSummon = me->ToTempSummon()) { - summoner = tempSummon->GetSummonerUnit(); + if (WorldObject* summoner = tempSummon->GetSummonerUnit()) + { + Talk(SAY_TURMOIL_HALF_HP, summoner); + } } - Talk(SAY_TURMOIL_HALF_HP, summoner); health50 = true; } } void JustDied(Unit* /*killer*/) override { - Talk(SAY_TURMOIL_DEATH, me->ToTempSummon()->GetSummonerUnit()->ToPlayer()); + if (TempSummon const* tempSummon = me->ToTempSummon()) + { + if (WorldObject* summoner = tempSummon->GetSummonerUnit()) + { + Talk(SAY_TURMOIL_DEATH, summoner); + } + } } void setphase(short newPhase) From b76b6c4e2fde1811896ea78f5ef1061e19903736 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:38:38 +0200 Subject: [PATCH 17/33] =?UTF-8?q?fix(DB/SAI):=20Plague=20Cauldron=20Target?= =?UTF-8?q?=20should=20remove=20all=20auras=20on=20event=20=E2=80=A6=20(#1?= =?UTF-8?q?2294)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Plague Cauldron Target should remove all auras on event completion. Fixes #12221 --- data/sql/updates/pending_db_world/rev_1656841188208731500.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656841188208731500.sql diff --git a/data/sql/updates/pending_db_world/rev_1656841188208731500.sql b/data/sql/updates/pending_db_world/rev_1656841188208731500.sql new file mode 100644 index 000000000..7230a11c2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656841188208731500.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=3177300 AND `source_type`=9 AND `id`=46; +INSERT INTO `smart_scripts` VALUES +(3177300,9,46,0,0,0,100,0,0,0,0,0,0,28,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Script9 - Remove all auras'); From d0b3f1e1c61ff6aaac9bf28a5c6704948acf521f Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 14:40:32 +0000 Subject: [PATCH 18/33] chore(DB): import pending files Referenced commit(s): b76b6c4e2fde1811896ea78f5ef1061e19903736 --- .../rev_1656841188208731500.sql => db_world/2022_07_03_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656841188208731500.sql => db_world/2022_07_03_01.sql} (83%) diff --git a/data/sql/updates/pending_db_world/rev_1656841188208731500.sql b/data/sql/updates/db_world/2022_07_03_01.sql similarity index 83% rename from data/sql/updates/pending_db_world/rev_1656841188208731500.sql rename to data/sql/updates/db_world/2022_07_03_01.sql index 7230a11c2..26277ddb2 100644 --- a/data/sql/updates/pending_db_world/rev_1656841188208731500.sql +++ b/data/sql/updates/db_world/2022_07_03_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_03_00 -> 2022_07_03_01 -- DELETE FROM `smart_scripts` WHERE `entryorguid`=3177300 AND `source_type`=9 AND `id`=46; INSERT INTO `smart_scripts` VALUES From f818016bf65a847e18bf91c5c2dca5667c5a4333 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:47:42 +0200 Subject: [PATCH 19/33] =?UTF-8?q?fix(DB/SAI):=20Fixed=20Blight=20Geist=20n?= =?UTF-8?q?ot=20collecting=20crystal=20while=20being=20ch=E2=80=A6=20(#122?= =?UTF-8?q?92)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Fixed Blight Geist not collecting crystal while being charmed. Fixes #12220 --- data/sql/updates/pending_db_world/rev_1656838867557419200.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656838867557419200.sql diff --git a/data/sql/updates/pending_db_world/rev_1656838867557419200.sql b/data/sql/updates/pending_db_world/rev_1656838867557419200.sql new file mode 100644 index 000000000..05960de71 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656838867557419200.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=28750 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=2875000 AND `source_type`=9; From b661fac0bd09e70eba1a4e1b3ffec397e358220a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 14:49:41 +0000 Subject: [PATCH 20/33] chore(DB): import pending files Referenced commit(s): f818016bf65a847e18bf91c5c2dca5667c5a4333 --- .../rev_1656838867557419200.sql => db_world/2022_07_03_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656838867557419200.sql => db_world/2022_07_03_02.sql} (81%) diff --git a/data/sql/updates/pending_db_world/rev_1656838867557419200.sql b/data/sql/updates/db_world/2022_07_03_02.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1656838867557419200.sql rename to data/sql/updates/db_world/2022_07_03_02.sql index 05960de71..417f6803c 100644 --- a/data/sql/updates/pending_db_world/rev_1656838867557419200.sql +++ b/data/sql/updates/db_world/2022_07_03_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_03_01 -> 2022_07_03_02 -- UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=28750 AND `source_type`=0 AND `id`=5; UPDATE `smart_scripts` SET `event_flags`=512 WHERE `entryorguid`=2875000 AND `source_type`=9; From 7b9a5a676b5439d8f5875fe7056cb7ab8821b773 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 17:20:33 +0200 Subject: [PATCH 21/33] fix(Core/Spells): Smash Mammoth Trap should open Mammoth Calf's trap. (#12295) Fixes #12225 --- 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 546057bbc..2ef18974e 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4307,6 +4307,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].MiscValue = 8; }); + // Smash Mammoth Trap + ApplySpellFix({ 46201 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].MiscValue = 8; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 65e02d9422ea886e5d4500e8a692c38807e579b4 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 17:22:25 +0200 Subject: [PATCH 22/33] =?UTF-8?q?fix(Core/SmartScripts):=20Added=20option?= =?UTF-8?q?=20to=20override=20current=20running=20time=E2=80=A6=20(#12298)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/SmartScripts): Added option to override current running timed actionlist. Fixes #12227 --- .../updates/pending_db_world/rev_1656849991610651600.sql | 2 ++ src/server/game/AI/SmartScripts/SmartScript.cpp | 4 ++-- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 6 +++++- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1656849991610651600.sql diff --git a/data/sql/updates/pending_db_world/rev_1656849991610651600.sql b/data/sql/updates/pending_db_world/rev_1656849991610651600.sql new file mode 100644 index 000000000..5b39602f3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656849991610651600.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param3`=1 WHERE `entryorguid`=26293 AND `source_type`=0 AND `id`=2; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 1f8cb7030..d1da549cf 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -5099,8 +5099,8 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry) return; } - // Do NOT allow to start a new actionlist if a previous one is already running. We need to always finish the current actionlist - if (!mTimedActionList.empty()) + // Do NOT allow to start a new actionlist if a previous one is already running, unless explicitly allowed. We need to always finish the current actionlist + if (!e.action.timedActionList.allowOverride && !mTimedActionList.empty()) { return; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 23a93f166..82292262d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1774,9 +1774,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) AC_SAI_IS_BOOLEAN_VALID(e, e.action.setHealthRegen.regenHealth); break; } + case SMART_ACTION_CALL_TIMED_ACTIONLIST: + { + AC_SAI_IS_BOOLEAN_VALID(e, e.action.timedActionList.allowOverride); + break; + } case SMART_ACTION_FLEE_FOR_ASSIST: case SMART_ACTION_MOVE_TO_POS: - case SMART_ACTION_CALL_TIMED_ACTIONLIST: case SMART_ACTION_EVADE: case SMART_ACTION_SET_ACTIVE: case SMART_ACTION_START_CLOSEST_WAYPOINT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0867679fe..c8f3f2609 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1081,6 +1081,7 @@ struct SmartAction { uint32 id; uint32 timerType; + SAIBool allowOverride; } timedActionList; struct From 145f81d40fff8ce033d3286c3f93a0294331b979 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 15:24:25 +0000 Subject: [PATCH 23/33] chore(DB): import pending files Referenced commit(s): 65e02d9422ea886e5d4500e8a692c38807e579b4 --- .../rev_1656849991610651600.sql => db_world/2022_07_03_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1656849991610651600.sql => db_world/2022_07_03_03.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1656849991610651600.sql b/data/sql/updates/db_world/2022_07_03_03.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1656849991610651600.sql rename to data/sql/updates/db_world/2022_07_03_03.sql index 5b39602f3..c05ceef90 100644 --- a/data/sql/updates/pending_db_world/rev_1656849991610651600.sql +++ b/data/sql/updates/db_world/2022_07_03_03.sql @@ -1,2 +1,3 @@ +-- DB update 2022_07_03_02 -> 2022_07_03_03 -- UPDATE `smart_scripts` SET `action_param3`=1 WHERE `entryorguid`=26293 AND `source_type`=0 AND `id`=2; From 5bb62cd540de43abab77c75d5a5818d1977f0838 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 21:26:17 +0200 Subject: [PATCH 24/33] fix(DB/SAI): Fixed completing quest "What Book? I Don't See Any Book" (#12289) Fixes #12213 --- data/sql/updates/pending_db_world/rev_1656831380141778300.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656831380141778300.sql diff --git a/data/sql/updates/pending_db_world/rev_1656831380141778300.sql b/data/sql/updates/pending_db_world/rev_1656831380141778300.sql new file mode 100644 index 000000000..2762326d9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656831380141778300.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid`=19720 AND `source_type`=0 AND `id`=22; From d7d04c62b150ddaa918b83ce21aea0343aecf876 Mon Sep 17 00:00:00 2001 From: acidmanifesto Date: Sun, 3 Jul 2022 15:26:50 -0400 Subject: [PATCH 25/33] fix (db): Graveyard Horde Teldrassil (#12278) * fix (db): Graveyard horde Teldrassil * update (db): update for workflow code style check * fix (db): File Rename * update (db): Typo --- .../pending_db_world/darnassus_grave_fixit.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/darnassus_grave_fixit.sql diff --git a/data/sql/updates/pending_db_world/darnassus_grave_fixit.sql b/data/sql/updates/pending_db_world/darnassus_grave_fixit.sql new file mode 100644 index 000000000..901597db9 --- /dev/null +++ b/data/sql/updates/pending_db_world/darnassus_grave_fixit.sql @@ -0,0 +1,13 @@ +-- delete wrong game_graveyard link to graveyard_zone +DELETE FROM `graveyard_zone` WHERE `ID`=469 AND `GhostZone`=141; +DELETE FROM `graveyard_zone` WHERE `ID`=469 AND `GhostZone`=1657; + +-- originally was faction 469 alliance and should be 0 ID originally 469 +DELETE FROM `graveyard_zone` WHERE `ID`=91 AND `GhostZone`=141; +INSERT INTO `graveyard_zone` (`ID`, `GhostZone`, `Faction`, `Comment`) VALUES +(91, 141, 0, 'Teldrassil, Dolanaar GY'); + +-- id originally 469 +DELETE FROM `graveyard_zone` WHERE `ID`=91 AND `GhostZone`=1657; +INSERT INTO `graveyard_zone` (`ID`, `GhostZone`, `Faction`, `Comment`) VALUES +(91, 1657, 67, 'Teldrassil, Dolanaar GY'); From e6a6dceaee7bfb9e65a8652277b15ac9a059dc03 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 21:28:36 +0200 Subject: [PATCH 26/33] =?UTF-8?q?fix(Core/Combat):=20Removed=20`UNIT=5FFLA?= =?UTF-8?q?G=5FIMMUNE=5FTO=5FPC`=20when=20entering=20comb=E2=80=A6=20(#122?= =?UTF-8?q?88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Combat): Removed `UNIT_FLAG_IMMUNE_TO_PC` when entering combat with player. Fixes #12211 Fixes #12214 Fixes #12219 Fixes #12212 --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 317f747db..07e9c6288 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13163,7 +13163,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy, uint32 duration) // xinef: if we somehow engage in combat (scripts, dunno) with player, remove this flag so he can fight back if (GetTypeId() == TYPEID_UNIT && enemy && IsImmuneToPC() && enemy->GetCharmerOrOwnerPlayerOrPlayerItself()) - SetImmuneToPC(true); // unit has engaged in combat, remove immunity so players can fight back + SetImmuneToPC(false); // unit has engaged in combat, remove immunity so players can fight back if (IsInCombat()) return; From 1c3faed4dbd5a9ddfee0ea3ff6a55b70b782be3b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 3 Jul 2022 21:29:29 +0200 Subject: [PATCH 27/33] fix(DB/SAI): Heb'Jin should not evade on attack. Source: TrinityCore. (#12270) * fix(DB/SAI): Heb'Jin should not evade on attack. Fixes #12209 * Update. * Update. * Update. --- .../rev_1656757421461118700.sql | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656757421461118700.sql diff --git a/data/sql/updates/pending_db_world/rev_1656757421461118700.sql b/data/sql/updates/pending_db_world/rev_1656757421461118700.sql new file mode 100644 index 000000000..85fccf8c4 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656757421461118700.sql @@ -0,0 +1,80 @@ +-- +SET @NPC_HEBJIN := 28636; +SET @NPC_BAT := 28639; +SET @GO_DRUM := 190695; + +DELETE FROM `creature` WHERE `guid` IN (117079,117301); + +UPDATE `creature_template` SET `speed_run`=0.857143, `unit_flags`=33024, `AIName`='SmartAI' WHERE `entry`=@NPC_HEBJIN; +UPDATE `creature_template` SET `speed_run`=2, `unit_flags`=256, `AIName`='SmartAI' WHERE `entry`=@NPC_BAT; + +DELETE FROM `event_scripts` WHERE `id`=18773; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(18773,0,10,@NPC_HEBJIN,180000,0,5988.715,-3878.036,417.1502,2.356194); + +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_DRUM; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_HEBJIN,@NPC_BAT) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_DRUM AND `source_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_HEBJIN*100,@NPC_BAT*100) 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`,`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 +(@NPC_HEBJIN,0,0,0,54,0,100,0,0,0,0,0,80,@NPC_HEBJIN*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - Just summoned - Run script'), +(@NPC_HEBJIN,0,1,2,38,0,100,0,0,1,0,0,11,52354,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin - On data 0 1 set - Spellcast Script Effect - Creature Attack GUID from Dot Variable'), +(@NPC_HEBJIN,0,2,3,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - On data 0 1 set - Set Home Pos'), +(@NPC_HEBJIN,0,3,4,61,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,5937.22,-3820.871,366.5563,0, 'Heb''Jin - On data 0 1 set - Move to position'), +(@NPC_HEBJIN,0,4,5,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - On data 0 1 set - Say line'), +(@NPC_HEBJIN,0,5,6,61,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - On data 0 1 set - Remove unit_flags IMMUNE_TO_PC'), +(@NPC_HEBJIN,0,6,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin - On data 0 1 set - Start attack'), +(@NPC_HEBJIN,0,7,0,0,0,100,0,1000,1000,7000,8000,11,12734,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - On update IC - Spellcast Ground Smash'), +(@NPC_HEBJIN,0,8,0,0,0,100,0,5000,5000,10000,12000,11,15548,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin - On update IC - Spellcast Thunder Clap'), +(@NPC_HEBJIN,0,9,0,13,0,100,0,12000,15000,0,0,11,12555,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Heb''Jin - On target casting - Spellcast Pummel'), + +(@NPC_BAT,0,0,1,11,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spawn - Remove unit_field_bytes1 (dead)'), +(@NPC_BAT,0,1,2,61,0,100,0,0,0,0,0,11,52353,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spawn - Spellcast Script Effect - Creature Capture GUID to Dot Variable'), +(@NPC_BAT,0,2,0,61,0,100,0,0,0,0,0,4,10892,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spawn - Play sound'), +(@NPC_BAT,0,3,0,27,0,100,1,0,0,0,0,53,1,@NPC_BAT,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On passenger boarded - Start WP movement'), +(@NPC_BAT,0,4,5,40,0,100,0,4,@NPC_BAT,0,0,28,43671,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On WP 4 reached - Remove aura Ride Vehicle'), +(@NPC_BAT,0,5,6,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_HEBJIN,10,0,0,0,0,0, 'Heb''Jin''s Bat - On WP 4 reached - Set data 0 1 Heb''Jin'), +(@NPC_BAT,0,6,0,61,0,100,0,0,0,0,0,80,@NPC_BAT*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On WP 4 reached - Run script'), +(@NPC_BAT,0,7,8,8,0,100,0,52151,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spellhit Bat Net - Set unit_flags IMMUNE_TO_PC'), +(@NPC_BAT,0,8,9,61,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spellhit Bat Net - Set unit_field_bytes1 (dead)'), +(@NPC_BAT,0,9,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat - On spellhit Bat Net - Despawn after 5 seconds'), + +(@GO_DRUM,1,0,1,70,0,100,0,2,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Heb''Jin''s Drum - On state changed - Store targetlist'), +(@GO_DRUM,1,1,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_HEBJIN,100,0,0,0,0,0, 'Heb''Jin''s Drum - On state changed - Send targetlist to Heb''Jin'), + +(@NPC_HEBJIN*100,9,0,0,0,0,100,0,0,0,0,0,11,52353,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin script - Spellcast Script Effect - Creature Capture GUID to Dot Variable'), +(@NPC_HEBJIN*100,9,1,0,0,0,100,0,3200,3200,0,0,11,52154,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin script - Spellcast Taunt'), +(@NPC_HEBJIN*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin script - Say line'), +(@NPC_HEBJIN*100,9,3,0,0,0,100,0,300,300,0,0,12,@NPC_BAT,8,0,0,0,0,8,0,0,0,5984.547,-3882.621,417.4379,1.919862, 'Heb''Jin script - Summon Heb''Jin''s Bat'), +(@NPC_HEBJIN*100,9,4,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_BAT,10,0,0,0,0,0, 'Heb''Jin script - Send targetlist'), +(@NPC_HEBJIN*100,9,5,0,0,0,100,0,5700,5700,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin script - Say line'), +(@NPC_HEBJIN*100,9,6,0,0,0,100,0,2400,2400,0,0,11,43671,0,0,0,0,0,19,@NPC_BAT,10,0,0,0,0,0, 'Heb''Jin script - Spellcast Ride Vehicle'), + +(@NPC_BAT*100,9,0,0,0,0,100,0,2000,2000,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Heb''Jin''s Bat script 1 - Remove unit_flags IMMUNE_TO_PC'), +(@NPC_BAT*100,9,1,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Heb''Jin''s Bat script 1 - Start attack'); + +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=190695; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=19069500; +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 +(190695, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - On state changed - Store targetlist'), +(190695, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 19069500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - Linked with Previous Event - Run Script'), +(19069500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 98562, 23837, 0, 0, 0,0,0, 'Heb\'Jin\'s Drum - Script - Set Data ELM General Purpose Bunny'), +(19069500, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 28636, 100, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - Script - Send Target list to heb jin'); + +UPDATE `smart_scripts` SET `action_param2`=2, `action_param3`=300000 WHERE `entryorguid`=2863600 AND `source_type`=9 AND `id`=3 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28636 AND `id`=9; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28639 AND `id`=10; +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 +(28636, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb Jin - On Evade - Despawn'), +(28639, 0, 10, 0, 7, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb Jins Bat - On Evade - Despawn'); + +DELETE FROM `event_scripts` WHERE `id`=18773; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=-98562; +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 +(-98562, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 45, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny - On Data Set - Set Data'), +(-98562, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 12, 28636, 2, 300000, 0, 0, 0, 8, 0, 0, 0, 5988.71, -3878.04, 417.15, 2.35619, 'ELM General Purpose Bunny - Linked with Previous Event - Spawn Heb Jin'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceId`=0 AND `SourceEntry`=-98562; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, -98562, 0, 0, 29, 1, 28636, 200, 0, 1, 0, 0, '', 'Only run SAI if no heb jin nearby'), +(22, 1, -98562, 0, 0, 29, 1, 28639, 200, 0, 1, 0, 0, '', 'Only run SAI if no heb jins bat nearby'); From b4192f9ea3722e9d5554408ddcb6e702f755367c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 19:33:04 +0000 Subject: [PATCH 28/33] chore(DB): import pending files Referenced commit(s): 1c3faed4dbd5a9ddfee0ea3ff6a55b70b782be3b --- .../darnassus_grave_fixit.sql => db_world/2022_07_03_04.sql} | 1 + .../rev_1656757421461118700.sql => db_world/2022_07_03_05.sql} | 1 + .../rev_1656831380141778300.sql => db_world/2022_07_03_06.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/darnassus_grave_fixit.sql => db_world/2022_07_03_04.sql} (93%) rename data/sql/updates/{pending_db_world/rev_1656757421461118700.sql => db_world/2022_07_03_05.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1656831380141778300.sql => db_world/2022_07_03_06.sql} (73%) diff --git a/data/sql/updates/pending_db_world/darnassus_grave_fixit.sql b/data/sql/updates/db_world/2022_07_03_04.sql similarity index 93% rename from data/sql/updates/pending_db_world/darnassus_grave_fixit.sql rename to data/sql/updates/db_world/2022_07_03_04.sql index 901597db9..2e36691c4 100644 --- a/data/sql/updates/pending_db_world/darnassus_grave_fixit.sql +++ b/data/sql/updates/db_world/2022_07_03_04.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_03_03 -> 2022_07_03_04 -- delete wrong game_graveyard link to graveyard_zone DELETE FROM `graveyard_zone` WHERE `ID`=469 AND `GhostZone`=141; DELETE FROM `graveyard_zone` WHERE `ID`=469 AND `GhostZone`=1657; diff --git a/data/sql/updates/pending_db_world/rev_1656757421461118700.sql b/data/sql/updates/db_world/2022_07_03_05.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1656757421461118700.sql rename to data/sql/updates/db_world/2022_07_03_05.sql index 85fccf8c4..9fa096ea0 100644 --- a/data/sql/updates/pending_db_world/rev_1656757421461118700.sql +++ b/data/sql/updates/db_world/2022_07_03_05.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_03_04 -> 2022_07_03_05 -- SET @NPC_HEBJIN := 28636; SET @NPC_BAT := 28639; diff --git a/data/sql/updates/pending_db_world/rev_1656831380141778300.sql b/data/sql/updates/db_world/2022_07_03_06.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1656831380141778300.sql rename to data/sql/updates/db_world/2022_07_03_06.sql index 2762326d9..5e9a7c2b6 100644 --- a/data/sql/updates/pending_db_world/rev_1656831380141778300.sql +++ b/data/sql/updates/db_world/2022_07_03_06.sql @@ -1,2 +1,3 @@ +-- DB update 2022_07_03_05 -> 2022_07_03_06 -- UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid`=19720 AND `source_type`=0 AND `id`=22; From 53736faf33e58291d1884c01666d650a4c0beea9 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:48:23 -0300 Subject: [PATCH 29/33] fix(DB/Creature): Silithid Swarm remove gold drop (#12262) Create silithid_swarm_gold.sql --- data/sql/updates/pending_db_world/silithid_swarm_gold.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/silithid_swarm_gold.sql diff --git a/data/sql/updates/pending_db_world/silithid_swarm_gold.sql b/data/sql/updates/pending_db_world/silithid_swarm_gold.sql new file mode 100644 index 000000000..40e1a7f2f --- /dev/null +++ b/data/sql/updates/pending_db_world/silithid_swarm_gold.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mingold` = 0, `maxgold` = 0 WHERE (`entry` = 4196); From 9673da19470d81a6f0dfc1b1cbe11dadc4ce5f79 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 3 Jul 2022 19:50:39 +0000 Subject: [PATCH 30/33] chore(DB): import pending files Referenced commit(s): 53736faf33e58291d1884c01666d650a4c0beea9 --- .../silithid_swarm_gold.sql => db_world/2022_07_03_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/silithid_swarm_gold.sql => db_world/2022_07_03_07.sql} (66%) diff --git a/data/sql/updates/pending_db_world/silithid_swarm_gold.sql b/data/sql/updates/db_world/2022_07_03_07.sql similarity index 66% rename from data/sql/updates/pending_db_world/silithid_swarm_gold.sql rename to data/sql/updates/db_world/2022_07_03_07.sql index 40e1a7f2f..b86e4dc34 100644 --- a/data/sql/updates/pending_db_world/silithid_swarm_gold.sql +++ b/data/sql/updates/db_world/2022_07_03_07.sql @@ -1,2 +1,3 @@ +-- DB update 2022_07_03_06 -> 2022_07_03_07 -- UPDATE `creature_template` SET `mingold` = 0, `maxgold` = 0 WHERE (`entry` = 4196); From c60d5fb9fd84f3139b503d360b8e576ce51b1541 Mon Sep 17 00:00:00 2001 From: mpfans Date: Tue, 5 Jul 2022 23:36:23 +0800 Subject: [PATCH 31/33] fix(DB/Quest): Fixed Tatjana's Horse not moving to final destination. (#12251) fixed `Anatoly Will Talk` quest --- data/sql/updates/pending_db_world/rev_1656651808535528313.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1656651808535528313.sql diff --git a/data/sql/updates/pending_db_world/rev_1656651808535528313.sql b/data/sql/updates/pending_db_world/rev_1656651808535528313.sql new file mode 100644 index 000000000..1abcd9869 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1656651808535528313.sql @@ -0,0 +1,2 @@ +-- fixed `Anatoly Will Talk` quest +UPDATE `smart_scripts` SET `event_flags`= 512 WHERE `entryorguid`= 2762600; From 21c9209eed6523fd8b3a45517135d16f8f6b3e7e Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Tue, 5 Jul 2022 12:37:30 -0300 Subject: [PATCH 32/33] fix(DB/waypoint): Alshirr Banebreath (14340) (#12256) * Create alshirr_waypoints.sql * Update alshirr_waypoints.sql --- .../pending_db_world/alshirr_waypoints.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 data/sql/updates/pending_db_world/alshirr_waypoints.sql diff --git a/data/sql/updates/pending_db_world/alshirr_waypoints.sql b/data/sql/updates/pending_db_world/alshirr_waypoints.sql new file mode 100644 index 000000000..080fc483f --- /dev/null +++ b/data/sql/updates/pending_db_world/alshirr_waypoints.sql @@ -0,0 +1,22 @@ +-- +DELETE FROM `waypoint_data` WHERE `id`=518940; +INSERT INTO `acore_world`.`waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`) VALUES +(518940, 1, 3866.84, -672.53, 328.888), +(518940, 2, 3866.84, -672.534, 328.888), +(518940, 3, 3818.17, -768.04, 314.71), +(518940, 4, 3881.4, -769.048, 311.51), +(518940, 5, 3892.74, -762.76, 312.98), +(518940, 6, 3863.57, -759.42, 312.95), +(518940, 7, 3844.86, -719.223, 324.47), +(518940, 8, 3894.64, -635.31, 336.71), +(518940, 9, 3932.94, -611.101, 340.266), +(518940, 10, 3981.27, -598.98, 338.19), +(518940, 11, 3932.94, -611.101, 340.266), +(518940, 12, 3894.64, -635.31, 336.71), +(518940, 13, 3844.86, -719.223, 324.47), +(518940, 14, 3863.57, -759.42, 312.95), +(518940, 15, 3892.74, -762.76, 312.98), +(518940, 16, 3881.4, -769.048, 311.51), +(518940, 17, 3818.17, -768.04, 314.71), +(518940, 18, 3866.84, -672.534, 328.888), +(518940, 19, 3866.84, -672.53, 328.888); From a00a966ca7bce1c4489130b4c3773420315ae534 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 5 Jul 2022 15:39:50 +0000 Subject: [PATCH 33/33] chore(DB): import pending files Referenced commit(s): 21c9209eed6523fd8b3a45517135d16f8f6b3e7e --- .../alshirr_waypoints.sql => db_world/2022_07_05_00.sql} | 1 + .../rev_1656651808535528313.sql => db_world/2022_07_05_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/alshirr_waypoints.sql => db_world/2022_07_05_00.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1656651808535528313.sql => db_world/2022_07_05_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/alshirr_waypoints.sql b/data/sql/updates/db_world/2022_07_05_00.sql similarity index 95% rename from data/sql/updates/pending_db_world/alshirr_waypoints.sql rename to data/sql/updates/db_world/2022_07_05_00.sql index 080fc483f..1fd915287 100644 --- a/data/sql/updates/pending_db_world/alshirr_waypoints.sql +++ b/data/sql/updates/db_world/2022_07_05_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_07_03_07 -> 2022_07_05_00 -- DELETE FROM `waypoint_data` WHERE `id`=518940; INSERT INTO `acore_world`.`waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1656651808535528313.sql b/data/sql/updates/db_world/2022_07_05_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1656651808535528313.sql rename to data/sql/updates/db_world/2022_07_05_01.sql index 1abcd9869..026eb3461 100644 --- a/data/sql/updates/pending_db_world/rev_1656651808535528313.sql +++ b/data/sql/updates/db_world/2022_07_05_01.sql @@ -1,2 +1,3 @@ +-- DB update 2022_07_05_00 -> 2022_07_05_01 -- fixed `Anatoly Will Talk` quest UPDATE `smart_scripts` SET `event_flags`= 512 WHERE `entryorguid`= 2762600;