diff --git a/data/sql/updates/db_world/2022_10_23_00.sql b/data/sql/updates/db_world/2022_10_23_00.sql new file mode 100644 index 000000000..19696850f --- /dev/null +++ b/data/sql/updates/db_world/2022_10_23_00.sql @@ -0,0 +1,9 @@ +-- DB update 2022_10_22_00 -> 2022_10_23_00 +-- +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11361 WHERE `Id`=11361; +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11361 WHERE `Id`=11449; +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11361 WHERE `Id`=11450; + +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11360 WHERE `Id`=11360; +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11360 WHERE `Id`=11439; +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `ExclusiveGroup`=11360 WHERE `Id`=11440; diff --git a/data/sql/updates/db_world/2022_10_23_01.sql b/data/sql/updates/db_world/2022_10_23_01.sql new file mode 100644 index 000000000..8db8f2cb6 --- /dev/null +++ b/data/sql/updates/db_world/2022_10_23_01.sql @@ -0,0 +1,3 @@ +-- DB update 2022_10_23_00 -> 2022_10_23_01 +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x00000200 WHERE `entry`=23543; diff --git a/data/sql/updates/db_world/2022_10_23_02.sql b/data/sql/updates/db_world/2022_10_23_02.sql new file mode 100644 index 000000000..e7450e4d9 --- /dev/null +++ b/data/sql/updates/db_world/2022_10_23_02.sql @@ -0,0 +1,3 @@ +-- DB update 2022_10_23_01 -> 2022_10_23_02 +-- +UPDATE `creature_template` SET `flags_extra`=2 WHERE `entry`=37915; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 02e9a1e74..4ee9b0e90 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17481,10 +17481,16 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackTyp // Xinef: additional check for player auras - only player spells can trigger player proc auras // Xinef: skip victim auras // Excluded player shoot spells - if (!isVictim && GetTypeId() == TYPEID_PLAYER) //spellProto->SpellFamilyName != SPELLFAMILY_GENERIC) - if (!(EventProcFlag & (PROC_FLAG_KILL | PROC_FLAG_DEATH)) && procSpell && procSpell->SpellFamilyName == SPELLFAMILY_GENERIC && procSpell->GetCategory() != 76 && + // Excluded player item spells + if (!isVictim && IsPlayer() && !(EventProcFlag & (PROC_FLAG_KILL | PROC_FLAG_DEATH))) + { + if (procSpell && procSpell->SpellFamilyName == SPELLFAMILY_GENERIC && procSpell->GetCategory() != 76 && + (!eventInfo.GetProcSpell() || !eventInfo.GetProcSpell()->m_CastItem) && (!eventInfo.GetTriggerAuraSpell() || eventInfo.GetTriggerAuraSpell()->SpellFamilyName == SPELLFAMILY_GENERIC)) + { return false; + } + } // Check spellProcEvent data requirements if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellProto, spellProcEvent, EventProcFlag, eventInfo, active)) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index cf4868eef..8281ec106 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5530,6 +5530,11 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) ExecuteLogEffectSummonObject(effIndex, linkedTrap); } + + if (Player* player = m_caster->ToPlayer()) + { + player->SetCanTeleport(true); + } } void Spell::EffectProspecting(SpellEffIndex /*effIndex*/) diff --git a/src/server/scripts/Events/hallows_end.cpp b/src/server/scripts/Events/hallows_end.cpp index 78a1063d8..8dec984ff 100644 --- a/src/server/scripts/Events/hallows_end.cpp +++ b/src/server/scripts/Events/hallows_end.cpp @@ -233,8 +233,6 @@ enum costumedOrphan // Actions ACTION_START_EVENT = 1, - DATA_EVENT = 1, - DATA_ALLOW_START = 2, // Talks TALK_SHADE_CONFLAGRATION = 0, @@ -323,7 +321,7 @@ class spell_hallows_end_base_fire : public AuraScript struct npc_costumed_orphan_matron : public ScriptedAI { - npc_costumed_orphan_matron(Creature* c) : ScriptedAI(c) { } + npc_costumed_orphan_matron(Creature* c) : ScriptedAI(c) {} uint32 eventStarted; bool allowQuest; @@ -340,48 +338,48 @@ struct npc_costumed_orphan_matron : public ScriptedAI { switch (me->GetAreaId()) { - case 87: // Goldshire - x = -9494.4f; - y = 48.53f; - z = 70.5f; - o = 0.5f; - path = 235431; - break; - case 131: // Kharanos - x = -5558.34f; - y = -499.46f; - z = 414.12f; - o = 2.08f; - path = 235432; - break; - case 3576: // Azure Watch - x = -4163.58f; - y = -12460.30f; - z = 63.02f; - o = 4.31f; - path = 235433; - break; - case 362: // Razor Hill - x = 373.2f; - y = -4723.4f; - z = 31.2f; - o = 3.2f; - path = 235434; - break; - case 159: // Brill - x = 2195.2f; - y = 264.0f; - z = 55.62f; - o = 0.15f; - path = 235435; - break; - case 3665: // Falcon Wing Square - x = 9547.91f; - y = -6809.9f; - z = 27.96f; - o = 3.4f; - path = 235436; - break; + case 87: // Goldshire + x = -9494.4f; + y = 48.53f; + z = 70.5f; + o = 0.5f; + path = 235431; + break; + case 131: // Kharanos + x = -5558.34f; + y = -499.46f; + z = 414.12f; + o = 2.08f; + path = 235432; + break; + case 3576: // Azure Watch + x = -4163.58f; + y = -12460.30f; + z = 63.02f; + o = 4.31f; + path = 235433; + break; + case 362: // Razor Hill + x = 373.2f; + y = -4723.4f; + z = 31.2f; + o = 3.2f; + path = 235434; + break; + case 159: // Brill + x = 2195.2f; + y = 264.0f; + z = 55.62f; + o = 0.15f; + path = 235435; + break; + case 3665: // Falcon Wing Square + x = 9547.91f; + y = -6809.9f; + z = 27.96f; + o = 3.4f; + path = 235436; + break; } } @@ -403,14 +401,6 @@ struct npc_costumed_orphan_matron : public ScriptedAI } } - uint32 GetData(uint32 param) const override - { - if (param == DATA_ALLOW_START) - return allowQuest; - - return 0; - } - void UpdateAI(uint32 diff) override { if (eventStarted) @@ -423,67 +413,78 @@ struct npc_costumed_orphan_matron : public ScriptedAI } } } -}; -bool OnGossipHello(Player* player, Creature* creature) -{ - QuestRelationBounds pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(creature->GetEntry()); - QuestRelationBounds pObjectQIR = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(creature->GetEntry()); - - QuestMenu& qm = player->PlayerTalkClass->GetQuestMenu(); - qm.ClearMenu(); - - for (QuestRelations::const_iterator i = pObjectQIR.first; i != pObjectQIR.second; ++i) + void sGossipHello(Player* player) override { - uint32 quest_id = i->second; - QuestStatus status = player->GetQuestStatus(quest_id); - if (status == QUEST_STATUS_COMPLETE) - qm.AddMenuItem(quest_id, 4); - else if (status == QUEST_STATUS_INCOMPLETE) - qm.AddMenuItem(quest_id, 4); - } + QuestRelationBounds pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(me->GetEntry()); + QuestRelationBounds pObjectQIR = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(me->GetEntry()); - for (QuestRelations::const_iterator i = pObjectQR.first; i != pObjectQR.second; ++i) - { - uint32 quest_id = i->second; - Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id); - if (!pQuest) - continue; + QuestMenu& qm = player->PlayerTalkClass->GetQuestMenu(); + qm.ClearMenu(); - if (!player->CanTakeQuest(pQuest, false)) - continue; - else if (player->GetQuestStatus(quest_id) == QUEST_STATUS_NONE) + for (QuestRelations::const_iterator i = pObjectQIR.first; i != pObjectQIR.second; ++i) { - switch (quest_id) + uint32 quest_id = i->second; + QuestStatus status = player->GetQuestStatus(quest_id); + if (status == QUEST_STATUS_COMPLETE) { - case QUEST_LET_THE_FIRES_COME_A: - case QUEST_LET_THE_FIRES_COME_H: - if (!creature->AI()->GetData(DATA_ALLOW_START)) - qm.AddMenuItem(quest_id, 2); - break; - case QUEST_STOP_THE_FIRES_A: - case QUEST_STOP_THE_FIRES_H: - if (creature->AI()->GetData(DATA_ALLOW_START)) - qm.AddMenuItem(quest_id, 2); - break; - default: - qm.AddMenuItem(quest_id, 2); - break; + qm.AddMenuItem(quest_id, 4); + } + else if (status == QUEST_STATUS_INCOMPLETE) + { + qm.AddMenuItem(quest_id, 4); } } + + for (QuestRelations::const_iterator i = pObjectQR.first; i != pObjectQR.second; ++i) + { + uint32 quest_id = i->second; + Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id); + if (!pQuest) + { + continue; + } + + if (!player->CanTakeQuest(pQuest, false)) + { + continue; + } + else if (player->GetQuestStatus(quest_id) == QUEST_STATUS_NONE) + { + switch (quest_id) + { + case QUEST_LET_THE_FIRES_COME_A: + case QUEST_LET_THE_FIRES_COME_H: + if (!allowQuest) + { + qm.AddMenuItem(quest_id, 2); + } + break; + case QUEST_STOP_THE_FIRES_A: + case QUEST_STOP_THE_FIRES_H: + if (allowQuest) + { + qm.AddMenuItem(quest_id, 2); + } + break; + default: + qm.AddMenuItem(quest_id, 2); + break; + } + } + } + + player->SendPreparedQuest(me->GetGUID()); } - player->SendPreparedQuest(creature->GetGUID()); - return true; -} - -bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) -{ - if ((quest->GetQuestId() == QUEST_LET_THE_FIRES_COME_A || quest->GetQuestId() == QUEST_LET_THE_FIRES_COME_H) && !creature->AI()->GetData(DATA_ALLOW_START)) - creature->AI()->DoAction(ACTION_START_EVENT); - - return true; -} + void sQuestAccept(Player* /*player*/, Quest const* quest) override + { + if ((quest->GetQuestId() == QUEST_LET_THE_FIRES_COME_A || quest->GetQuestId() == QUEST_LET_THE_FIRES_COME_H) && !allowQuest) + { + DoAction(ACTION_START_EVENT); + } + } +}; struct npc_soh_fire_trigger : public NullCreatureAI { diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index b77eb7bbb..4f887b83c 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -130,7 +130,7 @@ struct boss_sartura : public BossAI { SetGazeOn(target); } - DoCastSelf(SPELL_WHIRLWIND, true); + DoCastSelf(SPELL_WHIRLWIND); events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND_RANDOM, 2s, 7s); events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND_END, 15s); break; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 01fcee937..058ac46d4 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -309,7 +309,7 @@ struct boss_veknilash : public boss_twinemperorsAI _scheduler .Schedule(14s, [this](TaskContext context) { - DoCastRandomTarget(SPELL_UPPERCUT, 0, me->GetMeleeReach(), true); + DoCastRandomTarget(SPELL_UPPERCUT, 0, me->GetMeleeReach(), true, true); context.Repeat(4s, 15s); }) .Schedule(12s, [this](TaskContext context) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index 76fcb671f..f3ea97e89 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -33,7 +33,7 @@ enum Spells SPELL_SHADOW_STORM = 26555, SPELL_THUNDERCLAP = 26554, SPELL_ENRAGE = 14204, - SPELL_EXPLODE = 25699, + SPELL_EXPLODE = 25698, SPELL_SUMMON_WARRIOR = 17431, SPELL_SUMMON_SWARMGUARD = 17430, SPELL_SUMMON_LARGE_OBSIDIAN_CHUNK = 27630, // Server-side diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 7642d723f..b5900487e 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -265,7 +265,7 @@ public: } if (sWorld->getWorldState(STV_FISHING_ANNOUNCE_EVENT_BEGIN)) { - me->Yell(RIGGLE_SAY_START); + me->AI()->Talk(RIGGLE_SAY_START); sWorld->setWorldState(STV_FISHING_ANNOUNCE_EVENT_BEGIN, 0); } } @@ -285,7 +285,7 @@ public: { if (sWorld->getWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN)) { - me->Yell(RIGGLE_SAY_POOLS_END); + me->AI()->Talk(RIGGLE_SAY_POOLS_END); sWorld->setWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN, 0); } } @@ -328,7 +328,7 @@ public: if (quest->GetQuestId() == QUEST_MASTER_ANGLER) { creature->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER); - creature->Yell(RIGGLE_SAY_WINNER, player); + creature->AI()->Talk(RIGGLE_SAY_WINNER, player); sWorld->setWorldState(STV_FISHING_PREV_WIN_TIME, GameTime::GetGameTime().count()); sWorld->setWorldState(STV_FISHING_HAS_WINNER, 1); }