From 1b878209354723138d2f5d969ee53255e6db94d4 Mon Sep 17 00:00:00 2001 From: Gildor Date: Tue, 13 Feb 2024 14:54:24 +0100 Subject: [PATCH 01/19] Core/Spells: Implement visual aura duration of Rogue talents Overkill and Master of Subtlety (#29693) --- src/server/scripts/Spells/spell_rogue.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index fc4d7ee5b1fbc..9a60d1816f13d 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -433,6 +433,16 @@ class spell_rog_overkill_mos : public AuraScript return ValidateSpellInfo({ RemoveSpellId }); } + void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Aura* visualAura = GetTarget()->GetAura(RemoveSpellId)) + { + int32 duration = aurEff->GetBase()->GetDuration(); + visualAura->SetDuration(duration); + visualAura->SetMaxDuration(duration); + } + } + void PeriodicTick(AuraEffect const* /*aurEff*/) { GetTarget()->RemoveAurasDueToSpell(RemoveSpellId); @@ -440,6 +450,7 @@ class spell_rog_overkill_mos : public AuraScript void Register() override { + AfterEffectApply += AuraEffectApplyFn(spell_rog_overkill_mos::AfterApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_overkill_mos::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); } }; From ca1560f043df275d9241055adbf61a393666a533 Mon Sep 17 00:00:00 2001 From: Mykhailo Redko Date: Tue, 13 Feb 2024 16:55:37 +0200 Subject: [PATCH 02/19] Core/Players: Improvements for talent reset logic. (#29580) * Clean up Player::ResetTalents() from unnecessary logic, such as withdrawing money. Move it to more suitable places. * Implemented SMSG_TALENTS_INVOLUNTARILY_RESET and use it instead of old trinity_string. * Do not reset the accumulated talent reset cost if CONFIG_NO_RESET_TALENT_COST is enabled. --- .../world/3.3.5/2024_02_13_00_world.sql | 2 + src/server/game/Entities/Pet/Pet.cpp | 14 ++++- src/server/game/Entities/Pet/Pet.h | 4 +- src/server/game/Entities/Player/Player.cpp | 61 +++++++------------ src/server/game/Entities/Player/Player.h | 5 +- src/server/game/Handlers/CharacterHandler.cpp | 3 +- src/server/game/Handlers/SkillHandler.cpp | 29 +++++---- src/server/game/Miscellaneous/Language.h | 4 +- src/server/game/Scripting/ScriptMgr.cpp | 6 +- src/server/game/Scripting/ScriptMgr.h | 4 +- src/server/game/Server/Packets/AllPackets.h | 3 +- .../game/Server/Packets/TalentPackets.cpp | 41 +++++++++++++ .../game/Server/Packets/TalentPackets.h | 59 ++++++++++++++++++ src/server/game/Server/Protocol/Opcodes.h | 2 +- src/server/game/Server/WorldSession.h | 12 +++- src/server/scripts/Commands/cs_reset.cpp | 6 +- 16 files changed, 180 insertions(+), 75 deletions(-) create mode 100644 sql/updates/world/3.3.5/2024_02_13_00_world.sql create mode 100644 src/server/game/Server/Packets/TalentPackets.cpp create mode 100644 src/server/game/Server/Packets/TalentPackets.h diff --git a/sql/updates/world/3.3.5/2024_02_13_00_world.sql b/sql/updates/world/3.3.5/2024_02_13_00_world.sql new file mode 100644 index 0000000000000..e56e9a09ef29d --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_13_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `trinity_string` WHERE `entry` IN (216, 1126); diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 1b26f6a4f8227..3ede7366b9b7c 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -32,6 +32,7 @@ #include "SpellHistory.h" #include "SpellMgr.h" #include "SpellPackets.h" +#include "TalentPackets.h" #include "Unit.h" #include "Util.h" #include "WorldPacket.h" @@ -1642,7 +1643,7 @@ void Pet::InitPetCreateSpells() CastPetAuras(false); } -bool Pet::resetTalents() +bool Pet::resetTalents(bool involuntarily /*= false*/) { Player* player = GetOwner(); @@ -1712,10 +1713,14 @@ bool Pet::resetTalents() if (!m_loading) player->PetSpellInitialize(); + + if (involuntarily) + player->SendDirectMessage(WorldPackets::Talents::InvoluntarilyReset(true).Write()); + return true; } -void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) +void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/, bool involuntarily /*= false*/) { // not need after this call if (owner->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS)) @@ -1723,7 +1728,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) // reset for online if (onlinePet) - onlinePet->resetTalents(); + onlinePet->resetTalents(involuntarily); PetStable* petStable = owner->GetPetStable(); if (!petStable) @@ -1748,6 +1753,9 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) if (petIds.empty()) return; + if (!onlinePet) + owner->SendDirectMessage(WorldPackets::Talents::InvoluntarilyReset(true).Write()); + bool need_comma = false; std::ostringstream ss; ss << "DELETE FROM pet_spell WHERE guid IN ("; diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index 7828cdc23cbb4..790e6e118c2af 100644 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -130,8 +130,8 @@ class TC_GAME_API Pet : public Guardian void InitPetCreateSpells(); - bool resetTalents(); - static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = nullptr); + bool resetTalents(bool involuntarily = false); + static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = nullptr, bool involuntarily = false); void InitTalentForLevel(); uint8 GetMaxTalentPointsForLevel(uint8 level) const; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index df065ff633184..8603de752884c 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -90,6 +90,7 @@ #include "SpellMgr.h" #include "SpellPackets.h" #include "StringConvert.h" +#include "TalentPackets.h" #include "TicketMgr.h" #include "TradeData.h" #include "Trainer.h" @@ -2681,7 +2682,7 @@ void Player::InitTalentForLevel() // Remove all talent points if (m_usedTalentCount > 0) // Free any used talents { - ResetTalents(true); /// @todo: Has to (collectively) be renamed to ResetTalents + ResetTalents(true); SetFreeTalentPoints(0); } } @@ -3835,6 +3836,9 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns) uint32 Player::ResetTalentsCost() const { + if (sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST)) + return 0; + // The first time reset costs 1 gold if (m_resetTalentsCost < 1*GOLD) return 1*GOLD; @@ -3866,9 +3870,20 @@ uint32 Player::ResetTalentsCost() const } } -bool Player::ResetTalents(bool no_cost) +void Player::IncreaseResetTalentsCostAndCounters(uint32 lastResetTalentsCost) +{ + if (lastResetTalentsCost > 0) // We don't want to reset the accumulated talent reset cost if we decide to temporarily enable CONFIG_NO_RESET_TALENT_COST + m_resetTalentsCost = lastResetTalentsCost; + + m_resetTalentsTime = GameTime::GetGameTime(); + + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS, lastResetTalentsCost); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS, 1); +} + +bool Player::ResetTalents(bool involuntarily /*= false*/) { - sScriptMgr->OnPlayerTalentsReset(this, no_cost); + sScriptMgr->OnPlayerTalentsReset(this, involuntarily); // not need after this call if (HasAtLoginFlag(AT_LOGIN_RESET_TALENTS)) @@ -3882,19 +3897,6 @@ bool Player::ResetTalents(bool no_cost) return false; } - uint32 cost = 0; - - if (!no_cost && !sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST)) - { - cost = ResetTalentsCost(); - - if (!HasEnoughMoney(cost)) - { - SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, nullptr, 0, 0); - return false; - } - } - RemovePet(nullptr, PET_SAVE_NOT_IN_SLOT, true); for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) @@ -3942,23 +3944,8 @@ bool Player::ResetTalents(bool no_cost) SetFreeTalentPoints(talentPointsForLevel); - if (!no_cost) - { - ModifyMoney(-(int32)cost); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS, cost); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS, 1); - - m_resetTalentsCost = cost; - m_resetTalentsTime = GameTime::GetGameTime(); - } - - /* when prev line will dropped use next line - if (Pet* pet = GetPet()) - { - if (pet->getPetType() == HUNTER_PET && !pet->GetCreatureTemplate()->IsTameable(CanTameExoticPets())) - RemovePet(nullptr, PET_SAVE_NOT_IN_SLOT, true); - } - */ + if (involuntarily) + SendDirectMessage(WorldPackets::Talents::InvoluntarilyReset(false).Write()); return true; } @@ -9436,13 +9423,9 @@ void Player::SetBindPoint(ObjectGuid guid) const SendDirectMessage(packet.Write()); } -void Player::SendTalentWipeConfirm(ObjectGuid guid) const +void Player::SendTalentWipeConfirm(ObjectGuid trainerGuid) const { - WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4)); - data << uint64(guid); - uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : ResetTalentsCost(); - data << cost; - SendDirectMessage(&data); + SendDirectMessage(WorldPackets::Talents::RespecWipeConfirm(trainerGuid, ResetTalentsCost()).Write()); } void Player::ResetPetTalents() diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 5c97be882b7ba..45ec314f4dac9 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1359,7 +1359,7 @@ class TC_GAME_API Player : public Unit, public GridObject bool m_mailsUpdated; void SetBindPoint(ObjectGuid guid) const; - void SendTalentWipeConfirm(ObjectGuid guid) const; + void SendTalentWipeConfirm(ObjectGuid trainerGuid) const; void ResetPetTalents(); void RegenerateAll(); void Regenerate(Powers power); @@ -1445,8 +1445,9 @@ class TC_GAME_API Player : public Unit, public GridObject std::string const& GetGuildName() const; uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); } void SetFreeTalentPoints(uint32 points); - bool ResetTalents(bool no_cost = false); + bool ResetTalents(bool involuntarily = false); uint32 ResetTalentsCost() const; + void IncreaseResetTalentsCostAndCounters(uint32 lastResetTalentsCost); void InitTalentForLevel(); void BuildPlayerTalentsInfoData(WorldPacket* data); void BuildPetTalentsInfoData(WorldPacket* data); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 93b8aa3be17a1..0e4a1bcd1e4ae 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -877,7 +877,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder const& holder) // reset for all pets before pet loading if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS)) - Pet::resetTalentsForAllPetsOf(pCurrChar); + Pet::resetTalentsForAllPetsOf(pCurrChar, nullptr, true); // Load pet if any (if player not alive and in taxi flight or another then pet will remember as temporary unsummoned) pCurrChar->LoadPet(); @@ -900,7 +900,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder const& holder) { pCurrChar->ResetTalents(true); pCurrChar->SendTalentsInfoData(false); // original talents send already in to SendInitialPacketsBeforeAddToMap, resend reset state - SendNotification(LANG_RESET_TALENTS); } bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST); diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index a43cfdecd133a..178237924eb75 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -22,6 +22,7 @@ #include "ObjectAccessor.h" #include "Pet.h" #include "Player.h" +#include "TalentPackets.h" #include "WorldPacket.h" void WorldSession::HandleLearnTalentOpcode(WorldPacket& recvData) @@ -57,37 +58,39 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) recvPacket.rfinish(); } -void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData) +void WorldSession::HandleTalentWipeConfirmOpcode(WorldPackets::Talents::ConfirmRespecWipe& confirmRespecWipe) { TC_LOG_DEBUG("network", "MSG_TALENT_WIPE_CONFIRM"); - ObjectGuid guid; - recvData >> guid; - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER); - if (!unit) + Creature* trainer = GetPlayer()->GetNPCIfCanInteractWith(confirmRespecWipe.RespecMaster, UNIT_NPC_FLAG_TRAINER); + if (!trainer) { - TC_LOG_DEBUG("network", "WORLD: HandleTalentWipeConfirmOpcode - {} not found or you can't interact with him.", guid.ToString()); + TC_LOG_DEBUG("network", "WORLD: HandleTalentWipeConfirmOpcode - {} not found or you can't interact with him.", confirmRespecWipe.RespecMaster); return; } - if (!unit->CanResetTalents(_player, false)) + if (!trainer->CanResetTalents(_player, false)) return; + uint32 cost = _player->ResetTalentsCost(); + if (!_player->HasEnoughMoney(cost)) + return; // // silently return, client should display the error by itself + // remove fake death if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - if (!(_player->ResetTalents())) + if (!_player->ResetTalents()) { - WorldPacket data(MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent - data << uint64(0); - data << uint32(0); - SendPacket(&data); + _player->SendTalentWipeConfirm(ObjectGuid::Empty); return; } + _player->ModifyMoney(-(int32)cost); + _player->IncreaseResetTalentsCostAndCounters(cost); _player->SendTalentsInfoData(false); - unit->CastSpell(_player, 14867, true); //spell: "Untalent Visual Effect" + + trainer->CastSpell(_player, 14867 /*SPELL_UNTALENT_VISUAL_EFFECT*/, true); } void WorldSession::HandleUnlearnSkillOpcode(WorldPacket& recvData) diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 725bdd7d6729b..073c0294f710c 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -258,7 +258,7 @@ enum TrinityStrings LANG_RESET_TALENTS_ONLINE = 213, LANG_RESET_TALENTS_OFFLINE = 214, LANG_RESET_SPELLS = 215, - LANG_RESET_TALENTS = 216, + // unused = 216, LANG_RESETALL_UNKNOWN_CASE = 217, LANG_RESETALL_SPELLS = 218, @@ -897,7 +897,7 @@ enum TrinityStrings LANG_NO_PET_FOUND = 1123, LANG_WRONG_PET_TYPE = 1124, LANG_COMMAND_LEARN_PET_TALENTS = 1125, - LANG_RESET_PET_TALENTS = 1126, + // unused = 1126, LANG_RESET_PET_TALENTS_ONLINE = 1127, LANG_TAXINODE_ENTRY_LIST_CHAT = 1128, LANG_TAXINODE_ENTRY_LIST_CONSOLE = 1129, diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 3252ca8d89349..b35aa9760b7de 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1843,9 +1843,9 @@ void ScriptMgr::OnPlayerFreeTalentPointsChanged(Player* player, uint32 points) FOREACH_SCRIPT(PlayerScript)->OnFreeTalentPointsChanged(player, points); } -void ScriptMgr::OnPlayerTalentsReset(Player* player, bool noCost) +void ScriptMgr::OnPlayerTalentsReset(Player* player, bool involuntarily) { - FOREACH_SCRIPT(PlayerScript)->OnTalentsReset(player, noCost); + FOREACH_SCRIPT(PlayerScript)->OnTalentsReset(player, involuntarily); } void ScriptMgr::OnPlayerMoneyChanged(Player* player, int32& amount) @@ -2591,7 +2591,7 @@ void PlayerScript::OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points { } -void PlayerScript::OnTalentsReset(Player* /*player*/, bool /*noCost*/) +void PlayerScript::OnTalentsReset(Player* /*player*/, bool /*involuntarily*/) { } diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index d43b8e1c8b860..e329fbaeeb38a 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -641,7 +641,7 @@ class TC_GAME_API PlayerScript : public ScriptObject virtual void OnFreeTalentPointsChanged(Player* player, uint32 points); // Called when a player's talent points are reset (right before the reset is done) - virtual void OnTalentsReset(Player* player, bool noCost); + virtual void OnTalentsReset(Player* player, bool involuntarily); // Called when a player's money is modified (before the modification is done) virtual void OnMoneyChanged(Player* player, int32& amount); @@ -1009,7 +1009,7 @@ class TC_GAME_API ScriptMgr void OnPlayerKilledByCreature(Creature* killer, Player* killed); void OnPlayerLevelChanged(Player* player, uint8 oldLevel); void OnPlayerFreeTalentPointsChanged(Player* player, uint32 newPoints); - void OnPlayerTalentsReset(Player* player, bool noCost); + void OnPlayerTalentsReset(Player* player, bool involuntarily); void OnPlayerMoneyChanged(Player* player, int32& amount); void OnPlayerMoneyLimit(Player* player, int32 amount); void OnGivePlayerXP(Player* player, uint32& amount, Unit* victim); diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h index 1c4d55272ff4f..005b488470223 100644 --- a/src/server/game/Server/Packets/AllPackets.h +++ b/src/server/game/Server/Packets/AllPackets.h @@ -26,14 +26,15 @@ #include "CombatPackets.h" #include "GuildPackets.h" #include "LFGPackets.h" -#include "NPCPackets.h" #include "MailPackets.h" #include "MiscPackets.h" +#include "NPCPackets.h" #include "PetPackets.h" #include "QueryPackets.h" #include "QuestPackets.h" #include "SpellPackets.h" #include "SystemPackets.h" +#include "TalentPackets.h" #include "TotemPackets.h" #include "WorldStatePackets.h" diff --git a/src/server/game/Server/Packets/TalentPackets.cpp b/src/server/game/Server/Packets/TalentPackets.cpp new file mode 100644 index 0000000000000..b1e496cbebff0 --- /dev/null +++ b/src/server/game/Server/Packets/TalentPackets.cpp @@ -0,0 +1,41 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "TalentPackets.h" + +namespace WorldPackets::Talents +{ +WorldPacket const* RespecWipeConfirm::Write() +{ + _worldPacket << RespecMaster; + _worldPacket << uint32(Cost); + + return &_worldPacket; +} + +void ConfirmRespecWipe::Read() +{ + _worldPacket >> RespecMaster; +} + +WorldPacket const* InvoluntarilyReset::Write() +{ + _worldPacket << uint8(IsPetTalents); + + return &_worldPacket; +} +} diff --git a/src/server/game/Server/Packets/TalentPackets.h b/src/server/game/Server/Packets/TalentPackets.h new file mode 100644 index 0000000000000..a2ee0653ca62d --- /dev/null +++ b/src/server/game/Server/Packets/TalentPackets.h @@ -0,0 +1,59 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef TalentPackets_h__ +#define TalentPackets_h__ + +#include "ObjectGuid.h" +#include "Packet.h" + +namespace WorldPackets::Talents +{ +class RespecWipeConfirm final : public ServerPacket +{ +public: + explicit RespecWipeConfirm(ObjectGuid respecMaster, uint32 cost) + : ServerPacket(MSG_TALENT_WIPE_CONFIRM, 8 + 4), RespecMaster(respecMaster), Cost(cost) { } + + WorldPacket const* Write() override; + + ObjectGuid RespecMaster; + uint32 Cost = 0; +}; + +class ConfirmRespecWipe final : public ClientPacket +{ +public: + explicit ConfirmRespecWipe(WorldPacket&& packet) : ClientPacket(MSG_TALENT_WIPE_CONFIRM, std::move(packet)) { } + + void Read() override; + + ObjectGuid RespecMaster; +}; + +class InvoluntarilyReset final : public ServerPacket +{ +public: + explicit InvoluntarilyReset(bool isPetTalents) : ServerPacket(SMSG_TALENTS_INVOLUNTARILY_RESET, 1), IsPetTalents(isPetTalents ? 1 : 0) { } + + WorldPacket const* Write() override; + + uint8 IsPetTalents = 0; +}; +} + +#endif // TalentPackets_h__ diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 38cc24128c1d9..47d62640a6283 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1300,7 +1300,7 @@ enum Opcodes : uint16 SMSG_WORLD_STATE_UI_TIMER_UPDATE = 0x4F7, CMSG_CHAR_RACE_CHANGE = 0x4F8, MSG_VIEW_PHASE_SHIFT = 0x4F9, - SMSG_TALENTS_INVOLUNTARILY_RESET = 0x4FA, // uint8 + SMSG_TALENTS_INVOLUNTARILY_RESET = 0x4FA, // uint8 (0 - player talents, 1 - player pet talents) CMSG_DEBUG_SERVER_GEO = 0x4FB, SMSG_DEBUG_SERVER_GEO = 0x4FC, SMSG_LOOT_SLOT_CHANGED = 0x4FD, diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 7d3ee54ba5f41..5b367defd5795 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -122,12 +122,14 @@ namespace WorldPackets { class EmoteClient; } + namespace Combat { class AttackSwing; class AttackStop; class SetSheathed; } + namespace Guild { class QueryGuildInfo; @@ -220,10 +222,12 @@ namespace WorldPackets class QueryItemSingle; class QuestPOIQuery; } + namespace Quest { class QueryQuestInfo; } + namespace Spells { class CancelCast; @@ -234,6 +238,12 @@ namespace WorldPackets class CancelAutoRepeatSpell; class CancelChannelling; } + + namespace Talents + { + class ConfirmRespecWipe; + } + namespace Totem { class TotemDestroyed; @@ -906,7 +916,7 @@ class TC_GAME_API WorldSession void HandleLearnTalentOpcode(WorldPacket& recvPacket); void HandleLearnPreviewTalents(WorldPacket& recvPacket); - void HandleTalentWipeConfirmOpcode(WorldPacket& recvPacket); + void HandleTalentWipeConfirmOpcode(WorldPackets::Talents::ConfirmRespecWipe& confirmRespecWipe); void HandleUnlearnSkillOpcode(WorldPacket& recvPacket); void HandleQuestgiverStatusQueryOpcode(WorldPacket& recvPacket); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 0680f7985b503..3b357fcde2362 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -223,10 +223,9 @@ class reset_commandscript : public CommandScript Unit* owner = creature->GetOwner(); if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer())) { - creature->ToPet()->resetTalents(); + creature->ToPet()->resetTalents(true); owner->ToPlayer()->SendTalentsInfoData(true); - ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer()) handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str()); } @@ -242,12 +241,11 @@ class reset_commandscript : public CommandScript { target->ResetTalents(true); target->SendTalentsInfoData(false); - ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str()); Pet* pet = target->GetPet(); - Pet::resetTalentsForAllPetsOf(target, pet); + Pet::resetTalentsForAllPetsOf(target, pet, true); if (pet) target->SendTalentsInfoData(true); return true; From 16f555f79ef2fdebd18204bc90383ad7761343a5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 13 Feb 2024 23:49:51 +0100 Subject: [PATCH 03/19] Core/MMAPs: Sprinkle master branch thread safety on mmap loading code --- .../Collision/Management/MMapManager.cpp | 73 +++++++++++-------- src/common/Collision/Management/MMapManager.h | 5 +- src/server/game/Maps/Map.cpp | 4 +- src/server/game/Movement/PathGenerator.cpp | 2 +- 4 files changed, 49 insertions(+), 35 deletions(-) diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp index 5ed38644fceb9..d16bfddc4cc9b 100644 --- a/src/common/Collision/Management/MMapManager.cpp +++ b/src/common/Collision/Management/MMapManager.cpp @@ -18,13 +18,12 @@ #include "MMapManager.h" #include "Errors.h" #include "Log.h" -#include "Config.h" #include "MapDefines.h" namespace MMAP { - constexpr char MAP_FILE_NAME_FORMAT[] = "{}/mmaps/{:03}.mmap"; - constexpr char TILE_FILE_NAME_FORMAT[] = "{}/mmaps/{:03}{:02}{:02}.mmtile"; + constexpr char MAP_FILE_NAME_FORMAT[] = "{}mmaps/{:03}.mmap"; + constexpr char TILE_FILE_NAME_FORMAT[] = "{}mmaps/{:03}{:02}{:02}.mmtile"; // ######################## MMapManager ######################## MMapManager::~MMapManager() @@ -55,7 +54,7 @@ namespace MMAP return itr; } - bool MMapManager::loadMapData(uint32 mapId) + bool MMapManager::loadMapData(std::string const& basePath, uint32 mapId) { // we already have this map loaded? MMapDataSet::iterator itr = loadedMMaps.find(mapId); @@ -73,7 +72,7 @@ namespace MMAP } // load and init dtNavMesh - read parameters from file - std::string fileName = Trinity::StringFormat(MAP_FILE_NAME_FORMAT, sConfigMgr->GetStringDefault("DataDir", "."), mapId); + std::string fileName = Trinity::StringFormat(MAP_FILE_NAME_FORMAT, basePath, mapId); FILE* file = fopen(fileName.c_str(), "rb"); if (!file) { @@ -113,10 +112,10 @@ namespace MMAP return uint32(x << 16 | y); } - bool MMapManager::loadMap(const std::string& /*basePath*/, uint32 mapId, int32 x, int32 y) + bool MMapManager::loadMap(std::string const& basePath, uint32 mapId, int32 x, int32 y) { // make sure the mmap is loaded and ready to load tiles - if (!loadMapData(mapId)) + if (!loadMapData(basePath, mapId)) return false; // get this mmap data @@ -129,7 +128,7 @@ namespace MMAP return false; // load this tile :: mmaps/MMMXXYY.mmtile - std::string fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, sConfigMgr->GetStringDefault("DataDir", "."), mapId, x, y); + std::string fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, basePath, mapId, x, y); FILE* file = fopen(fileName.c_str(), "rb"); if (!file) { @@ -197,6 +196,32 @@ namespace MMAP } } + bool MMapManager::loadMapInstance(std::string const& basePath, uint32 mapId, uint32 instanceId) + { + if (!loadMapData(basePath, mapId)) + return false; + + MMapData* mmap = loadedMMaps[mapId]; + auto [queryItr, inserted] = mmap->navMeshQueries.try_emplace(instanceId, nullptr); + if (!inserted) + return true; + + // allocate mesh query + dtNavMeshQuery* query = dtAllocNavMeshQuery(); + ASSERT(query); + if (dtStatusFailed(query->init(mmap->navMesh, 1024))) + { + dtFreeNavMeshQuery(query); + mmap->navMeshQueries.erase(queryItr); + TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId {:03} instanceId {}", mapId, instanceId); + return false; + } + + TC_LOG_DEBUG("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId {:03} instanceId {}", mapId, instanceId); + queryItr->second = query; + return true; + } + bool MMapManager::unloadMap(uint32 mapId, int32 x, int32 y) { // check if we have this map loaded @@ -285,16 +310,15 @@ namespace MMAP } MMapData* mmap = itr->second; - if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end()) + auto queryItr = mmap->navMeshQueries.find(instanceId); + if (queryItr == mmap->navMeshQueries.end()) { TC_LOG_DEBUG("maps", "MMAP:unloadMapInstance: Asked to unload not loaded dtNavMeshQuery mapId {:03} instanceId {}", mapId, instanceId); return false; } - dtNavMeshQuery* query = mmap->navMeshQueries[instanceId]; - - dtFreeNavMeshQuery(query); - mmap->navMeshQueries.erase(instanceId); + dtFreeNavMeshQuery(queryItr->second); + mmap->navMeshQueries.erase(queryItr); TC_LOG_DEBUG("maps", "MMAP:unloadMapInstance: Unloaded mapId {:03} instanceId {}", mapId, instanceId); return true; @@ -311,27 +335,14 @@ namespace MMAP dtNavMeshQuery const* MMapManager::GetNavMeshQuery(uint32 mapId, uint32 instanceId) { - MMapDataSet::const_iterator itr = GetMMapData(mapId); + auto itr = GetMMapData(mapId); if (itr == loadedMMaps.end()) return nullptr; - MMapData* mmap = itr->second; - if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end()) - { - // allocate mesh query - dtNavMeshQuery* query = dtAllocNavMeshQuery(); - ASSERT(query); - if (dtStatusFailed(query->init(mmap->navMesh, 1024))) - { - dtFreeNavMeshQuery(query); - TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId {:03} instanceId {}", mapId, instanceId); - return nullptr; - } - - TC_LOG_DEBUG("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId {:03} instanceId {}", mapId, instanceId); - mmap->navMeshQueries.insert(std::pair(instanceId, query)); - } + auto queryItr = itr->second->navMeshQueries.find(instanceId); + if (queryItr == itr->second->navMeshQueries.end()) + return nullptr; - return mmap->navMeshQueries[instanceId]; + return queryItr->second; } } diff --git a/src/common/Collision/Management/MMapManager.h b/src/common/Collision/Management/MMapManager.h index bb787604ec090..29b9f69ffb040 100644 --- a/src/common/Collision/Management/MMapManager.h +++ b/src/common/Collision/Management/MMapManager.h @@ -62,7 +62,8 @@ namespace MMAP ~MMapManager(); void InitializeThreadUnsafe(const std::vector& mapIds); - bool loadMap(const std::string& basePath, uint32 mapId, int32 x, int32 y); + bool loadMap(std::string const& basePath, uint32 mapId, int32 x, int32 y); + bool loadMapInstance(std::string const& basePath, uint32 mapId, uint32 instanceId); bool unloadMap(uint32 mapId, int32 x, int32 y); bool unloadMap(uint32 mapId); bool unloadMapInstance(uint32 mapId, uint32 instanceId); @@ -74,7 +75,7 @@ namespace MMAP uint32 getLoadedTilesCount() const { return loadedTiles; } uint32 getLoadedMapsCount() const { return uint32(loadedMMaps.size()); } private: - bool loadMapData(uint32 mapId); + bool loadMapData(std::string const& basePath, uint32 mapId); uint32 packTileID(int32 x, int32 y); MMapDataSet::const_iterator GetMMapData(uint32 mapId) const; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 10d3f1df34815..9072158689bef 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -174,7 +174,7 @@ void Map::LoadMMap(int gx, int gy) if (!DisableMgr::IsPathfindingEnabled(GetId())) return; - bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap((sWorld->GetDataPath() + "mmaps").c_str(), GetId(), gx, gy); + bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap(sWorld->GetDataPath(), GetId(), gx, gy); if (mmapLoadResult) TC_LOG_DEBUG("mmaps.tiles", "MMAP loaded name:{}, id:{}, x:{}, y:{} (mmap rep.: x:{}, y:{})", GetMapName(), GetId(), gx, gy, gx, gy); @@ -303,6 +303,8 @@ i_scriptLock(false), _respawnTimes(std::make_unique()), _r _weatherUpdateTimer.SetInterval(time_t(1 * IN_MILLISECONDS)); + MMAP::MMapFactory::createOrGetMMapManager()->loadMapInstance(sWorld->GetDataPath(), GetId(), GetInstanceId()); + sScriptMgr->OnCreateMap(this); } diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 1dd5364a390e4..08de2f4e12c67 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -41,8 +41,8 @@ PathGenerator::PathGenerator(WorldObject const* owner) : if (DisableMgr::IsPathfindingEnabled(mapId)) { MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager(); - _navMesh = mmap->GetNavMesh(mapId); _navMeshQuery = mmap->GetNavMeshQuery(mapId, _source->GetInstanceId()); + _navMesh = _navMeshQuery ? _navMeshQuery->getAttachedNavMesh() : mmap->GetNavMesh(mapId); } CreateFilter(); From dbc0689034977d1ecd45f248659f40666d7526e4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Wed, 14 Feb 2024 03:51:34 +0100 Subject: [PATCH 04/19] DB/Quest: adjust minimum reputation value required for quests of The Ashen Verdict rings (Friendly) closes #29216 by Jildor --- sql/updates/world/3.3.5/2024_02_14_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_14_00_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_14_00_world.sql b/sql/updates/world/3.3.5/2024_02_14_00_world.sql new file mode 100644 index 0000000000000..3ae27d5f8a013 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_14_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `RequiredMinRepValue`=3000 WHERE `ID` IN (25247,24822,24821,24820,24819); From 02bd76ad32cce6279d294477079812c02eb61519 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Wed, 14 Feb 2024 04:58:24 +0100 Subject: [PATCH 05/19] DB/Quest: make Blessing of Zim'Torga / Zim'Rhuk repeatables closes #29471 by Jildor --- sql/updates/world/3.3.5/2024_02_14_01_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_14_01_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_14_01_world.sql b/sql/updates/world/3.3.5/2024_02_14_01_world.sql new file mode 100644 index 0000000000000..4c748d943a3bd --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_14_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=1 WHERE `ID` IN (12618,12656); From 10107482da65e2a85d812e9f5b521f0d0df27ad1 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Wed, 14 Feb 2024 14:33:26 +0100 Subject: [PATCH 06/19] DB/Creature: Quartermaster Vaskess shoud repair closes #29699 by CraftedRO --- sql/updates/world/3.3.5/2024_02_14_02_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_14_02_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_14_02_world.sql b/sql/updates/world/3.3.5/2024_02_14_02_world.sql new file mode 100644 index 0000000000000..3db795740be4f --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_14_02_world.sql @@ -0,0 +1,2 @@ +-- Add repair flag Quartermaster Vaskess +UPDATE `creature_template` SET `npcflag`=`npcflag`|4096 WHERE `entry` = 31115; From 1fcb55d8f4851604c65880a064d5b573ed8e9aaf Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 14 Feb 2024 15:42:17 +0100 Subject: [PATCH 07/19] Core/Instances: Name unknown EncounterFrameType ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED --- src/server/game/Instances/InstanceScript.cpp | 4 ++-- src/server/game/Instances/InstanceScript.h | 4 ++-- .../Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index a4f2ca3737f4c..e6e8450c191cc 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -700,7 +700,7 @@ bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player con return false; } -void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit /*= nullptr*/, uint8 param1 /*= 0*/, uint8 param2 /*= 0*/) +void InstanceScript::SendEncounterUnit(EncounterFrameType type, Unit const* unit /*= nullptr*/, uint8 param1 /*= 0*/, uint8 param2 /*= 0*/) { // size of this packet is at most 15 (usually less) WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 15); @@ -725,7 +725,7 @@ void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit /*= nullptr*/, ui data << uint8(param1); data << uint8(param2); break; - case ENCOUNTER_FRAME_UNK7: + case ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED: default: break; } diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 7bd3daf425935..3eba144a4aac6 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -64,7 +64,7 @@ enum EncounterFrameType ENCOUNTER_FRAME_ENABLE_OBJECTIVE = 4, ENCOUNTER_FRAME_UPDATE_OBJECTIVE = 5, ENCOUNTER_FRAME_DISABLE_OBJECTIVE = 6, - ENCOUNTER_FRAME_UNK7 = 7 // Seems to have something to do with sorting the encounter units + ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED = 7 }; // EnumUtils: DESCRIBE THIS @@ -258,7 +258,7 @@ class TC_GAME_API InstanceScript : public ZoneScript // Returns completed encounters mask for packets uint32 GetCompletedEncounterMask() const { return completedEncounters; } - void SendEncounterUnit(uint32 type, Unit* unit = nullptr, uint8 param1 = 0, uint8 param2 = 0); + void SendEncounterUnit(EncounterFrameType type, Unit const* unit = nullptr, uint8 param1 = 0, uint8 param2 = 0); virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index e600dd9c88c6c..dc587a42e966e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1657,7 +1657,7 @@ class spell_halion_twilight_realm_handlers : public SpellScriptLoader { GetTarget()->RemoveAurasDueToSpell(SPELL_TWILIGHT_REALM); if (InstanceScript* instance = GetTarget()->GetInstanceScript()) - instance->SendEncounterUnit(ENCOUNTER_FRAME_UNK7); + instance->SendEncounterUnit(ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED); } void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*handle*/) @@ -1668,7 +1668,7 @@ class spell_halion_twilight_realm_handlers : public SpellScriptLoader target->RemoveAurasDueToSpell(_beforeHitSpellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL); if (InstanceScript* instance = target->GetInstanceScript()) - instance->SendEncounterUnit(ENCOUNTER_FRAME_UNK7); + instance->SendEncounterUnit(ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED); } void Register() override From 66a3e96851c02b17323d72d67abeb2dba4c71eba Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 15 Feb 2024 19:15:21 +0100 Subject: [PATCH 08/19] Core/SAI: Fixed SMART_ACTION_MOVE_TO_POS using target coordinates as destination if requested WorldObject target was not found (cherry picked from commit 888ccd1e4421b83411cb00365c26b19234e1e46e) # Conflicts: # src/server/game/AI/SmartScripts/SmartScript.cpp --- .../world/master/2024_02_15_00_world.sql | 14 ++++++++ .../game/AI/SmartScripts/SmartScript.cpp | 36 ++++++++----------- 2 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 sql/updates/world/master/2024_02_15_00_world.sql diff --git a/sql/updates/world/master/2024_02_15_00_world.sql b/sql/updates/world/master/2024_02_15_00_world.sql new file mode 100644 index 0000000000000..85ccb8d117af6 --- /dev/null +++ b/sql/updates/world/master/2024_02_15_00_world.sql @@ -0,0 +1,14 @@ +UPDATE `smart_scripts` SET `target_type`=8 WHERE + (`entryorguid`=137300 AND `source_type`=9 AND `id`=19 AND `link`=0) OR + (`entryorguid`=137300 AND `source_type`=9 AND `id`=20 AND `link`=0) OR + (`entryorguid`=1433800 AND `source_type`=9 AND `id`=4 AND `link`=0) OR + (`entryorguid`=2129100 AND `source_type`=9 AND `id`=1 AND `link`=0) OR + (`entryorguid`=2129100 AND `source_type`=9 AND `id`=13 AND `link`=0) OR + (`entryorguid`=2711300 AND `source_type`=9 AND `id`=1 AND `link`=0) OR + (`entryorguid`=2711300 AND `source_type`=9 AND `id`=3 AND `link`=0) OR + (`entryorguid`=2711400 AND `source_type`=9 AND `id`=1 AND `link`=0) OR + (`entryorguid`=2711400 AND `source_type`=9 AND `id`=3 AND `link`=0) OR + (`entryorguid`=2711500 AND `source_type`=9 AND `id`=1 AND `link`=0) OR + (`entryorguid`=2711600 AND `source_type`=9 AND `id`=3 AND `link`=0) OR + (`entryorguid`=2875000 AND `source_type`=9 AND `id`=3 AND `link`=0) OR + (`entryorguid`=3019000 AND `source_type`=9 AND `id`=13 AND `link`=0); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index d6824c33cdaed..0cfea7c0c30fc 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1443,29 +1443,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u WorldObject* target = nullptr; - /*if (e.GetTargetType() == SMART_TARGET_CREATURE_RANGE || e.GetTargetType() == SMART_TARGET_CREATURE_GUID || - e.GetTargetType() == SMART_TARGET_CREATURE_DISTANCE || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_RANGE || - e.GetTargetType() == SMART_TARGET_GAMEOBJECT_GUID || e.GetTargetType() == SMART_TARGET_GAMEOBJECT_DISTANCE || - e.GetTargetType() == SMART_TARGET_CLOSEST_CREATURE || e.GetTargetType() == SMART_TARGET_CLOSEST_GAMEOBJECT || - e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER || e.GetTargetType() == SMART_TARGET_ACTION_INVOKER || - e.GetTargetType() == SMART_TARGET_CLOSEST_ENEMY || e.GetTargetType() == SMART_TARGET_CLOSEST_FRIENDLY || - e.GetTargetType() == SMART_TARGET_SELF || e.GetTargetType() == SMART_TARGET_STORED)*/ - { - // we want to move to random element - if (!targets.empty()) - target = Trinity::Containers::SelectRandomContainerElement(targets); - } - - if (!target) - { - G3D::Vector3 dest(e.target.x, e.target.y, e.target.z); - if (e.action.moveToPos.transport) - if (TransportBase* trans = me->GetDirectTransport()) - trans->CalculatePassengerPosition(dest.x, dest.y, dest.z); + // we want to move to random element + if (!targets.empty()) + target = Trinity::Containers::SelectRandomContainerElement(targets); - me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest.x, dest.y, dest.z, e.action.moveToPos.disablePathfinding == 0); - } - else + if (target) { float x, y, z; target->GetPosition(x, y, z); @@ -1473,6 +1455,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u target->GetContactPoint(me, x, y, z, e.action.moveToPos.ContactDistance); me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.moveToPos.disablePathfinding == 0); } + + if (e.GetTargetType() != SMART_TARGET_POSITION) + break; + + Position dest(e.target.x, e.target.y, e.target.z); + if (e.action.moveToPos.transport) + if (TransportBase* trans = me->GetDirectTransport()) + trans->CalculatePassengerPosition(dest.m_positionX, dest.m_positionY, dest.m_positionZ); + + me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest, e.action.moveToPos.disablePathfinding == 0); break; } case SMART_ACTION_ENABLE_TEMP_GOBJ: From 60c572a8d58ac2e9e48ee0cefd4f80ceb08b96ce Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 15 Feb 2024 23:23:48 +0100 Subject: [PATCH 09/19] DB/Quest: Love is in the Air/You've Been Served quest progress & completion closes #29704 by Legoso --- sql/updates/world/3.3.5/2024_02_15_01_world.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_15_01_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_15_01_world.sql b/sql/updates/world/3.3.5/2024_02_15_01_world.sql new file mode 100644 index 0000000000000..0cf32823b9cdc --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_15_01_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `quest_request_items` WHERE `ID` = 14488; +INSERT INTO `quest_request_items` (`ID`, `EmoteOnComplete`, `EmoteOnIncomplete`, `CompletionText`, `VerifiedBuild`) VALUES +(14488, 1, 0, "I don't remember ordering a cleaning service... why yes, I am Apothecary Hummel.$B$B...wait, what is the meaning of this? You think these meaningless papers can stop me? Hah!", 12340); + +DELETE FROM `quest_offer_reward` WHERE `ID` = 14488; +INSERT INTO `quest_offer_reward` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `RewardText`, `VerifiedBuild`) VALUES +(14488, 1, 0, 0, 0, 0, 0, 0, 0, "What we do here is none of your business...", 12340); From aeadea5a3d7d67ff7f7e10a2712e6fbb768d0449 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 15 Feb 2024 23:41:13 +0100 Subject: [PATCH 10/19] move 2024_02_15_00_world.sql to proper place --- sql/updates/world/{master => 3.3.5}/2024_02_15_00_world.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{master => 3.3.5}/2024_02_15_00_world.sql (100%) diff --git a/sql/updates/world/master/2024_02_15_00_world.sql b/sql/updates/world/3.3.5/2024_02_15_00_world.sql similarity index 100% rename from sql/updates/world/master/2024_02_15_00_world.sql rename to sql/updates/world/3.3.5/2024_02_15_00_world.sql From cac3f9e0863725866d5139b7cb3b963ba0c7cdf4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 00:23:22 +0100 Subject: [PATCH 11/19] DB/QUEST: Death knight starting zone, missing flag closes #29315 by Jonne733 --- sql/updates/world/3.3.5/2024_02_16_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_00_world.sql b/sql/updates/world/3.3.5/2024_02_16_00_world.sql new file mode 100644 index 0000000000000..35a483819a287 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_00_world.sql @@ -0,0 +1,2 @@ +-- Quest "Abandoned Mail" should have "Autocomplete" flag +UPDATE `quest_template` SET `Flags`=`Flags`| 65536 WHERE `ID`=12711; From 70f3198368c8bee19b067072be5df892dadb2cd4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 01:25:47 +0100 Subject: [PATCH 12/19] DB/Quest: Fix quest Cleansing the Scar closes #29219 by CraftedRO --- sql/updates/world/3.3.5/2024_02_16_01_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_01_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_01_world.sql b/sql/updates/world/3.3.5/2024_02_16_01_world.sql new file mode 100644 index 0000000000000..f8c26b973176a --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_01_world.sql @@ -0,0 +1,2 @@ +-- Fix quest Cleansing the Scar by updating Eversong Ranger PvpFlags with retail 10.2.5.53262 build: V10_2_5_53262 sniffed value. +UPDATE `creature_template_addon` SET `PvpFlags`=1 WHERE `entry`=15938; -- 15938 (Eversong Ranger) From d09f02ec2d94797434a3311ce3b1c27be0002086 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 13:25:35 +0100 Subject: [PATCH 13/19] DB/Creature: Fix some dberrors closes #29653 by CraftedRO --- sql/updates/world/3.3.5/2024_02_16_02_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_02_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_02_world.sql b/sql/updates/world/3.3.5/2024_02_16_02_world.sql new file mode 100644 index 0000000000000..a15cac3f98c38 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_02_world.sql @@ -0,0 +1,2 @@ +-- Fix some dberrors +UPDATE `creature` SET `MovementType`=0 WHERE `guid` IN (43202,43203); From a01de22ac6f1e556e3f80b5ddb921bf16963fca8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 14:00:50 +0100 Subject: [PATCH 14/19] DB/Creature: Update Honor Hold Archer closes by CraftedRO --- .../world/3.3.5/2024_02_16_03_world.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_03_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_03_world.sql b/sql/updates/world/3.3.5/2024_02_16_03_world.sql new file mode 100644 index 0000000000000..5b5e8e38d7ced --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_03_world.sql @@ -0,0 +1,25 @@ +-- Honor Hold Archer +UPDATE `creature_template_addon` SET `SheathState`=2, `PvpFlags`=1 WHERE `entry`=16896; +UPDATE `creature_addon` SET `SheathState`=2, `PvpFlags`=1 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` = 16896); + +UPDATE `creature_addon` SET `SheathState`=0 WHERE `guid` =58446; + +DELETE FROM `creature_addon` WHERE `guid` IN (58443, 58444, 58445, 58447); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `MountCreatureID`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvPFlags`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(58443, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, NULL), +(58444, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, NULL), +(58445, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, NULL), +(58447, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, NULL); + +-- SAI +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -58454); +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 +(-58454, 0, 0, 0, 1, 0, 100, 0, 6000, 6000, 6000, 6000, 0, 11, 33796, 0, 0, 0, 0, 0, 10, 69107, 19376, 0, 0, 0, 0, 0, 0, "Honor Hold Archer - Out of Combat - Cast 'Shoot Bow'"); + +-- Delete wrong condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceGroup` = 1 AND `ConditionValue2` = 16898 AND `SourceEntry` = 33796; + +-- ConditionTarget +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceGroup` = 1 AND `ConditionValue2` = 19376 AND `SourceEntry` = 33796; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 33796, 0, 0, 31, 0, 3, 19376, 0, 0, 0, 0, '', 'Spell 33796 targets Honor Hold Target Dummy Tower'); From 29424ff6c2c82c60c88f26c3d9033e592d1f30cb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 15:00:55 +0100 Subject: [PATCH 15/19] DB/WorldEvent - Love is in the Air closes #29484 Co-authored-by: Jinnaix --- .../world/3.3.5/2024_02_16_04_world.sql | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_04_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_04_world.sql b/sql/updates/world/3.3.5/2024_02_16_04_world.sql new file mode 100644 index 0000000000000..a8beeb1d5b6a5 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_04_world.sql @@ -0,0 +1,97 @@ +-- small correction +DELETE FROM `npc_vendor` WHERE `item` IN (21829,21833); +DELETE FROM `game_event_npc_vendor` WHERE `guid` IN (42755,21575,24772,4661,22681,79841,38407,199,14139,14986,28340,9460,46341,17865,7671,28304,80346,66978,6889,42181,33073,54188,15287,41839,1745,690,46343,32451,537,13550,29233,50060,11273,15326,28474,30676,10076,8219,37069,24774,4208,31947,50059,92923,92884,29239) AND `item`=21829; +DELETE FROM `game_event_npc_vendor` WHERE `guid` IN (42755,21575,24772,4661,22681,79841,38407,199,14139,14986,28340,9460,46341,17865,7671,28304,80346,66978,6889,42181,33073,54188,15287,41839,1745,690,46343,32451,537,13550,29233,50060,11273,15326,28474,30676,10076,8219,37069,24774,4208,31947,50059,92923,92884,29239) AND `item`=21833; +INSERT INTO `game_event_npc_vendor` (`eventEntry`, `guid`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES +(8, 42755, 0, 21829, 0, 0, 0), +(8, 42755, 1, 21833, 0, 0, 0), +(8, 21575, 0, 21829, 0, 0, 0), +(8, 21575, 1, 21833, 0, 0, 0), +(8, 24772, 0, 21829, 0, 0, 0), +(8, 24772, 1, 21833, 0, 0, 0), +(8, 4661, 0, 21829, 0, 0, 0), +(8, 4661, 1, 21833, 0, 0, 0), +(8, 22681, 0, 21829, 0, 0, 0), +(8, 22681, 1, 21833, 0, 0, 0), +(8, 79841, 0, 21829, 0, 0, 0), +(8, 79841, 1, 21833, 0, 0, 0), +(8, 38407, 0, 21829, 0, 0, 0), +(8, 38407, 1, 21833, 0, 0, 0), +(8, 199, 0, 21829, 0, 0, 0), +(8, 199, 1, 21833, 0, 0, 0), +(8, 14139, 0, 21829, 0, 0, 0), +(8, 14139, 1, 21833, 0, 0, 0), +(8, 14986, 0, 21829, 0, 0, 0), +(8, 14986, 1, 21833, 0, 0, 0), +(8, 28340, 0, 21829, 0, 0, 0), +(8, 28340, 1, 21833, 0, 0, 0), +(8, 9460, 0, 21829, 0, 0, 0), +(8, 9460, 1, 21833, 0, 0, 0), +(8, 46341, 0, 21829, 0, 0, 0), +(8, 46341, 1, 21833, 0, 0, 0), +(8, 17865, 0, 21829, 0, 0, 0), +(8, 17865, 1, 21833, 0, 0, 0), +(8, 7671, 0, 21829, 0, 0, 0), +(8, 7671, 1, 21833, 0, 0, 0), +(8, 28304, 0, 21829, 0, 0, 0), +(8, 28304, 1, 21833, 0, 0, 0), +(8, 80346, 0, 21829, 0, 0, 0), +(8, 80346, 1, 21833, 0, 0, 0), +(8, 66978, 0, 21829, 0, 0, 0), +(8, 66978, 1, 21833, 0, 0, 0), +(8, 6889, 0, 21829, 0, 0, 0), +(8, 6889, 1, 21833, 0, 0, 0), +(8, 42181, 0, 21829, 0, 0, 0), +(8, 42181, 1, 21833, 0, 0, 0), +(8, 33073, 0, 21829, 0, 0, 0), +(8, 33073, 1, 21833, 0, 0, 0), +(8, 54188, 0, 21829, 0, 0, 0), +(8, 54188, 1, 21833, 0, 0, 0), +(8, 15287, 0, 21829, 0, 0, 0), +(8, 15287, 1, 21833, 0, 0, 0), +(8, 41839, 0, 21829, 0, 0, 0), +(8, 41839, 1, 21833, 0, 0, 0), +(8, 1745, 0, 21829, 0, 0, 0), +(8, 1745, 1, 21833, 0, 0, 0), +(8, 690, 0, 21829, 0, 0, 0), +(8, 690, 1, 21833, 0, 0, 0), +(8, 46343, 0, 21829, 0, 0, 0), +(8, 46343, 1, 21833, 0, 0, 0), +(8, 32451, 0, 21829, 0, 0, 0), +(8, 32451, 1, 21833, 0, 0, 0), +(8, 537, 0, 21829, 0, 0, 0), +(8, 537, 1, 21833, 0, 0, 0), +(8, 13550, 0, 21829, 0, 0, 0), +(8, 13550, 1, 21833, 0, 0, 0), +(8, 29233, 0, 21829, 0, 0, 0), +(8, 29233, 1, 21833, 0, 0, 0), +(8, 50060, 0, 21829, 0, 0, 0), +(8, 50060, 1, 21833, 0, 0, 0), +(8, 11273, 0, 21829, 0, 0, 0), +(8, 11273, 1, 21833, 0, 0, 0), +(8, 15326, 0, 21829, 0, 0, 0), +(8, 15326, 1, 21833, 0, 0, 0), +(8, 28474, 0, 21829, 0, 0, 0), +(8, 28474, 1, 21833, 0, 0, 0), +(8, 30676, 0, 21829, 0, 0, 0), +(8, 30676, 1, 21833, 0, 0, 0), +(8, 10076, 0, 21829, 0, 0, 0), +(8, 10076, 1, 21833, 0, 0, 0), +(8, 8219, 0, 21829, 0, 0, 0), +(8, 8219, 1, 21833, 0, 0, 0), +(8, 37069, 0, 21829, 0, 0, 0), +(8, 37069, 1, 21833, 0, 0, 0), +(8, 24774, 0, 21829, 0, 0, 0), +(8, 24774, 1, 21833, 0, 0, 0), +(8, 4208, 0, 21829, 0, 0, 0), +(8, 4208, 1, 21833, 0, 0, 0), +(8, 31947, 0, 21829, 0, 0, 0), +(8, 31947, 1, 21833, 0, 0, 0), +(8, 50059, 0, 21829, 0, 0, 0), +(8, 50059, 1, 21833, 0, 0, 0), +(8, 92923, 0, 21829, 0, 0, 0), +(8, 92923, 1, 21833, 0, 0, 0), +(8, 92884, 0, 21829, 0, 0, 0), +(8, 92884, 1, 21833, 0, 0, 0), +(8, 29239, 0, 21829, 0, 0, 0), +(8, 29239, 1, 21833, 0, 0, 0); From 964ffac24349aadd7143a0d317a96fa3b4368ebb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 15:39:56 +0100 Subject: [PATCH 16/19] DB/Creature: Add and update scripts to some creatures closes #28906 by CraftedRO --- .../world/3.3.5/2024_02_16_05_world.sql | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_05_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_05_world.sql b/sql/updates/world/3.3.5/2024_02_16_05_world.sql new file mode 100644 index 0000000000000..fd9a190b56296 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_05_world.sql @@ -0,0 +1,41 @@ +-- Gondria https://www.wowhead.com/wotlk/npc=33776/gondria#abilities +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 33776; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 33776 AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(33776, 0, 0, 0, 0, 0, 100, 0, 3000, 7000, 12000, 15000, 0, 11, 61184, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Gondria - In Combat - Cast 'Pounce'"), +(33776, 0, 1, 0, 0, 0, 100, 0, 5000, 9000, 8000, 13000, 0, 11, 61186, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Gondria - In Combat - Cast 'Frozen Bite'"); + +-- Loque'nahak added again missing frozen bite https://www.wowhead.com/wotlk/npc=32517/loquenahak#abilities +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32517; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 32517 AND `source_type` = 0 AND `id` = 1; +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 +(32517, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 8000, 13000, 0, 11, 61186, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Loque\'nahak - In Combat - Cast 'Frozen Bite'"); + +-- Skoll added again missing frozen bite https://www.wowhead.com/wotlk/npc=35189/skoll#abilities +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 35189; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 35189 AND `source_type` = 0 AND `id` = 1; +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 +(35189, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 8000, 13000, 0, 11, 61186, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Skoll - In Combat - Cast 'Frozen Bite'"); + +-- Azurous rename wrong comment and correct sai order id https://www.wowhead.com/wotlk/npc=10202/azurous#abilities +UPDATE `smart_scripts` SET `id` = 0, `comment` = "Azurous - In Combat - Cast 'Frost Breath'" WHERE `entryorguid` = 10202 AND `source_type` = 0 AND `id` = 1; + +-- Avruu https://www.wowhead.com/wotlk/npc=17084/avruu#abilities +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=17084; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17084 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17084, 0, 0, 0, 74, 0, 100, 0, 0, 40, 15000, 18000, 30, 11, 16588, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Avruu - On Friendly Between 0-40% Health - Cast 'Dark Mending'"), +(17084, 0, 1, 0, 0, 0, 100, 0, 0, 0, 8000, 8000, 0, 11, 34112, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Avruu - In Combat - Cast 'Judgement of Darkness'"); + +-- Warmaul Brute https://www.wowhead.com/wotlk/npc=18065/warmaul-brute#abilities;mode:normal +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=18065; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18065 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18065, 0, 0, 0, 0, 0, 100, 0, 4000, 7000, 9000, 12000, 0, 11, 10966, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Warmaul Brute - In Combat - Cast 'Uppercut'"); + +-- Warp Monstrosity https://www.wowhead.com/wotlk/npc=20516/warp-monstrosity#abilities +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 20516; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 20516 AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20516, 0, 0, 0, 0, 0, 100, 0, 3000, 7000, 12000, 15000, 0, 11, 13901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Warp Monstrosity - In Combat - Cast 'Arcane Bolt'"), +(20516, 0, 1, 0, 0, 0, 100, 1, 5000, 9000, 8000, 13000, 0, 11, 36577, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Warp Monstrosity - In Combat - Cast 'Warp Storm'"); From fca3199285348e5142368ad4a87f9ca7b696fbb4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 15:51:13 +0100 Subject: [PATCH 17/19] DB/Creature: Add SAI to some Obsidian Sanctum trash mobs closes #28518 by CraftedRO --- .../world/3.3.5/2024_02_16_06_world.sql | 273 ++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_06_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_06_world.sql b/sql/updates/world/3.3.5/2024_02_16_06_world.sql new file mode 100644 index 0000000000000..832625fbe5dcf --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_06_world.sql @@ -0,0 +1,273 @@ +-- Onyx Blaze Mistress +SET @ENTRY := 30681; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@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,0,0,100,2,5000,5000,12000,13000,11,39529,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Flame Shock'), +(@ENTRY,0,1,0,0,0,100,4,5000,5000,12000,13000,11,58940,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Flame Shock'), +(@ENTRY,0,2,0,0,0,100,2,8000,8000,19000,22000,11,57757,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Rain of Fire'), +(@ENTRY,0,3,0,0,0,100,4,8000,8000,19000,22000,11,58936,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Rain of Fire'), +(@ENTRY,0,4,0,0,0,100,6,3000,11000,8000,15000,11,57753,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Conjure Flame Orb'); + +-- Onyx Brood General +SET @ENTRY := 30680; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@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,4,0,100,3,0,0,0,0,11,57740,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Devotion Aura on Aggro'), +(@ENTRY,0,1,0,4,0,100,5,0,0,0,0,11,58944,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Devotion Aura on Aggro'), +(@ENTRY,0,2,0,0,0,100,6,4500,4500,11500,13500,11,13737,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Mortal Strike Shock'), +(@ENTRY,0,3,0,0,0,100,7,6000,6000,0,0,11,57742,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Avenging Fury Shock'), +(@ENTRY,0,4,0,2,0,100,3,0,30,0,0,11,57733,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Draconic Rage at 30% HP'), +(@ENTRY,0,5,0,2,0,100,5,0,30,0,0,11,58942,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Draconic Rage at 30% HP'), +(@ENTRY,0,6,0,37,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,' Onyx Brood General - On init - say text'); + +DELETE FROM `creature_text` WHERE `CreatureID`=@ENTRY; +INSERT INTO `creature_text` (`CreatureID`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(@ENTRY,0,0, 'Brood Guardians reporting in!',14,0,100,0,0,0, 'Onyx Brood General', 31397); + +-- Onyx Flight Captain +SET @ENTRY := 30682; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@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,13,0,100,6,12000,14000,0,0,11,58953,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Pummel'), +(@ENTRY,0,1,0,0,0,100,6,8000,9000,15000,21000,11,57759,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Hammer Drop'); + +-- Onyx Sanctum Guardian +SET @ENTRY := 30453; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@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,0,0,100,2,4000,5500,25000,31000,11,58948,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Curse of Mending'), +(@ENTRY,0,1,0,0,0,100,4,4000,5500,25000,31000,11,39647,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Curse of Mending'), +(@ENTRY,0,2,0,0,0,100,2,9000,9000,17800,19300,11,57728,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shockwave'), +(@ENTRY,0,3,0,0,0,100,4,9000,9000,17800,19300,11,58947,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shockwave'), +(@ENTRY,0,4,0,2,0,100,7,0,30,0,0,11,53801,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Frenzy at 30% HP'), +(@ENTRY,0,5,0,2,0,100,7,0,30,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text at 30% HP'), +(@ENTRY,0,6,0,37,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,' Onyx Sanctum Guardian - On init - say text'); + +-- NPC talk text insert +SET @ENTRY := 30453; +DELETE FROM `creature_text` WHERE `CreatureID`=@ENTRY; +INSERT INTO `creature_text` (`CreatureID`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(@ENTRY,0,0, '%s goes into a frenzy!',16,0,100,0,0,0, 'Onyx Sanctum Guardian', 38630), +(@ENTRY,1,0, 'Sanctum Guardians reporting in!',14,0,100,0,0,0, 'Onyx Sanctum Guardian', 31398); + +DELETE FROM `spell_scripts` WHERE `id`=57753; +INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(57753,0,0,15,57752,1,0,0,0,0,0); + +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `flags_extra` = `flags_extra` | 128 WHERE `entry`=30702; +DELETE FROM `creature_template_movement` WHERE `CreatureId`=30702; +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES +(30702, 1, 0, 1, 0, 0, 0); + +SET @ENTRY := 30702; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@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,54,0,100,2,0,0,0,0,11,57750,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Orb - On just summoned cast Flame Orb Periodic'), +(@ENTRY,0,1,0,54,0,100,4,0,0,0,0,11,58937,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Orb - On just summoned cast Flame Orb Periodic'); + +-- Obsidian Sanctum waypoints +UPDATE `creature` SET `position_x`=3350.9028, `position_y`=605.6205, `position_z`=81.4778, `orientation`=5.927615 WHERE `guid`=126408; +UPDATE `creature` SET `MovementType`=0, `wander_distance`=0 WHERE `id` IN (30682, 30681, 30680, 30453); +UPDATE `creature` SET `MovementType`=2, `wander_distance`=0 WHERE `guid` IN (126400, 126416, 126419, 126397, 126420); +DELETE FROM `waypoint_data` WHERE `id` IN (1264000, 1263970, 1264190, 1264200, 1264160); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `action_chance`) VALUES +(1264190, 1, 3332.0102, 429.091, 78.794, 1.5062, 100), +(1264190, 2, 3343.9570, 452.438, 85.929, 1.0978, 100), +(1264190, 3, 3369.7429, 476.040, 89.712, 0.7208, 100), +(1264190, 4, 3382.5805, 500.874, 95.542, 1.1017, 100), +(1264190, 5, 3383.0485, 527.715, 97.365, 1.5533, 100), +(1264190, 6, 3388.1821, 558.191, 93.693, 1.4002, 100), +(1264190, 7, 3393.3735, 595.698, 89.438, 1.4512, 100), +(1264190, 8, 3373.2280, 612.496, 86.898, 2.4644, 100), +(1264190, 9, 3342.7526, 637.813, 84.871, 2.4487, 100), +(1264190, 10, 3301.7080, 670.548, 84.361, 2.468, 100), +(1264190, 11, 3270.8374, 685.738, 90.816, 2.684, 100), +(1264190, 12, 3237.6757, 683.316, 90.025, 3.214, 100), +(1264190, 13, 3207.4113, 681.106, 90.128, 3.214, 100), +(1264190, 14, 3174.1948, 682.600, 83.377, 3.096, 100), +(1264190, 15, 3141.6208, 648.341, 75.023, 3.952, 100), +(1264190, 16, 3114.3566, 607.690, 74.483, 4.121, 100), +(1264190, 17, 3141.6208, 648.341, 75.023, 3.952, 100), +(1264190, 18, 3174.1948, 682.600, 83.377, 3.096, 100), +(1264190, 19, 3207.4113, 681.106, 90.128, 3.214, 100), +(1264190, 20, 3237.6757, 683.316, 90.025, 3.214, 100), +(1264190, 21, 3270.8374, 685.738, 90.816, 2.684, 100), +(1264190, 22, 3301.7080, 670.548, 84.361, 2.468, 100), +(1264190, 23, 3342.7526, 637.813, 84.871, 2.448, 100), +(1264190, 24, 3373.2280, 612.496, 86.898, 2.464, 100), +(1264190, 25, 3393.3735, 595.698, 89.438, 1.451, 100), +(1264190, 26, 3388.1821, 558.191, 93.693, 1.400, 100), +(1264190, 27, 3383.0485, 527.715, 97.365, 1.553, 100), +(1264190, 28, 3382.5805, 500.874, 95.542, 1.101, 100), +(1264190, 29, 3369.7429, 476.040, 89.712, 0.720, 100), +(1264190, 30, 3343.9570, 452.438, 85.929, 1.097, 100), +(1264190, 31, 3332.0102, 429.091, 78.794, 1.506, 100), +(1263970, 1, 3372.50, 598.436, 86.154, 5.66, 100), +(1263970, 2, 3391.99, 584.598, 88.329, 5.55, 100), +(1263970, 3, 3385.81, 556.752, 93.731, 4.49, 100), +(1263970, 4, 3380.11, 519.343, 97.941, 4.72, 100), +(1263970, 5, 3376.38, 486.877, 92.088, 4.62, 100), +(1263970, 6, 3383.20, 517.591, 97.957, 1.39, 100), +(1263970, 7, 3388.67, 556.848, 94.038, 1.37, 100), +(1263970, 8, 3391.25, 595.820, 88.642, 1.52, 100), +(1263970, 9, 3356.48, 624.187, 85.876, 2.46, 100), +(1263970, 10,3321.08, 643.297, 82.100, 2.69, 100), +(1263970, 11,3294.79, 668.056, 84.307, 2.39, 100), +(1263970, 12,3268.38, 681.741, 90.226, 2.66, 100), +(1263970, 13,3219.20, 687.871, 91.717, 3.01, 100), +(1263970, 14,3183.79, 691.095, 88.156, 3.05, 100), +(1263970, 15,3149.17, 654.760, 75.371, 3.94, 100), +(1263970, 16,3183.79, 691.095, 88.156, 3.05, 100), +(1263970, 17,3219.20, 687.871, 91.717, 3.01, 100), +(1263970, 18,3268.38, 681.741, 90.226, 2.66, 100), +(1263970, 19,3294.79, 668.056, 84.307, 2.39, 100), +(1263970, 20,3321.08, 643.297, 82.100, 2.69, 100), +(1263970, 21,3356.48, 624.187, 85.876, 2.46, 100), +(1263970, 22,3391.25, 595.820, 88.642, 1.52, 100), +(1263970, 23,3388.67, 556.848, 94.038, 1.37, 100), +(1263970, 24,3383.20, 517.591, 97.957, 1.39, 100), +(1263970, 25,3376.38, 486.877, 92.088, 4.62, 100), +(1263970, 26,3380.11, 519.343, 97.941, 4.72, 100), +(1263970, 27,3385.81, 556.752, 93.731, 4.49, 100), +(1263970, 28,3391.99, 584.598, 88.329, 5.55, 100), +(1263970, 29,3372.50, 598.436, 86.154, 5.66, 100), +(1264200, 1, 3267.378, 698.5934, 92.354, 5.718285, 100), +(1264200, 2, 3302.062, 672.2496, 84.765, 5.522720, 100), +(1264200, 3, 3333.458, 652.1536, 84.932, 5.457532, 100), +(1264200, 4, 3352.582, 626.3783, 85.136, 5.350718, 100), +(1264200, 5, 3373.487, 611.5072, 86.704, 5.664877, 100), +(1264200, 6, 3391.500, 594.7894, 88.706, 4.840994, 100), +(1264200, 7, 3384.716, 561.2724, 92.617, 4.339125, 100), +(1264200, 8, 3374.466, 534.5934, 96.967, 4.600662, 100), +(1264200, 9, 3391.568, 567.7532, 90.748, 1.094646, 100), +(1264200, 10,3391.582, 594.7891, 88.731, 1.762235, 100), +(1264200, 11,3363.784, 617.0189, 86.301, 2.468308, 100), +(1264200, 12,3324.081, 648.6863, 83.291, 2.468308, 100), +(1264200, 13,3288.948, 676.7089, 87.241, 2.468308, 100), +(1264200, 14,3263.845, 694.3148, 91.789, 2.939547, 100), +(1264200, 15,3213.507, 690.4353, 92.251, 3.079348, 100), +(1264200, 16,3182.588, 679.6979, 84.685, 3.670753, 100), +(1264200, 17,3158.388, 665.5455, 76.847, 3.670753, 100), +(1264200, 18,3137.634, 639.5677, 74.070, 4.038320, 100), +(1264200, 19,3119.810, 617.2574, 74.045, 4.038320, 100), +(1264200, 20,3102.376, 593.9634, 78.290, 4.862988, 100), +(1264200, 21,3110.314, 567.3189, 88.657, 5.100964, 100), +(1264200, 22,3115.361, 539.7775, 87.775, 4.893619, 100), +(1264200, 23,3110.314, 567.3189, 88.657, 5.100964, 100), +(1264200, 24,3102.376, 593.9634, 78.290, 4.862988, 100), +(1264200, 25,3119.810, 617.2574, 74.045, 4.038320, 100), +(1264200, 26,3137.634, 639.5677, 74.070, 4.038320, 100), +(1264200, 27,3158.388, 665.5455, 76.847, 3.670753, 100), +(1264200, 28,3182.588, 679.6979, 84.685, 3.670753, 100), +(1264200, 29,3213.507, 690.4353, 92.251, 3.079348, 100), +(1264200, 30,3263.845, 694.3148, 91.789, 2.939547, 100), +(1264200, 31,3288.948, 676.7089, 87.241, 2.468308, 100), +(1264200, 32,3324.081, 648.6863, 83.291, 2.468308, 100), +(1264200, 33,3363.784, 617.0189, 86.301, 2.468308, 100), +(1264200, 34,3391.582, 594.7891, 88.731, 1.762235, 100), +(1264200, 35,3391.568, 567.7532, 90.748, 1.094646, 100), +(1264200, 36,3374.466, 534.5934, 96.967, 4.600662, 100), +(1264200, 37,3384.716, 561.2724, 92.617, 4.339125, 100), +(1264200, 38,3391.500, 594.7894, 88.706, 4.840994, 100), +(1264200, 39,3373.487, 611.5072, 86.704, 5.664877, 100), +(1264200, 40,3352.582, 626.3783, 85.136, 5.350718, 100), +(1264200, 41,3333.458, 652.1536, 84.932, 5.457532, 100), +(1264200, 42,3302.062, 672.2496, 84.765, 5.522720, 100), +(1264200, 43,3267.378, 698.5934, 92.354, 5.718285, 100), +(1264000, 1, 3105.902, 624.807, 77.330, 1.0742, 100), +(1264000, 2, 3105.188, 574.659, 84.079, 4.7302, 100), +(1264000, 3, 3113.553, 547.966, 89.451, 5.0090, 100), +(1264000, 4, 3124.773, 514.301, 88.815, 5.0247, 100), +(1264000, 5, 3121.065, 479.498, 85.652, 4.6085, 100), +(1264000, 6, 3150.509, 448.767, 74.152, 5.4763, 100), +(1264000, 7, 3123.917, 476.544, 84.755, 2.3112, 100), +(1264000, 8, 3126.805, 516.656, 88.732, 1.5022, 100), +(1264000, 9, 3124.108, 554.401, 89.366, 1.6436, 100), +(1264000, 10,3112.344, 567.310, 88.989, 2.3112, 100), +(1264000, 11,3105.551, 601.957, 76.657, 1.5651, 100), +(1264000, 12,3120.267, 631.088, 75.817, 1.0389, 100), +(1264000, 13,3145.446, 657.818, 76.254, 0.8150, 100), +(1264000, 14,3172.876, 676.411, 81.777, 0.6108, 100), +(1264000, 15,3214.683, 691.091, 92.328, 0.3399, 100), +(1264000, 16,3172.876, 676.411, 81.777, 0.6108, 100), +(1264000, 17,3145.446, 657.818, 76.254, 0.8150, 100), +(1264000, 18,3120.267, 631.088, 75.817, 1.0389, 100), +(1264000, 19,3105.551, 601.957, 76.657, 1.5651, 100), +(1264000, 20,3112.344, 567.310, 88.989, 2.3112, 100), +(1264000, 21,3124.108, 554.401, 89.366, 1.6436, 100), +(1264000, 22,3126.805, 516.656, 88.732, 1.5022, 100), +(1264000, 23,3123.917, 476.544, 84.755, 2.3112, 100), +(1264000, 24,3150.509, 448.767, 74.152, 5.4763, 100), +(1264000, 25,3121.065, 479.498, 85.652, 4.6085, 100), +(1264000, 26,3124.773, 514.301, 88.815, 5.0247, 100), +(1264000, 27,3113.553, 547.966, 89.451, 5.0090, 100), +(1264000, 28,3105.188, 574.659, 84.079, 4.7302, 100), +(1264000, 29,3105.902, 624.807, 77.330, 1.0742, 100), +(1264160, 1, 3116.570, 545.821, 89.641, 2.33874, 100), +(1264160, 2, 3107.309, 567.170, 88.081, 1.96174, 100), +(1264160, 3, 3100.440, 583.835, 80.126, 1.96174, 100), +(1264160, 4, 3107.502, 609.043, 75.329, 1.29111, 100), +(1264160, 5, 3139.049, 641.823, 74.297, 0.81201, 100), +(1264160, 6, 3169.191, 674.250, 80.787, 0.82772, 100), +(1264160, 7, 3190.718, 691.628, 89.769, 0.61174, 100), +(1264160, 8, 3217.072, 686.743, 91.574, 6.09775, 100), +(1264160, 9, 3251.472, 680.290, 90.060, 6.09775, 100), +(1264160, 10,3280.618, 680.097, 89.147, 6.27445, 100), +(1264160, 11,3314.501, 656.239, 83.067, 5.66970, 100), +(1264160, 12,3338.522, 626.918, 82.767, 5.39874, 100), +(1264160, 13,3372.639, 598.328, 86.184, 5.28485, 100), +(1264160, 14,3395.046, 570.734, 89.737, 5.17490, 100), +(1264160, 15,3381.180, 541.152, 96.536, 4.47196, 100), +(1264160, 16,3380.853, 495.767, 94.225, 4.66046, 100), +(1264160, 17,3381.180, 541.152, 96.536, 4.47196, 100), +(1264160, 18,3395.046, 570.734, 89.737, 5.17490, 100), +(1264160, 19,3372.639, 598.328, 86.184, 5.28485, 100), +(1264160, 20,3338.522, 626.918, 82.767, 5.39874, 100), +(1264160, 21,3314.501, 656.239, 83.067, 5.66970, 100), +(1264160, 22,3280.618, 680.097, 89.147, 6.27445, 100), +(1264160, 23,3251.472, 680.290, 90.060, 6.09775, 100), +(1264160, 24,3217.072, 686.743, 91.574, 6.09775, 100), +(1264160, 25,3190.718, 691.628, 89.769, 0.61174, 100), +(1264160, 26,3169.191, 674.250, 80.787, 0.82772, 100), +(1264160, 27,3139.049, 641.823, 74.297, 0.81201, 100), +(1264160, 28,3107.502, 609.043, 75.329, 1.29111, 100), +(1264160, 29,3100.440, 583.835, 80.126, 1.96174, 100), +(1264160, 30,3107.309, 567.170, 88.081, 1.96174, 100), +(1264160, 31,3116.570, 545.821, 89.641, 2.33874, 100); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (30882, 31539); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `MountCreatureID`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvPFlags`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(30882, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, "58547"), +(31539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, "58547"); + +DELETE FROM `creature_addon` WHERE `guid` IN (126400, 126416, 126419, 126397, 126420); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `MountCreatureID`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvPFlags`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(126400, 1264000, 0, 0, 0, 0, 0, 1, 0, 0, 3, ""), +(126416, 1264160, 0, 0, 0, 0, 0, 1, 0, 0, 3, ""), +(126419, 1264190, 0, 0, 0, 0, 0, 1, 0, 0, 3, ""), +(126397, 1263970, 0, 0, 0, 0, 0, 1, 0, 0, 3, ""), +(126420, 1264200, 0, 0, 0, 0, 0, 1, 0, 0, 3, ""); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=126396; + +DELETE FROM `creature_formations` WHERE `leaderGUID` IN (126400, 126416, 126419, 126397, 126420); +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`, `point_1`, `point_2`) VALUES +(126400, 126400, 0, 0, 515, 0, 0), +(126400, 126406, 10, 90, 515, 2, 7), +(126400, 126412, 15, 0, 515, 2, 7), +(126400, 126405, 10, 270, 515, 2, 7), +(126397, 126397, 0, 0, 515, 0, 0), +(126397, 126408, 10, 90, 515, 2, 7), +(126397, 126401, 15, 0, 515, 2, 7), +(126397, 126407, 10, 270, 515, 2, 7), +(126416, 126416, 0, 0, 515, 0, 0), +(126416, 126417, 15, 0, 515, 0, 0), +(126419, 126419, 0, 0, 515, 0, 0), +(126419, 126418, 15, 0, 515, 0, 0), +(126420, 126420, 0, 0, 515, 0, 0), +(126420, 126421, 15, 0, 515, 0, 0); From ca8db8e65cd9fee1fa25dde9e829ca346c54874c Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 10 Jan 2023 00:49:22 +0100 Subject: [PATCH 18/19] Core/DBUpdater: Changed autoupdater created databases to use utf8mb4 instead of utf8mb3 (cherry picked from commit 65e787d18be898532363fea3f8847fa4d7f21192) --- src/server/database/Updater/DBUpdater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 5d92d66f36543..465120dd3bf88 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -181,7 +181,7 @@ bool DBUpdater::Create(DatabaseWorkerPool& pool) return false; } - file << "CREATE DATABASE `" << pool.GetConnectionInfo()->database << "` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci\n\n"; + file << "CREATE DATABASE `" << pool.GetConnectionInfo()->database << "` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci\n\n"; file.close(); From 1da6b8b0d784468f9101f215f7f4071540083022 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2024 20:38:48 +0100 Subject: [PATCH 19/19] DB/Creature: Fix Wild Turkey respawn time closes #25672 by CraftedRO --- sql/updates/world/3.3.5/2024_02_16_07_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2024_02_16_07_world.sql diff --git a/sql/updates/world/3.3.5/2024_02_16_07_world.sql b/sql/updates/world/3.3.5/2024_02_16_07_world.sql new file mode 100644 index 0000000000000..9b93062806917 --- /dev/null +++ b/sql/updates/world/3.3.5/2024_02_16_07_world.sql @@ -0,0 +1,2 @@ +-- Correct respawn time for Wild Turkey +UPDATE `creature` SET `spawntimesecs` = 300 WHERE `id` = 32820;