diff --git a/data/sql/updates/db_world/2023_03_24_00.sql b/data/sql/updates/db_world/2023_03_24_00.sql new file mode 100644 index 000000000..f343d5ad0 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_03_23_03 -> 2023_03_24_00 +-- +UPDATE `smart_scripts` SET `event_type`=1, `event_flags`=6, `event_param1`=2000, `event_param2`=6000, `event_param3`=18000, `event_param4`=24000, `action_param2`=0, `target_type`=1 WHERE `entryorguid`=17371 AND `source_type`=0 AND `id`=5; diff --git a/data/sql/updates/db_world/2023_03_24_01.sql b/data/sql/updates/db_world/2023_03_24_01.sql new file mode 100644 index 000000000..493e105a6 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_01.sql @@ -0,0 +1,7 @@ +-- DB update 2023_03_24_00 -> 2023_03_24_01 +SET @ENTRY := 18869; +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY; +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY; +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 +(@ENTRY, 0, 0, 0, 11, 0, 100, 1, 0, 0, 0, 0, 11, 34302, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On respawn - Self: Cast spell Coalesce (34302) with flags interrupt previous on Self'), +(@ENTRY, 0, 1, 0, 6, 0, 8, 1, 0, 0, 0, 0, 11, 36463, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On death - Self: Cast spell Unstable Rift (36463) with flags interrupt previous on Self'); diff --git a/data/sql/updates/db_world/2023_03_24_02.sql b/data/sql/updates/db_world/2023_03_24_02.sql new file mode 100644 index 000000000..b463b57e3 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_02.sql @@ -0,0 +1,8 @@ +-- DB update 2023_03_24_01 -> 2023_03_24_02 +-- Thule Ravenclaw - remove ranged movement +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 1947; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1947, 0, 0, 0, 0, 0, 85, 0, 5000, 5000, 20000, 30000, 0, 11, 7655, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Thule Ravenclaw - In Combat - Cast \'Hex of Ravenclaw\''), +(1947, 0, 1, 0, 0, 0, 85, 0, 1000, 1000, 7000, 12000, 0, 11, 20800, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Thule Ravenclaw - In Combat - Cast \'Immolate\''), +(1947, 0, 2, 0, 1, 0, 100, 1, 0, 0, 1000, 1000, 0, 11, 11939, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Thule Ravenclaw - Out of Combat - Cast \'Summon Imp\''), +(1947, 0, 3, 0, 4, 0, 85, 1, 0, 0, 0, 0, 0, 11, 13787, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Thule Ravenclaw - On Aggro - Cast \'Demon Armor\''); diff --git a/data/sql/updates/db_world/2023_03_24_03.sql b/data/sql/updates/db_world/2023_03_24_03.sql new file mode 100644 index 000000000..8cba36aa0 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_03.sql @@ -0,0 +1,8 @@ +-- DB update 2023_03_24_02 -> 2023_03_24_03 +-- Mosh'Ogg Spellcrafter +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 710; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(710, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Mosh\'Ogg Spellcrafter - On Aggro - Say Line 0'), +(710, 0, 1, 0, 23, 0, 100, 0, 12544, 0, 10000, 10000, 0, 11, 12544, 64, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Mosh\'Ogg Spellcrafter - On Aura \'Frost Armor\' Missing - Cast \'Frost Armor\''), +(710, 0, 2, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 11, 9053, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Mosh\'Ogg Spellcrafter - In Combat - Cast \'Fireball\''), +(710, 0, 3, 0, 0, 0, 100, 0, 5000, 9000, 12000, 15000, 0, 11, 11829, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Mosh\'Ogg Spellcrafter - In Combat - Cast \'Flamestrike\''); diff --git a/data/sql/updates/db_world/2023_03_24_04.sql b/data/sql/updates/db_world/2023_03_24_04.sql new file mode 100644 index 000000000..8eaebc693 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_04.sql @@ -0,0 +1,3 @@ +-- DB update 2023_03_24_03 -> 2023_03_24_04 +-- Ethereal Thief - Disarm timing +UPDATE `smart_scripts` SET `event_param1` = 9000, `event_param2` = 12000, `event_param3` = 15000, `event_param4` = 18000 WHERE `entryorguid` = 16544 AND `source_type` = 0 AND `id` = 4; diff --git a/data/sql/updates/db_world/2023_03_24_05.sql b/data/sql/updates/db_world/2023_03_24_05.sql new file mode 100644 index 000000000..6303d7629 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_05.sql @@ -0,0 +1,3 @@ +-- DB update 2023_03_24_04 -> 2023_03_24_05 +-- Remove (71) Darkmoon Faire Building (Mulgore) gameobjects from (24) Brewfest +DELETE FROM `game_event_gameobject` WHERE `eventEntry` = 24 AND `guid` IN (31919,31918,31916,31915,31914,31913,31912,31879,31878,31877,31876,31875,31874,31872); diff --git a/data/sql/updates/db_world/2023_03_24_06.sql b/data/sql/updates/db_world/2023_03_24_06.sql new file mode 100644 index 000000000..e86c5546d --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_06.sql @@ -0,0 +1,3 @@ +-- DB update 2023_03_24_05 -> 2023_03_24_06 +-- Violet Hold Guard, only the 2 right in front of VH should have emote 333. +UPDATE `creature_template_addon` SET `emote` = 0 WHERE `entry` = 30659; diff --git a/data/sql/updates/db_world/2023_03_24_07.sql b/data/sql/updates/db_world/2023_03_24_07.sql new file mode 100644 index 000000000..23b553c62 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_07.sql @@ -0,0 +1,8 @@ +-- DB update 2023_03_24_06 -> 2023_03_24_07 +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (8538, 8539)) AND (`source_type` = 0) AND (`id` IN (2)); + +DELETE FROM `creature_template_addon` WHERE (`entry` IN (8538, 8539)); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(8538, 0, 0, 0, 1, 0, 0, '16380'), +(8539, 0, 0, 0, 1, 0, 0, '16380'); diff --git a/data/sql/updates/db_world/2023_03_24_08.sql b/data/sql/updates/db_world/2023_03_24_08.sql new file mode 100644 index 000000000..208ef4ec6 --- /dev/null +++ b/data/sql/updates/db_world/2023_03_24_08.sql @@ -0,0 +1,5 @@ +-- DB update 2023_03_24_07 -> 2023_03_24_08 +-- +-- Slows the repeat behavior of NPCs 237 (Verna Furlbrow) and 238 (Farmer Furlbrow) dialogue to be authentic +UPDATE `smart_scripts` SET `event_param3`=1202000, `event_param4`=1202000 WHERE `entryorguid`=237 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `event_param3`=1666000, `event_param4`=1666000 WHERE `entryorguid`=238 AND `source_type`=0 AND `id`=0 AND `link`=0; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a37f934c4..3b09e938e 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -824,7 +824,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer) { if (!IsAlive()) return DISABLED_MIRROR_TIMER; - return 2002; + return 2020; } default: return 0; @@ -920,7 +920,7 @@ void Player::HandleDrowning(uint32 time_diff) m_MirrorTimer[FIRE_TIMER] -= time_diff; if (m_MirrorTimer[FIRE_TIMER] < 0) { - m_MirrorTimer[FIRE_TIMER] += 2002; + m_MirrorTimer[FIRE_TIMER] += 2020; // Calculate and deal damage /// @todo: Check this formula uint32 damage = urand(600, 700); diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index dbb4120bc..f6a573d8e 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -367,12 +367,6 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) break; case CHAT_MSG_WHISPER: { - if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)) - { - SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)); - return; - } - if (!normalizePlayerName(to)) { SendPlayerNotFoundNotice(to); @@ -382,6 +376,13 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) Player* receiver = ObjectAccessor::FindPlayerByName(to, false); bool senderIsPlayer = AccountMgr::IsPlayerAccount(GetSecurity()); bool receiverIsPlayer = AccountMgr::IsPlayerAccount(receiver ? receiver->GetSession()->GetSecurity() : SEC_PLAYER); + + if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && receiver != sender) + { + SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)); + return; + } + if (!receiver || (senderIsPlayer && !receiverIsPlayer && !receiver->isAcceptWhispers() && !receiver->IsInWhisperWhiteList(sender->GetGUID()))) { SendPlayerNotFoundNotice(to); diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index d09c1d816..626991967 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -415,6 +415,25 @@ void WorldSession::HandleMailReturnToSender(WorldPacket& recvData) player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR); return; } + + if (m->HasItems()) + { + for (MailItemInfoVec::iterator itr = m->items.begin(); itr != m->items.end(); ++itr) + { + Item* item = player->GetMItem(itr->item_guid); + if (item && !sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, item)) + { + player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR); + return; + } + } + } + else if (!sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, nullptr)) + { + player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR); + return; + } + //we can return mail now //so firstly delete the old one CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 8d21dce2c..ffed7a496 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4495,6 +4495,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->CastTimeEntry = sSpellCastTimesStore.LookupEntry(1); // 0s }); + // Seed of Corruption + ApplySpellFix({ 27285, 47833, 47834 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx |= SPELL_ATTR1_NO_REFLECTION; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 85ceb9d3d..17ce3995c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -844,6 +844,11 @@ public: void JustSummoned(Creature* summon) override { + if (summon->GetEntry() == NPC_HIGHLORD_TIRION_FORDRING_LK) + { + return; + } + switch (summon->GetEntry()) { case NPC_SHAMBLING_HORROR: @@ -3126,11 +3131,6 @@ public: if (!summoner) return; - if (summoner->GetTypeId() != TYPEID_UNIT) - { - return; - } - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING))) { me->SetWalk(false);