From edaf38c6c37eb6a1ef01fea059bf8058e175da8b Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Fri, 15 Sep 2023 23:30:15 +0000 Subject: [PATCH 001/340] refactor(Scripts/Spells): Check for existence of AD debuff instead of adding a custom cooldown to heal (#17265) * Update spell_paladin.cpp * whitespace --- src/server/scripts/Spells/spell_paladin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 14dfc2e240fa04..55945914e41045 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -302,7 +302,8 @@ class spell_pal_ardent_defender : public AuraScript enum Spell { - PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235 + PAL_SPELL_ARDENT_DEFENDER_DEBUFF = 66233, + PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235 }; bool Validate(SpellInfo const* /*spellInfo*/) override @@ -329,7 +330,7 @@ class spell_pal_ardent_defender : public AuraScript int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage(); uint32 allowedHealth = victim->CountPctFromMaxHealth(35); // If damage kills us - if (remainingHealth <= 0 && !victim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL)) + if (remainingHealth <= 0 && !victim->ToPlayer()->HasAura(PAL_SPELL_ARDENT_DEFENDER_DEBUFF)) { // Cast healing spell, completely avoid damage absorbAmount = dmgInfo.GetDamage(); @@ -344,7 +345,6 @@ class spell_pal_ardent_defender : public AuraScript int32 healAmount = int32(victim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense))); victim->CastCustomSpell(PAL_SPELL_ARDENT_DEFENDER_HEAL, SPELLVALUE_BASE_POINT0, healAmount, victim, true, nullptr, aurEff); - victim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, 120000); } else if (remainingHealth < int32(allowedHealth)) { From 66066f508ba5d9fcaedb5f1a55f9e3c21aaa1dac Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 16 Sep 2023 08:17:42 +0200 Subject: [PATCH 002/340] fix(Scripts/Chat): Fix chat logger (#17102) * fix(Scripts/Chat): Fix chat logger * Update chat_log.cpp * Update worldserver.conf.dist * Update chat_log.cpp * fix build * oopsie * fix clang --- src/common/Logging/Log.cpp | 2 - src/common/Logging/Log.h | 2 - src/common/Logging/LogCommon.h | 34 +------------- .../apps/worldserver/worldserver.conf.dist | 24 ++++++++-- src/server/scripts/World/chat_log.cpp | 45 +++++++++---------- 5 files changed, 44 insertions(+), 63 deletions(-) diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp index 38a8ccbbdc11ee..6fd65216cacd10 100644 --- a/src/common/Logging/Log.cpp +++ b/src/common/Logging/Log.cpp @@ -398,6 +398,4 @@ void Log::LoadFromConfig() ReadAppendersFromConfig(); ReadLoggersFromConfig(); - - _debugLogMask = DebugLogFilters(sConfigMgr->GetOption("DebugLogMask", LOG_FILTER_NONE, false)); } diff --git a/src/common/Logging/Log.h b/src/common/Logging/Log.h index bf349227b8fdbe..e2ec45cd5b5bae 100644 --- a/src/common/Logging/Log.h +++ b/src/common/Logging/Log.h @@ -121,8 +121,6 @@ typedef std::unordered_map LoggerMap; Acore::Asio::IoContext* _ioContext; Acore::Asio::Strand* _strand; - // Deprecated debug filter logs - DebugLogFilters _debugLogMask; }; #define sLog Log::instance() diff --git a/src/common/Logging/LogCommon.h b/src/common/Logging/LogCommon.h index 56b6dc58c1e4cc..ba53ba6dfcfe91 100644 --- a/src/common/Logging/LogCommon.h +++ b/src/common/Logging/LogCommon.h @@ -46,6 +46,7 @@ enum AppenderType : uint8 APPENDER_INVALID = 0xFF // SKIP }; +// EnumUtils: DESCRIBE THIS enum AppenderFlags : uint8 { APPENDER_FLAGS_NONE = 0x00, @@ -56,37 +57,4 @@ enum AppenderFlags : uint8 APPENDER_FLAGS_MAKE_FILE_BACKUP = 0x10 }; -// Dprecated debug log filters need delte later -enum DebugLogFilters -{ - LOG_FILTER_NONE = 0x00000000, - LOG_FILTER_UNITS = 0x00000001, // Anything related to units that doesn't fit in other categories. ie. creature formations - LOG_FILTER_PETS = 0x00000002, - LOG_FILTER_VEHICLES = 0x00000004, - LOG_FILTER_TSCR = 0x00000008, // C++ AI, instance scripts, etc. - LOG_FILTER_DATABASE_AI = 0x00000010, // SmartAI, EventAI, CreatureAI - LOG_FILTER_MAPSCRIPTS = 0x00000020, - LOG_FILTER_NETWORKIO = 0x00000040, // Anything packet/netcode related - LOG_FILTER_SPELLS_AURAS = 0x00000080, - LOG_FILTER_ACHIEVEMENTSYS = 0x00000100, - LOG_FILTER_CONDITIONSYS = 0x00000200, - LOG_FILTER_POOLSYS = 0x00000400, - LOG_FILTER_AUCTIONHOUSE = 0x00000800, - LOG_FILTER_BATTLEGROUND = 0x00001000, // Anything related to arena's and battlegrounds - LOG_FILTER_OUTDOORPVP = 0x00002000, - LOG_FILTER_CHATSYS = 0x00004000, - LOG_FILTER_LFG = 0x00008000, - LOG_FILTER_MAPS = 0x00010000, // Maps, instances, grids, cells, visibility - LOG_FILTER_PLAYER_LOADING = 0x00020000, // Debug output from Player::_Load functions - LOG_FILTER_PLAYER_ITEMS = 0x00040000, // Anything item related - LOG_FILTER_PLAYER_SKILLS = 0x00080000, // Skills related - LOG_FILTER_LOOT = 0x00100000, // Loot related - LOG_FILTER_GUILD = 0x00200000, // Guild related - LOG_FILTER_TRANSPORTS = 0x00400000, // Transport related - LOG_FILTER_WARDEN = 0x00800000, // Warden related - LOG_FILTER_BATTLEFIELD = 0x01000000, // Battlefield related - LOG_FILTER_MODULES = 0x02000000, // Modules debug - LOG_FILTER_CLOSE_SOCKET = 0x04000000, // Whenever KickPlayer() or CloseSocket() are called -}; - #endif // LogCommon_h__ diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 0a5372c5c25ffb..5a25dc2cd6db15 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -3949,6 +3949,7 @@ AuctionHouse.SearchTimeout = 1000 Appender.Console=1,4,0,"1 9 3 6 5 8" Appender.Server=2,5,0,Server.log,w +# Appender.Chat=2,4,15,chat_%s.log # Appender.GM=2,5,15,gm_%s.log Appender.Errors=2,5,0,Errors.log # Appender.DB=3,5,0 @@ -3993,9 +3994,26 @@ Logger.spells.scripts=2,Console Errors #Logger.bg.battleground=4,Console Server #Logger.bg.reportpvpafk=4,Console Server #Logger.calendar=4,Console Server -#Logger.chat.log=4,Console Server -#Logger.chat.log.addon=4,Console Server -#Logger.chat.system=4,Console Server +#Logger.chat.say=4,Console Chat +#Logger.chat.emote=4,Console Chat +#Logger.chat.yell=4,Console Chat +#Logger.chat.whisper=4,Console Chat +#Logger.chat.party=4,Console Chat +#Logger.chat.raid=4,Console Chat +#Logger.chat.bg=4,Console Chat +#Logger.chat.guild=4,Console Chat +#Logger.chat.guild.officer=4,Console Chat +#Logger.chat.channel=4,Console Chat +#Logger.chat.addon.msg=4,Console Chat +#Logger.chat.addon.emote=4,Console Chat +#Logger.chat.addon.yell=4,Console Chat +#Logger.chat.addon.whisper=4,Console Chat +#Logger.chat.addon.party=4,Console Chat +#Logger.chat.addon.raid=4,Console Chat +#Logger.chat.addon.bg=4,Console Chat +#Logger.chat.addon.guild=4,Console Chat +#Logger.chat.addon.guild.officer=4,Console Chat +#Logger.chat.addon.channel=4,Console Chat #Logger.cheat=4,Console Server #Logger.commands.ra=4,Console Server #Logger.condition=4,Console Server diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 186398009a0dee..103fb50b657983 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -19,12 +19,7 @@ #include "Group.h" #include "Guild.h" #include "ScriptMgr.h" - -#define LOG_CHAT(TYPE, ...) \ - if (lang != LANG_ADDON) \ - LOG_DEBUG("chat.log." TYPE, __VA_ARGS__); \ - else \ - LOG_DEBUG("chat.log.addon." TYPE, __VA_ARGS__); +#include "Log.h" class ChatLogScript : public PlayerScript { @@ -36,66 +31,67 @@ class ChatLogScript : public PlayerScript switch (type) { case CHAT_MSG_SAY: - LOG_CHAT("say", "Player {} says (language {}): {}", + LOG_INFO("chat.say", "Player {} says (language {}): {}", player->GetName(), lang, msg); break; case CHAT_MSG_EMOTE: - LOG_CHAT("emote", "Player {} emotes: {}", + LOG_INFO("chat.emote", "Player {} emotes: {}", player->GetName(), msg); break; case CHAT_MSG_YELL: - LOG_CHAT("yell", "Player {} yells (language {}): {}", + LOG_INFO("chat.yell", "Player {} yells (language {}): {}", player->GetName(), lang, msg); break; } } - void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override + void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player* receiver) override { - LOG_CHAT("whisper", "Player {} tells {}: {}", + LOG_INFO("chat.whisper", "Player {} tells {}: {}", player->GetName(), receiver ? receiver->GetName() : "", msg); } void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override { + std::string str = lang != LANG_ADDON ? "chat." : "chat.addon."; //! NOTE: //! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER" switch (type) { case CHAT_MSG_PARTY: - LOG_CHAT("party", "Player {} tells group with leader {}: {}", + LOG_INFO(str + "party", "Player {} tells group with leader {}: {}", player->GetName(), group ? group->GetLeaderName() : "", msg); break; case CHAT_MSG_PARTY_LEADER: - LOG_CHAT("party", "Leader {} tells group: {}", + LOG_INFO(str + "party", "Leader {} tells group: {}", player->GetName(), msg); break; case CHAT_MSG_RAID: - LOG_CHAT("raid", "Player {} tells raid with leader {}: {}", + LOG_INFO(str + "raid", "Player {} tells raid with leader {}: {}", player->GetName(), group ? group->GetLeaderName() : "", msg); break; case CHAT_MSG_RAID_LEADER: - LOG_CHAT("raid", "Leader player {} tells raid: {}", + LOG_INFO(str + "raid", "Leader player {} tells raid: {}", player->GetName(), msg); break; case CHAT_MSG_RAID_WARNING: - LOG_CHAT("raid", "Leader player {} warns raid with: {}", + LOG_INFO(str + "raid", "Leader player {} sends raid warning: {}", player->GetName(), msg); break; case CHAT_MSG_BATTLEGROUND: - LOG_CHAT("bg", "Player {} tells battleground with leader {}: {}", + LOG_INFO(str + "bg", "Player {} tells battleground with leader {}: {}", player->GetName(), group ? group->GetLeaderName() : "", msg); break; case CHAT_MSG_BATTLEGROUND_LEADER: - LOG_CHAT("bg", "Leader player {} tells battleground: {}", + LOG_INFO(str + "bg", "Leader player {} tells battleground: {}", player->GetName(), msg); break; } @@ -103,21 +99,22 @@ class ChatLogScript : public PlayerScript void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild) override { + std::string str = lang != LANG_ADDON ? "chat." : "chat.addon."; switch (type) { case CHAT_MSG_GUILD: - LOG_CHAT("guild", "Player {} tells guild {}: {}", + LOG_INFO(str + "guild", "Player {} tells guild {}: {}", player->GetName(), guild ? guild->GetName() : "", msg); break; case CHAT_MSG_OFFICER: - LOG_CHAT("guild.officer", "Player {} tells guild {} officers: {}", + LOG_INFO(str + "guild.officer", "Player {} tells guild {} officers: {}", player->GetName(), guild ? guild->GetName() : "", msg); break; } } - void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Channel* channel) override + void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel* channel) override { bool isSystem = channel && (channel->HasFlag(CHANNEL_FLAG_TRADE) || @@ -127,13 +124,15 @@ class ChatLogScript : public PlayerScript if (isSystem) { - LOG_CHAT("system", "Player {} tells channel {}: {}", + LOG_INFO("chat.channel", "Player {} tells channel {}: {}", player->GetName(), channel->GetName(), msg); } else { + // Allow to log custom channels. i.e. world channel + // in that case set config: Logger.channel.world=6,Chat std::string channelName = channel ? channel->GetName() : ""; - LOG_CHAT("channel." + channelName, "Player {} tells channel {}: {}", + LOG_INFO("chat.channel." + channelName, "Player {} tells channel {}: {}", player->GetName(), channelName, msg); } } From fbf7ba2191b4faeeecb2717d3990e92c6c8c5449 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 16 Sep 2023 14:26:08 +0200 Subject: [PATCH 003/340] chore(Core/enumutils): regenerate enumutils (#17087) * chore(misc/enumutils): update enumutils * fix build * latest update --- src/common/Logging/enuminfo_LogCommon.cpp | 51 +++++++ src/common/Utilities/SmartEnum.h | 6 +- src/server/game/AI/CreatureAI.h | 2 +- src/server/game/AI/enuminfo_CreatureAI.cpp | 70 +++++++++ .../Creature/enuminfo_CreatureData.cpp | 10 +- .../game/Entities/Unit/enuminfo_Unit.cpp | 138 +++++++++--------- 6 files changed, 202 insertions(+), 75 deletions(-) create mode 100644 src/server/game/AI/enuminfo_CreatureAI.cpp diff --git a/src/common/Logging/enuminfo_LogCommon.cpp b/src/common/Logging/enuminfo_LogCommon.cpp index da8cbc44933a8b..2e4265563571c7 100644 --- a/src/common/Logging/enuminfo_LogCommon.cpp +++ b/src/common/Logging/enuminfo_LogCommon.cpp @@ -121,4 +121,55 @@ AC_API_EXPORT size_t EnumUtils::ToIndex(AppenderType value) default: throw std::out_of_range("value"); } } + +/*****************************************************************\ +|* data for enum 'AppenderFlags' in 'LogCommon.h' auto-generated *| +\*****************************************************************/ +template <> +AC_API_EXPORT EnumText EnumUtils::ToString(AppenderFlags value) +{ + switch (value) + { + case APPENDER_FLAGS_NONE: return { "APPENDER_FLAGS_NONE", "APPENDER_FLAGS_NONE", "" }; + case APPENDER_FLAGS_PREFIX_TIMESTAMP: return { "APPENDER_FLAGS_PREFIX_TIMESTAMP", "APPENDER_FLAGS_PREFIX_TIMESTAMP", "" }; + case APPENDER_FLAGS_PREFIX_LOGLEVEL: return { "APPENDER_FLAGS_PREFIX_LOGLEVEL", "APPENDER_FLAGS_PREFIX_LOGLEVEL", "" }; + case APPENDER_FLAGS_PREFIX_LOGFILTERTYPE: return { "APPENDER_FLAGS_PREFIX_LOGFILTERTYPE", "APPENDER_FLAGS_PREFIX_LOGFILTERTYPE", "" }; + case APPENDER_FLAGS_USE_TIMESTAMP: return { "APPENDER_FLAGS_USE_TIMESTAMP", "APPENDER_FLAGS_USE_TIMESTAMP", "" }; + case APPENDER_FLAGS_MAKE_FILE_BACKUP: return { "APPENDER_FLAGS_MAKE_FILE_BACKUP", "APPENDER_FLAGS_MAKE_FILE_BACKUP", "" }; + default: throw std::out_of_range("value"); + } +} + +template <> +AC_API_EXPORT size_t EnumUtils::Count() { return 6; } + +template <> +AC_API_EXPORT AppenderFlags EnumUtils::FromIndex(size_t index) +{ + switch (index) + { + case 0: return APPENDER_FLAGS_NONE; + case 1: return APPENDER_FLAGS_PREFIX_TIMESTAMP; + case 2: return APPENDER_FLAGS_PREFIX_LOGLEVEL; + case 3: return APPENDER_FLAGS_PREFIX_LOGFILTERTYPE; + case 4: return APPENDER_FLAGS_USE_TIMESTAMP; + case 5: return APPENDER_FLAGS_MAKE_FILE_BACKUP; + default: throw std::out_of_range("index"); + } +} + +template <> +AC_API_EXPORT size_t EnumUtils::ToIndex(AppenderFlags value) +{ + switch (value) + { + case APPENDER_FLAGS_NONE: return 0; + case APPENDER_FLAGS_PREFIX_TIMESTAMP: return 1; + case APPENDER_FLAGS_PREFIX_LOGLEVEL: return 2; + case APPENDER_FLAGS_PREFIX_LOGFILTERTYPE: return 3; + case APPENDER_FLAGS_USE_TIMESTAMP: return 4; + case APPENDER_FLAGS_MAKE_FILE_BACKUP: return 5; + default: throw std::out_of_range("value"); + } +} } diff --git a/src/common/Utilities/SmartEnum.h b/src/common/Utilities/SmartEnum.h index 880f72c51822ad..e6e0be2572056e 100644 --- a/src/common/Utilities/SmartEnum.h +++ b/src/common/Utilities/SmartEnum.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITY_SMARTENUM_H -#define TRINITY_SMARTENUM_H +#ifndef AC_SMARTENUM_H +#define AC_SMARTENUM_H #include "IteratorPair.h" #include @@ -130,4 +130,4 @@ class EnumUtils static char const* ToDescription(Enum value) { return ToString(value).Description; } }; -#endif +#endif // AC_SMART_ENUM_H diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 993da42e22f26e..f21ae8b83ba8a0 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -82,7 +82,7 @@ class CreatureAI : public UnitAI Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); public: - // EnumUtils: DESCRIBE THIS + // EnumUtils: DESCRIBE THIS (in CreatureAI::) enum EvadeReason { EVADE_REASON_NO_HOSTILES, // the creature's threat list is empty diff --git a/src/server/game/AI/enuminfo_CreatureAI.cpp b/src/server/game/AI/enuminfo_CreatureAI.cpp new file mode 100644 index 00000000000000..3cb4c7e158ce5f --- /dev/null +++ b/src/server/game/AI/enuminfo_CreatureAI.cpp @@ -0,0 +1,70 @@ +/* + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "CreatureAI.h" +#include "Define.h" +#include "SmartEnum.h" +#include + +namespace Acore::Impl::EnumUtilsImpl +{ + +/****************************************************************************\ +|* data for enum 'CreatureAI::EvadeReason' in 'CreatureAI.h' auto-generated *| +\****************************************************************************/ +template <> +AC_API_EXPORT EnumText EnumUtils::ToString(CreatureAI::EvadeReason value) +{ + switch (value) + { + case CreatureAI::EVADE_REASON_NO_HOSTILES: return { "EVADE_REASON_NO_HOSTILES", "EVADE_REASON_NO_HOSTILES", "the creature's threat list is empty" }; + case CreatureAI::EVADE_REASON_BOUNDARY: return { "EVADE_REASON_BOUNDARY", "EVADE_REASON_BOUNDARY", "the creature has moved outside its evade boundary" }; + case CreatureAI::EVADE_REASON_SEQUENCE_BREAK: return { "EVADE_REASON_SEQUENCE_BREAK", "EVADE_REASON_SEQUENCE_BREAK", "this is a boss and the pre-requisite encounters for engaging it are not defeated yet" }; + case CreatureAI::EVADE_REASON_NO_PATH: return { "EVADE_REASON_NO_PATH", "EVADE_REASON_NO_PATH", "the creature was unable to reach its target for over 5 seconds" }; + default: throw std::out_of_range("value"); + } +} + +template <> +AC_API_EXPORT size_t EnumUtils::Count() { return 4; } + +template <> +AC_API_EXPORT CreatureAI::EvadeReason EnumUtils::FromIndex(size_t index) +{ + switch (index) + { + case 0: return CreatureAI::EVADE_REASON_NO_HOSTILES; + case 1: return CreatureAI::EVADE_REASON_BOUNDARY; + case 2: return CreatureAI::EVADE_REASON_SEQUENCE_BREAK; + case 3: return CreatureAI::EVADE_REASON_NO_PATH; + default: throw std::out_of_range("index"); + } +} + +template <> +AC_API_EXPORT size_t EnumUtils::ToIndex(CreatureAI::EvadeReason value) +{ + switch (value) + { + case CreatureAI::EVADE_REASON_NO_HOSTILES: return 0; + case CreatureAI::EVADE_REASON_BOUNDARY: return 1; + case CreatureAI::EVADE_REASON_SEQUENCE_BREAK: return 2; + case CreatureAI::EVADE_REASON_NO_PATH: return 3; + default: throw std::out_of_range("value"); + } +} +} diff --git a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp index 85b665f4d35e0b..80a6de93abfb5f 100644 --- a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp +++ b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp @@ -42,7 +42,7 @@ AC_API_EXPORT EnumText EnumUtils::ToString(CreatureFlagsExtr case CREATURE_FLAG_EXTRA_NO_TAUNT: return { "CREATURE_FLAG_EXTRA_NO_TAUNT", "CREATURE_FLAG_EXTRA_NO_TAUNT", "creature is immune to taunt auras and 'attack me' effects" }; case CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE: return { "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "creature won't update movement flags" }; case CREATURE_FLAG_EXTRA_GHOST_VISIBILITY: return { "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "creature will only be visible to dead players" }; - case CREATURE_FLAG_EXTRA_UNUSED_12: return { "CREATURE_FLAG_EXTRA_UNUSED_12", "CREATURE_FLAG_EXTRA_UNUSED_12", "TODO: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)" }; + case CREATURE_FLAG_EXTRA_UNUSED_12: return { "CREATURE_FLAG_EXTRA_UNUSED_12", "CREATURE_FLAG_EXTRA_UNUSED_12", "/ @todo: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)" }; case CREATURE_FLAG_EXTRA_NO_SELL_VENDOR: return { "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "players can't sell items to this vendor" }; case CREATURE_FLAG_EXTRA_IGNORE_COMBAT: return { "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "" }; case CREATURE_FLAG_EXTRA_WORLDEVENT: return { "CREATURE_FLAG_EXTRA_WORLDEVENT", "CREATURE_FLAG_EXTRA_WORLDEVENT", "custom flag for world event creatures (left room for merging)" }; @@ -55,10 +55,10 @@ AC_API_EXPORT EnumText EnumUtils::ToString(CreatureFlagsExtr case CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ: return { "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "creature does not need to take player damage for kill credit" }; case CREATURE_FLAG_EXTRA_AVOID_AOE: return { "CREATURE_FLAG_EXTRA_AVOID_AOE", "CREATURE_FLAG_EXTRA_AVOID_AOE", "pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)" }; case CREATURE_FLAG_EXTRA_NO_DODGE: return { "CREATURE_FLAG_EXTRA_NO_DODGE", "CREATURE_FLAG_EXTRA_NO_DODGE", "xinef: target cannot dodge" }; - case CREATURE_FLAG_EXTRA_MODULE: return { "CREATURE_FLAG_EXTRA_MODULE", "CREATURE_FLAG_EXTRA_MODULE", "Used by module creatures to avoid blizzlike checks." }; - case CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE: return { "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "Creature does not call for assistance on initial aggro", "" }; - case CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS: return { "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "Prevents creature from responding to assistance calls", "" }; - case CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI: return { "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "Creature entry SAI won't be overriden by GUID SAI", "" }; + case CREATURE_FLAG_EXTRA_MODULE: return { "CREATURE_FLAG_EXTRA_MODULE", "CREATURE_FLAG_EXTRA_MODULE", "" }; + case CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE: return { "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "Prevent creatures from calling for assistance on initial aggro" }; + case CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS: return { "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "Prevents creature from responding to assistance calls" }; + case CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI: return { "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "Load both ENTRY and GUID specific SAI" }; case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return { "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)" }; case CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING: return { "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "creature ignore pathfinding" }; case CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK: return { "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "creature is immune to knockback effects" }; diff --git a/src/server/game/Entities/Unit/enuminfo_Unit.cpp b/src/server/game/Entities/Unit/enuminfo_Unit.cpp index 8444ba3d49a54e..a3c4938c6156af 100644 --- a/src/server/game/Entities/Unit/enuminfo_Unit.cpp +++ b/src/server/game/Entities/Unit/enuminfo_Unit.cpp @@ -31,6 +31,7 @@ AC_API_EXPORT EnumText EnumUtils::ToString(UnitFlags value) { switch (value) { + case UNIT_FLAG_NONE: return { "UNIT_FLAG_NONE", "UNIT_FLAG_NONE", "" }; case UNIT_FLAG_SERVER_CONTROLLED: return { "UNIT_FLAG_SERVER_CONTROLLED", "UNIT_FLAG_SERVER_CONTROLLED", "set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner" }; case UNIT_FLAG_NON_ATTACKABLE: return { "UNIT_FLAG_NON_ATTACKABLE", "UNIT_FLAG_NON_ATTACKABLE", "not attackable" }; case UNIT_FLAG_DISABLE_MOVE: return { "UNIT_FLAG_DISABLE_MOVE", "UNIT_FLAG_DISABLE_MOVE", "" }; @@ -68,45 +69,46 @@ AC_API_EXPORT EnumText EnumUtils::ToString(UnitFlags value) } template <> -AC_API_EXPORT size_t EnumUtils::Count() { return 32; } +AC_API_EXPORT size_t EnumUtils::Count() { return 33; } template <> AC_API_EXPORT UnitFlags EnumUtils::FromIndex(size_t index) { switch (index) { - case 0: return UNIT_FLAG_SERVER_CONTROLLED; - case 1: return UNIT_FLAG_NON_ATTACKABLE; - case 2: return UNIT_FLAG_DISABLE_MOVE; - case 3: return UNIT_FLAG_PLAYER_CONTROLLED; - case 4: return UNIT_FLAG_RENAME; - case 5: return UNIT_FLAG_PREPARATION; - case 6: return UNIT_FLAG_UNK_6; - case 7: return UNIT_FLAG_NOT_ATTACKABLE_1; - case 8: return UNIT_FLAG_IMMUNE_TO_PC; - case 9: return UNIT_FLAG_IMMUNE_TO_NPC; - case 10: return UNIT_FLAG_LOOTING; - case 11: return UNIT_FLAG_PET_IN_COMBAT; - case 12: return UNIT_FLAG_PVP; - case 13: return UNIT_FLAG_SILENCED; - case 14: return UNIT_FLAG_CANNOT_SWIM; - case 15: return UNIT_FLAG_SWIMMING; - case 16: return UNIT_FLAG_NON_ATTACKABLE_2; - case 17: return UNIT_FLAG_PACIFIED; - case 18: return UNIT_FLAG_STUNNED; - case 19: return UNIT_FLAG_IN_COMBAT; - case 20: return UNIT_FLAG_TAXI_FLIGHT; - case 21: return UNIT_FLAG_DISARMED; - case 22: return UNIT_FLAG_CONFUSED; - case 23: return UNIT_FLAG_FLEEING; - case 24: return UNIT_FLAG_POSSESSED; - case 25: return UNIT_FLAG_NOT_SELECTABLE; - case 26: return UNIT_FLAG_SKINNABLE; - case 27: return UNIT_FLAG_MOUNT; - case 28: return UNIT_FLAG_UNK_28; - case 29: return UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT; - case 30: return UNIT_FLAG_SHEATHE; - case 31: return UNIT_FLAG_IMMUNE; + case 0: return UNIT_FLAG_NONE; + case 1: return UNIT_FLAG_SERVER_CONTROLLED; + case 2: return UNIT_FLAG_NON_ATTACKABLE; + case 3: return UNIT_FLAG_DISABLE_MOVE; + case 4: return UNIT_FLAG_PLAYER_CONTROLLED; + case 5: return UNIT_FLAG_RENAME; + case 6: return UNIT_FLAG_PREPARATION; + case 7: return UNIT_FLAG_UNK_6; + case 8: return UNIT_FLAG_NOT_ATTACKABLE_1; + case 9: return UNIT_FLAG_IMMUNE_TO_PC; + case 10: return UNIT_FLAG_IMMUNE_TO_NPC; + case 11: return UNIT_FLAG_LOOTING; + case 12: return UNIT_FLAG_PET_IN_COMBAT; + case 13: return UNIT_FLAG_PVP; + case 14: return UNIT_FLAG_SILENCED; + case 15: return UNIT_FLAG_CANNOT_SWIM; + case 16: return UNIT_FLAG_SWIMMING; + case 17: return UNIT_FLAG_NON_ATTACKABLE_2; + case 18: return UNIT_FLAG_PACIFIED; + case 19: return UNIT_FLAG_STUNNED; + case 20: return UNIT_FLAG_IN_COMBAT; + case 21: return UNIT_FLAG_TAXI_FLIGHT; + case 22: return UNIT_FLAG_DISARMED; + case 23: return UNIT_FLAG_CONFUSED; + case 24: return UNIT_FLAG_FLEEING; + case 25: return UNIT_FLAG_POSSESSED; + case 26: return UNIT_FLAG_NOT_SELECTABLE; + case 27: return UNIT_FLAG_SKINNABLE; + case 28: return UNIT_FLAG_MOUNT; + case 29: return UNIT_FLAG_UNK_28; + case 30: return UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT; + case 31: return UNIT_FLAG_SHEATHE; + case 32: return UNIT_FLAG_IMMUNE; default: throw std::out_of_range("index"); } } @@ -116,38 +118,39 @@ AC_API_EXPORT size_t EnumUtils::ToIndex(UnitFlags value) { switch (value) { - case UNIT_FLAG_SERVER_CONTROLLED: return 0; - case UNIT_FLAG_NON_ATTACKABLE: return 1; - case UNIT_FLAG_DISABLE_MOVE: return 2; - case UNIT_FLAG_PLAYER_CONTROLLED: return 3; - case UNIT_FLAG_RENAME: return 4; - case UNIT_FLAG_PREPARATION: return 5; - case UNIT_FLAG_UNK_6: return 6; - case UNIT_FLAG_NOT_ATTACKABLE_1: return 7; - case UNIT_FLAG_IMMUNE_TO_PC: return 8; - case UNIT_FLAG_IMMUNE_TO_NPC: return 9; - case UNIT_FLAG_LOOTING: return 10; - case UNIT_FLAG_PET_IN_COMBAT: return 11; - case UNIT_FLAG_PVP: return 12; - case UNIT_FLAG_SILENCED: return 13; - case UNIT_FLAG_CANNOT_SWIM: return 14; - case UNIT_FLAG_SWIMMING: return 15; - case UNIT_FLAG_NON_ATTACKABLE_2: return 16; - case UNIT_FLAG_PACIFIED: return 17; - case UNIT_FLAG_STUNNED: return 18; - case UNIT_FLAG_IN_COMBAT: return 19; - case UNIT_FLAG_TAXI_FLIGHT: return 20; - case UNIT_FLAG_DISARMED: return 21; - case UNIT_FLAG_CONFUSED: return 22; - case UNIT_FLAG_FLEEING: return 23; - case UNIT_FLAG_POSSESSED: return 24; - case UNIT_FLAG_NOT_SELECTABLE: return 25; - case UNIT_FLAG_SKINNABLE: return 26; - case UNIT_FLAG_MOUNT: return 27; - case UNIT_FLAG_UNK_28: return 28; - case UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT: return 29; - case UNIT_FLAG_SHEATHE: return 30; - case UNIT_FLAG_IMMUNE: return 31; + case UNIT_FLAG_NONE: return 0; + case UNIT_FLAG_SERVER_CONTROLLED: return 1; + case UNIT_FLAG_NON_ATTACKABLE: return 2; + case UNIT_FLAG_DISABLE_MOVE: return 3; + case UNIT_FLAG_PLAYER_CONTROLLED: return 4; + case UNIT_FLAG_RENAME: return 5; + case UNIT_FLAG_PREPARATION: return 6; + case UNIT_FLAG_UNK_6: return 7; + case UNIT_FLAG_NOT_ATTACKABLE_1: return 8; + case UNIT_FLAG_IMMUNE_TO_PC: return 9; + case UNIT_FLAG_IMMUNE_TO_NPC: return 10; + case UNIT_FLAG_LOOTING: return 11; + case UNIT_FLAG_PET_IN_COMBAT: return 12; + case UNIT_FLAG_PVP: return 13; + case UNIT_FLAG_SILENCED: return 14; + case UNIT_FLAG_CANNOT_SWIM: return 15; + case UNIT_FLAG_SWIMMING: return 16; + case UNIT_FLAG_NON_ATTACKABLE_2: return 17; + case UNIT_FLAG_PACIFIED: return 18; + case UNIT_FLAG_STUNNED: return 19; + case UNIT_FLAG_IN_COMBAT: return 20; + case UNIT_FLAG_TAXI_FLIGHT: return 21; + case UNIT_FLAG_DISARMED: return 22; + case UNIT_FLAG_CONFUSED: return 23; + case UNIT_FLAG_FLEEING: return 24; + case UNIT_FLAG_POSSESSED: return 25; + case UNIT_FLAG_NOT_SELECTABLE: return 26; + case UNIT_FLAG_SKINNABLE: return 27; + case UNIT_FLAG_MOUNT: return 28; + case UNIT_FLAG_UNK_28: return 29; + case UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT: return 30; + case UNIT_FLAG_SHEATHE: return 31; + case UNIT_FLAG_IMMUNE: return 32; default: throw std::out_of_range("value"); } } @@ -187,12 +190,13 @@ AC_API_EXPORT EnumText EnumUtils::ToString(NPCFlags value) case UNIT_NPC_FLAG_SPELLCLICK: return { "UNIT_NPC_FLAG_SPELLCLICK", "has spell click enabled", "cause client to send 1015 opcode (spell click)" }; case UNIT_NPC_FLAG_PLAYER_VEHICLE: return { "UNIT_NPC_FLAG_PLAYER_VEHICLE", "is player vehicle", "players with mounts that have vehicle data should have it set" }; case UNIT_NPC_FLAG_MAILBOX: return { "UNIT_NPC_FLAG_MAILBOX", "is mailbox", "" }; + case UNIT_NPC_FLAG_VENDOR_MASK: return { "UNIT_NPC_FLAG_VENDOR_MASK", "UNIT_NPC_FLAG_VENDOR_MASK", "" }; default: throw std::out_of_range("value"); } } template <> -AC_API_EXPORT size_t EnumUtils::Count() { return 27; } +AC_API_EXPORT size_t EnumUtils::Count() { return 28; } template <> AC_API_EXPORT NPCFlags EnumUtils::FromIndex(size_t index) @@ -226,6 +230,7 @@ AC_API_EXPORT NPCFlags EnumUtils::FromIndex(size_t index) case 24: return UNIT_NPC_FLAG_SPELLCLICK; case 25: return UNIT_NPC_FLAG_PLAYER_VEHICLE; case 26: return UNIT_NPC_FLAG_MAILBOX; + case 27: return UNIT_NPC_FLAG_VENDOR_MASK; default: throw std::out_of_range("index"); } } @@ -262,6 +267,7 @@ AC_API_EXPORT size_t EnumUtils::ToIndex(NPCFlags value) case UNIT_NPC_FLAG_SPELLCLICK: return 24; case UNIT_NPC_FLAG_PLAYER_VEHICLE: return 25; case UNIT_NPC_FLAG_MAILBOX: return 26; + case UNIT_NPC_FLAG_VENDOR_MASK: return 27; default: throw std::out_of_range("value"); } } From 4f6a402da3d08310bc33e6ba0362b3a7a9347fb1 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 16 Sep 2023 14:56:35 +0200 Subject: [PATCH 004/340] =?UTF-8?q?fix(DB/Character):=20Allow=20profanity?= =?UTF-8?q?=5Fname=20and=20reserved=5Fname=20to=20be=20accen=E2=80=A6=20(#?= =?UTF-8?q?17224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/Character): Allow profanity_name and reserved_name to be accent sensitive * closes https://github.com/azerothcore/azerothcore-wotlk/issues/13214 --- .../pending_db_characters/rev_1694253259088544700.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_characters/rev_1694253259088544700.sql diff --git a/data/sql/updates/pending_db_characters/rev_1694253259088544700.sql b/data/sql/updates/pending_db_characters/rev_1694253259088544700.sql new file mode 100644 index 00000000000000..6b257211b46ce5 --- /dev/null +++ b/data/sql/updates/pending_db_characters/rev_1694253259088544700.sql @@ -0,0 +1,6 @@ +-- +ALTER TABLE `profanity_name` + CHANGE COLUMN `name` `name` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin' FIRST; + +ALTER TABLE `reserved_name` + CHANGE COLUMN `name` `name` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin' FIRST; From acc1303c9430ae8216dfab1d20ca58e9f5f45b64 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 16 Sep 2023 12:57:48 +0000 Subject: [PATCH 005/340] chore(DB): import pending files Referenced commit(s): 4f6a402da3d08310bc33e6ba0362b3a7a9347fb1 --- .../2023_09_16_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_characters/rev_1694253259088544700.sql => db_characters/2023_09_16_00.sql} (83%) diff --git a/data/sql/updates/pending_db_characters/rev_1694253259088544700.sql b/data/sql/updates/db_characters/2023_09_16_00.sql similarity index 83% rename from data/sql/updates/pending_db_characters/rev_1694253259088544700.sql rename to data/sql/updates/db_characters/2023_09_16_00.sql index 6b257211b46ce5..fbaccf15e77a85 100644 --- a/data/sql/updates/pending_db_characters/rev_1694253259088544700.sql +++ b/data/sql/updates/db_characters/2023_09_16_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_05_23_00 -> 2023_09_16_00 -- ALTER TABLE `profanity_name` CHANGE COLUMN `name` `name` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin' FIRST; From b84596fcaba2b805723e30d291c570c09c091f94 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 03:05:10 +0200 Subject: [PATCH 006/340] chore(Scripts/DK): Move CheckCast to spell_dk_raise_ally script (#17221) * chore(Scripts/Spell): Move CheckCast to spell_dk_raise_ally script * Update spell_dk.cpp * Update spell_dk.cpp --- src/server/game/Spells/Spell.cpp | 17 ----------------- src/server/scripts/Spells/spell_dk.cpp | 13 +++++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index f97a8827d229ca..4bf4341a5e14b3 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6088,23 +6088,6 @@ SpellCastResult Spell::CheckCast(bool strict) // for effects of spells that have only one target switch (m_spellInfo->Effects[i].Effect) { - case SPELL_EFFECT_DUMMY: - { - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT) - { - // Raise Ally - if( m_spellInfo->Id == 61999 ) - { - Unit* target = m_targets.GetUnitTarget(); - if (!target) - return SPELL_FAILED_BAD_TARGETS; - - if (target->IsAlive()) // not discovered attributeEx5? - return SPELL_FAILED_TARGET_NOT_DEAD; - } - } - break; - } case SPELL_EFFECT_LEARN_SPELL: { if (m_caster->GetTypeId() != TYPEID_PLAYER) diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 046dd925e3a0b2..7a829a5171fdae 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -146,6 +146,18 @@ class spell_dk_raise_ally : public SpellScript { PrepareSpellScript(spell_dk_raise_ally); + SpellCastResult CheckCast() + { + Player* unitTarget = GetHitPlayer(); + if (!unitTarget) + return SPELL_FAILED_BAD_TARGETS; + + if (unitTarget->IsAlive()) // not discovered attributeEx5? + return SPELL_FAILED_TARGET_NOT_DEAD; + + return SPELL_CAST_OK; + } + void HandleDummy(SpellEffIndex /*effIndex*/) { if (Player* unitTarget = GetHitPlayer()) @@ -237,6 +249,7 @@ class spell_dk_raise_ally : public SpellScript void Register() override { + OnCheckCast += SpellCheckCastFn(spell_dk_raise_ally::CheckCast); OnEffectHitTarget += SpellEffectFn(spell_dk_raise_ally::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; From 63a4301b1c87dd7086fc6af2982d38c440c34fe2 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Sun, 17 Sep 2023 05:35:46 -0500 Subject: [PATCH 007/340] fix(DB/Creature): Modernize and follow-up on PR #9912 #9943 #10052 #10282 #10285 #12702 #12751 #12765 #12854 (#17217) * fix(db/creature): Modernize PR #9912 * Update rev_1694148121469432000.sql * Update rev_1694148121469432000.sql typo * Update rev_1694148121469432000.sql * Update rev_1694148121469432000.sql --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../rev_1694148121469432000.sql | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694148121469432000.sql diff --git a/data/sql/updates/pending_db_world/rev_1694148121469432000.sql b/data/sql/updates/pending_db_world/rev_1694148121469432000.sql new file mode 100644 index 00000000000000..ff9d4bfb57911e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694148121469432000.sql @@ -0,0 +1,36 @@ +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/9912 + +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46438, 46449, 46459, 46461, 46462, 46573, 46586, 46714, 46715, 46912, 46913, 46915, 46916, 46917, 46918, 46919, 46920, 46921, 46922, 46923, 46924, 46925, 46926, 46927, 46928, 46929, 46930, 46931, 46932, 46933, 46934, 46935, 46936, 46937, 46938, 46939, 46940, 46941, 46942, 46943, 46944, 46945, 46946, 46947, 46948, 46949, 46950, 46951, 46952, 46953, 46954, 46955, 46957, 46958, 46971, 46972, 46974, 46981, 46997, 46998, 46999, 47000, 47001, 47002, 47003, 47004, 47006, 47008, 47009, 47010, 47012, 47016, 47017, 47029, 47030, 47031, 47037, 47038, 47039, 47052, 47053, 47054, 47055, 47056, 47057, 47060, 47061, 47062, 47208, 47249, 47262, 47263, 47267, 47268, 47269, 47270, 47271, 47280, 47281, 47282, 47283, 47284, 47285, 47286, 47287, 47288, 47290, 47310, 47312, 47314, 47315, 47316, 47317, 47319, 47320, 47321, 47322, 47324, 47325, 47327, 47328, 47329, 47330, 47331, 47332, 47333, 47334, 47335, 47336, 47337, 47338, 47340, 47341, 47342, 47343, 47344, 47345, 47346, 47350, 47660, 47752, 47863, 47876, 47880, 47883, 47900, 47905, 47907, 47911, 47915, 47921, 47922, 47925, 47926, 47928, 49560, 49561, 49562, 49563, 49564, 49565, 49566, 49567, 49568, 49569, 49570, 49571, 49572, 49610, 49611, 49612, 49613, 49614, 49615, 49616, 49617, 49620, 49621, 49622, 49623, 49626, 49627, 49628, 49629, 49630, 49631, 49632, 49633, 49634, 49635, 49636, 49637, 49638, 49639, 49640, 49641, 49642, 49643, 49644, 49645, 49646, 49648); + +UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (47326, 47339, 47289); + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/9943 + +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46439, 47917, 47916, 47931, 47913); +UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (46394, 49845, 49855); + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10052 +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (49818, 49850, 49819); + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10282 +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46446, 46452, 46463, 47372, 47373, 47374, 47375, 47376, 47378, 47519, 47520, 47521, 47522, 47523, 47524, 47525, 47531, 47936, 49882, 49883, 49884, 49889, 49897, 49898, 49899); + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10285 +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (47527, 46431, 46464, 47352, 47355, 47356, 47361, 47363, 47377, 47379, 47380, 47381, 47382, 47383, 47505, 47516, 47517, 47518, 47633, 47647, 47663, 47857, 47919, 47933, 47937, 49860, 49861, 49862, 49865, 49880, 49881, 49900); + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12702 +SET @GUID :=88354; +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+96; + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12751 +SET @GUID :=94862; +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+72; + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12765 +SET @GUID :=72707; +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+45; + +-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12854 +SET @GUID :=132314; +UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+83; +UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (@GUID+25, @GUID+38, @GUID+83); From d9f6a22614183f770c84ceb58b78aae307abc552 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 17 Sep 2023 07:36:13 -0300 Subject: [PATCH 008/340] fix(DB/Creature): Netherspite is immune to taunts (#17261) Create rev_1694778808871595100.sql Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1694778808871595100.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694778808871595100.sql diff --git a/data/sql/updates/pending_db_world/rev_1694778808871595100.sql b/data/sql/updates/pending_db_world/rev_1694778808871595100.sql new file mode 100644 index 00000000000000..0a835e6e6502ed --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694778808871595100.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 15689); From cb1338675950106cca5dcc3adc7a907564c3f25f Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 10:37:02 +0000 Subject: [PATCH 009/340] chore(DB): import pending files Referenced commit(s): 63a4301b1c87dd7086fc6af2982d38c440c34fe2 --- .../rev_1694148121469432000.sql => db_world/2023_09_17_00.sql} | 1 + .../rev_1694778808871595100.sql => db_world/2023_09_17_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1694148121469432000.sql => db_world/2023_09_17_00.sql} (98%) rename data/sql/updates/{pending_db_world/rev_1694778808871595100.sql => db_world/2023_09_17_01.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1694148121469432000.sql b/data/sql/updates/db_world/2023_09_17_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1694148121469432000.sql rename to data/sql/updates/db_world/2023_09_17_00.sql index ff9d4bfb57911e..823847a35a5ce8 100644 --- a/data/sql/updates/pending_db_world/rev_1694148121469432000.sql +++ b/data/sql/updates/db_world/2023_09_17_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_15_02 -> 2023_09_17_00 -- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/9912 UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46438, 46449, 46459, 46461, 46462, 46573, 46586, 46714, 46715, 46912, 46913, 46915, 46916, 46917, 46918, 46919, 46920, 46921, 46922, 46923, 46924, 46925, 46926, 46927, 46928, 46929, 46930, 46931, 46932, 46933, 46934, 46935, 46936, 46937, 46938, 46939, 46940, 46941, 46942, 46943, 46944, 46945, 46946, 46947, 46948, 46949, 46950, 46951, 46952, 46953, 46954, 46955, 46957, 46958, 46971, 46972, 46974, 46981, 46997, 46998, 46999, 47000, 47001, 47002, 47003, 47004, 47006, 47008, 47009, 47010, 47012, 47016, 47017, 47029, 47030, 47031, 47037, 47038, 47039, 47052, 47053, 47054, 47055, 47056, 47057, 47060, 47061, 47062, 47208, 47249, 47262, 47263, 47267, 47268, 47269, 47270, 47271, 47280, 47281, 47282, 47283, 47284, 47285, 47286, 47287, 47288, 47290, 47310, 47312, 47314, 47315, 47316, 47317, 47319, 47320, 47321, 47322, 47324, 47325, 47327, 47328, 47329, 47330, 47331, 47332, 47333, 47334, 47335, 47336, 47337, 47338, 47340, 47341, 47342, 47343, 47344, 47345, 47346, 47350, 47660, 47752, 47863, 47876, 47880, 47883, 47900, 47905, 47907, 47911, 47915, 47921, 47922, 47925, 47926, 47928, 49560, 49561, 49562, 49563, 49564, 49565, 49566, 49567, 49568, 49569, 49570, 49571, 49572, 49610, 49611, 49612, 49613, 49614, 49615, 49616, 49617, 49620, 49621, 49622, 49623, 49626, 49627, 49628, 49629, 49630, 49631, 49632, 49633, 49634, 49635, 49636, 49637, 49638, 49639, 49640, 49641, 49642, 49643, 49644, 49645, 49646, 49648); diff --git a/data/sql/updates/pending_db_world/rev_1694778808871595100.sql b/data/sql/updates/db_world/2023_09_17_01.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1694778808871595100.sql rename to data/sql/updates/db_world/2023_09_17_01.sql index 0a835e6e6502ed..f2e339e641b69d 100644 --- a/data/sql/updates/pending_db_world/rev_1694778808871595100.sql +++ b/data/sql/updates/db_world/2023_09_17_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_17_00 -> 2023_09_17_01 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 15689); From 9b438731fd2ef60dbb399a089c40282455222c5d Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:38:53 +0200 Subject: [PATCH 010/340] fix(Scripts/Karazhan): remove redundant spellcasting check on Netherspite to ensure he moves back to phase 1 (#17269) initial --- .../EasternKingdoms/Karazhan/boss_netherspite.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index a86c05a0c40673..a1f03421e0991f 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -237,13 +237,10 @@ struct boss_netherspite : public BossAI DoCastSelf(SPELL_BANISH_VISUAL, true); DoCastSelf(SPELL_BANISH_ROOT, true); DestroyPortals(); - scheduler.Schedule(30s, [this](TaskContext /*context*/) + scheduler.Schedule(30s, [this](TaskContext) { - if (!me->IsNonMeleeSpellCast(false)) - { - SwitchToPortalPhase(); - return; - } + SwitchToPortalPhase(); + return; }).Schedule(10s, VANISH_PHASE, [this](TaskContext context) { DoCastRandomTarget(SPELL_NETHERBREATH, 0, 40.0f, true); From c149f213fe9f10a92b02640432f9f68453f9f9a1 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:42:09 +0200 Subject: [PATCH 011/340] fix(DB/Karazhan): fix Curator's patrol movement using sniffs (#17234) initial --- data/sql/updates/pending_db_world/curator.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 data/sql/updates/pending_db_world/curator.sql diff --git a/data/sql/updates/pending_db_world/curator.sql b/data/sql/updates/pending_db_world/curator.sql new file mode 100644 index 00000000000000..c661577b36ee93 --- /dev/null +++ b/data/sql/updates/pending_db_world/curator.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `waypoint_data` WHERE `id` = 1354890; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(1354890, 1, -11169.11, -1908.5563, 165.76112, NULL, 0, 0, 0, 100, 0), +(1354890, 2, -11184.444, -1887.7946, 158.35687, NULL, 0, 0, 0, 100, 0), +(1354890, 3, -11194.229, -1875.3362, 153.53537, NULL, 0, 0, 0, 100, 0), +(1354890, 4, -11184.444, -1887.7946, 158.35687, NULL, 0, 0, 0, 100, 0), +(1354890, 5, -11169.11, -1908.5563, 165.76112, NULL, 0, 0, 0, 100, 0), +(1354890, 6, -11104.563, -1856.9681, 165.76112, NULL, 0, 0, 0, 100, 0); From be5db26d249f3e512e6cc8af7767a7dafb1d211f Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Sun, 17 Sep 2023 07:43:10 -0300 Subject: [PATCH 012/340] fix(Scripts/MagtheridonLair): Magtheridon Debris (#17249) * fix(Core/Scripts): Magtheridon Debris * unhack * cleanup * eof line * unused variable * more cleanup --- .../rev_1694652704784938400.sql | 10 ++ .../game/Spells/SpellInfoCorrections.cpp | 10 +- .../MagtheridonsLair/boss_magtheridon.cpp | 91 ++++++++++++++----- .../instance_magtheridons_lair.cpp | 10 +- .../MagtheridonsLair/magtheridons_lair.h | 3 +- 5 files changed, 85 insertions(+), 39 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1694652704784938400.sql diff --git a/data/sql/updates/pending_db_world/rev_1694652704784938400.sql b/data/sql/updates/pending_db_world/rev_1694652704784938400.sql new file mode 100644 index 00000000000000..818520e57aa934 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694652704784938400.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 30629 AND `ScriptName` = 'spell_magtheridon_debris_target_selector'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(30629, 'spell_magtheridon_debris_target_selector'); + +UPDATE `creature_template` SET `unit_flags` = `unit_flags`|33554432, `AIName` = '', `ScriptName` = 'npc_target_trigger' WHERE `entry` = 17516; + +DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 17516); +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES +(17516, 0, 0, 0, 1, 0, 0, 0); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 24019070a48f4a..3aff2bee894ab8 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -1530,8 +1530,8 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->ChannelInterruptFlags |= AURA_INTERRUPT_FLAG_MOVE; }); - // Debris - ApplySpellFix({ 36449 }, [](SpellInfo* spellInfo) + // Debris - Debris Visual + ApplySpellFix({ 36449, 30632 }, [](SpellInfo* spellInfo) { spellInfo->Attributes |= SPELL_ATTR0_AURA_IS_DEBUFF; }); @@ -1542,12 +1542,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE; }); - // Debris Visual - ApplySpellFix({ 30632 }, [](SpellInfo* spellInfo) - { - spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_DEST_DYNOBJ_ALLY); - }); - // Activate Sunblade Protecto ApplySpellFix({ 46475, 46476 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 580e51d848b9b4..c9602b38b33c8c 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -55,8 +55,10 @@ enum Spells SPELL_QUAKE_KNOCKBACK = 30571, SPELL_COLLAPSE_DAMAGE = 36449, SPELL_CAMERA_SHAKE = 36455, + SPELL_DEBRIS_TARGET = 30629, + SPELL_DEBRIS_SPAWN = 30630, + SPELL_DEBRIS_DAMAGE = 30631, SPELL_DEBRIS_VISUAL = 30632, - SPELL_DEBRIS_DAMAGE = 30631 }; enum Groups @@ -70,26 +72,9 @@ enum Actions ACTION_INCREASE_HELLFIRE_CHANNELER_DEATH_COUNT = 1 }; -class DealDebrisDamage : public BasicEvent -{ -public: - DealDebrisDamage(Creature& creature, ObjectGuid targetGUID) : _owner(creature), _targetGUID(targetGUID) { } - - bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override - { - if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID)) - target->CastSpell(target, SPELL_DEBRIS_DAMAGE, true, nullptr, nullptr, _owner.GetGUID()); - return true; - } - -private: - Creature& _owner; - ObjectGuid _targetGUID; -}; - struct boss_magtheridon : public BossAI { - boss_magtheridon(Creature* creature) : BossAI(creature, TYPE_MAGTHERIDON) + boss_magtheridon(Creature* creature) : BossAI(creature, DATA_MAGTHERIDON) { scheduler.SetValidator([this] { @@ -137,11 +122,7 @@ struct boss_magtheridon : public BossAI _currentPhase = 0; scheduler.Schedule(20s, [this](TaskContext context) { - if (Unit* target = SelectTarget(SelectTargetMethod::Random)) - { - target->CastSpell(target, SPELL_DEBRIS_VISUAL, true, nullptr, nullptr, me->GetGUID()); - me->m_Events.AddEvent(new DealDebrisDamage(*me, target->GetGUID()), me->m_Events.CalculateTime(5000)); - } + DoCastAOE(SPELL_DEBRIS_TARGET); context.Repeat(20s); }); }); @@ -248,7 +229,7 @@ struct boss_magtheridon : public BossAI BossAI::JustEngagedWith(who); Talk(SAY_EMOTE_BEGIN); - instance->DoForAllMinions(TYPE_MAGTHERIDON, [&](Creature* creature) { + instance->DoForAllMinions(DATA_MAGTHERIDON, [&](Creature* creature) { creature->SetInCombatWithZone(); }); @@ -289,6 +270,37 @@ struct boss_magtheridon : public BossAI TaskScheduler _interruptScheduler; }; +struct npc_target_trigger : public ScriptedAI +{ + npc_target_trigger(Creature* creature) : ScriptedAI(creature), _cast(false) + { + me->SetReactState(REACT_PASSIVE); + } + + void Reset() override + { + if (!_cast) + { + DoCastSelf(SPELL_DEBRIS_VISUAL); + _cast = true; + _scheduler.Schedule(5s, [this](TaskContext /*context*/) + { + DoCastSelf(SPELL_DEBRIS_DAMAGE); + me->DespawnOrUnsummon(6000); + }); + } + } + + void UpdateAI(uint32 diff) override + { + _scheduler.Update(diff); + } + +protected: + TaskScheduler _scheduler; + bool _cast; +}; + class spell_magtheridon_blaze : public SpellScript { PrepareSpellScript(spell_magtheridon_blaze); @@ -348,6 +360,33 @@ class spell_magtheridon_quake : public SpellScript } }; +class spell_magtheridon_debris_target_selector : public SpellScript +{ + PrepareSpellScript(spell_magtheridon_debris_target_selector); + + void FilterTargets(std::list& targets) + { + targets.remove_if([&](WorldObject* target) -> bool + { + return target->GetEntry() != NPC_TARGET_TRIGGER; + }); + + Acore::Containers::RandomResize(targets, 1); + } + + void HandleHit() + { + if (Unit* target = GetHitUnit()) + target->CastSpell(target, SPELL_DEBRIS_SPAWN); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_magtheridon_debris_target_selector::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); + OnHit += SpellHitFn(spell_magtheridon_debris_target_selector::HandleHit); + } +}; + class go_manticron_cube : public GameObjectScript { public: @@ -369,8 +408,10 @@ class go_manticron_cube : public GameObjectScript void AddSC_boss_magtheridon() { RegisterMagtheridonsLairCreatureAI(boss_magtheridon); + RegisterMagtheridonsLairCreatureAI(npc_target_trigger); RegisterSpellScript(spell_magtheridon_blaze); RegisterSpellScript(spell_magtheridon_shadow_grasp); RegisterSpellScript(spell_magtheridon_quake); + RegisterSpellScript(spell_magtheridon_debris_target_selector); new go_manticron_cube(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 454479e9c75fec..33b1c111364293 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -21,18 +21,18 @@ BossBoundaryData const boundaries = { - { TYPE_MAGTHERIDON, new CircleBoundary(Position(-18.70f, 2.24f), 52.30) } + { DATA_MAGTHERIDON, new CircleBoundary(Position(-18.70f, 2.24f), 52.30) } }; DoorData const doorData[] = { - { GO_MAGTHERIDON_DOORS, TYPE_MAGTHERIDON, DOOR_TYPE_ROOM }, + { GO_MAGTHERIDON_DOORS, DATA_MAGTHERIDON, DOOR_TYPE_ROOM }, { 0, 0, DOOR_TYPE_ROOM } // END }; MinionData const minionData[] = { - { NPC_HELLFIRE_CHANNELER, TYPE_MAGTHERIDON } + { NPC_HELLFIRE_CHANNELER, DATA_MAGTHERIDON } }; class instance_magtheridons_lair : public InstanceMapScript @@ -133,7 +133,7 @@ class instance_magtheridons_lair : public InstanceMapScript if (!InstanceScript::SetBossState(id, state)) return false; - if (id == TYPE_MAGTHERIDON) + if (id == DATA_MAGTHERIDON) { if (state == IN_PROGRESS) { @@ -163,7 +163,7 @@ class instance_magtheridons_lair : public InstanceMapScript switch (type) { case DATA_CHANNELER_COMBAT: - if (GetBossState(TYPE_MAGTHERIDON) != IN_PROGRESS) + if (GetBossState(DATA_MAGTHERIDON) != IN_PROGRESS) if (Creature* magtheridon = instance->GetCreature(_magtheridonGUID)) magtheridon->SetInCombatWithZone(); break; diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index a65282235aa19a..4e28280165f672 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -27,7 +27,7 @@ enum DataTypes { - TYPE_MAGTHERIDON = 0, + DATA_MAGTHERIDON = 0, MAX_ENCOUNTER = 1, DATA_CHANNELER_COMBAT = 10, @@ -41,6 +41,7 @@ enum NpcIds NPC_HELLFIRE_CHANNELER = 17256, NPC_HELLFIRE_WARDER = 18829, NPC_HELLFIRE_RAID_TRIGGER = 17376, + NPC_TARGET_TRIGGER = 17474 }; enum GoIds From b165533aab89ea1863e09742754d4a329f7ec9fb Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 10:43:16 +0000 Subject: [PATCH 013/340] chore(DB): import pending files Referenced commit(s): c149f213fe9f10a92b02640432f9f68453f9f9a1 --- .../{pending_db_world/curator.sql => db_world/2023_09_17_02.sql} | 1 + .../rev_1694652704784938400.sql => db_world/2023_09_17_03.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/curator.sql => db_world/2023_09_17_02.sql} (93%) rename data/sql/updates/{pending_db_world/rev_1694652704784938400.sql => db_world/2023_09_17_03.sql} (93%) diff --git a/data/sql/updates/pending_db_world/curator.sql b/data/sql/updates/db_world/2023_09_17_02.sql similarity index 93% rename from data/sql/updates/pending_db_world/curator.sql rename to data/sql/updates/db_world/2023_09_17_02.sql index c661577b36ee93..42fd4eae7a753e 100644 --- a/data/sql/updates/pending_db_world/curator.sql +++ b/data/sql/updates/db_world/2023_09_17_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_01 -> 2023_09_17_02 -- DELETE FROM `waypoint_data` WHERE `id` = 1354890; INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1694652704784938400.sql b/data/sql/updates/db_world/2023_09_17_03.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1694652704784938400.sql rename to data/sql/updates/db_world/2023_09_17_03.sql index 818520e57aa934..d887c86d040f85 100644 --- a/data/sql/updates/pending_db_world/rev_1694652704784938400.sql +++ b/data/sql/updates/db_world/2023_09_17_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_02 -> 2023_09_17_03 -- DELETE FROM `spell_script_names` WHERE `spell_id` = 30629 AND `ScriptName` = 'spell_magtheridon_debris_target_selector'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From a0a06a6d1841dde84461dffffc7ce8e5e506fa33 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:43:30 +0200 Subject: [PATCH 014/340] refactor(Scripts/SSC): Hydross the Unstable boss script updated (#17081) * initial * fix timers Water tomb and vile sludge timers homogenised. I did this because the sniffs turn him into the pure form quite quickly. So I am assuming the initial timer is the same for both, and then taking some kind of average for the water tomb and also using that for vile sludge. We may need testing where we keep him in the first form for a bit just to look at the timers --- .../boss_hydross_the_unstable.cpp | 314 ++++++++---------- 1 file changed, 140 insertions(+), 174 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index a3c94d269f4d8d..446f61ef8f1ad4 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -69,219 +69,185 @@ enum Misc { GROUP_ABILITIES = 1, NPC_PURE_SPAWN_OF_HYDROSS = 22035, - - EVENT_SPELL_MARK_OF_CORRUPTION1 = 1, - EVENT_SPELL_MARK_OF_CORRUPTION2 = 2, - EVENT_SPELL_MARK_OF_CORRUPTION3 = 3, - EVENT_SPELL_MARK_OF_CORRUPTION4 = 4, - EVENT_SPELL_MARK_OF_CORRUPTION5 = 5, - EVENT_SPELL_MARK_OF_CORRUPTION6 = 6, - EVENT_SPELL_MARK_OF_HYDROSS1 = 7, - EVENT_SPELL_MARK_OF_HYDROSS2 = 8, - EVENT_SPELL_MARK_OF_HYDROSS3 = 9, - EVENT_SPELL_MARK_OF_HYDROSS4 = 10, - EVENT_SPELL_MARK_OF_HYDROSS5 = 11, - EVENT_SPELL_MARK_OF_HYDROSS6 = 12, - EVENT_SPELL_WATER_TOMB = 13, - EVENT_SPELL_VILE_SLUDGE = 14, - EVENT_SPELL_ENRAGE = 15, - EVENT_CHECK_AURA = 16, - EVENT_KILL_TALK = 17 }; -class boss_hydross_the_unstable : public CreatureScript +struct boss_hydross_the_unstable : public BossAI { -public: - boss_hydross_the_unstable() : CreatureScript("boss_hydross_the_unstable") { } + boss_hydross_the_unstable(Creature* creature) : BossAI(creature, DATA_HYDROSS_THE_UNSTABLE) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } - CreatureAI* GetAI(Creature* creature) const override + void Reset() override { - return GetSerpentShrineAI(creature); + BossAI::Reset(); + + _recentlySpoken = false; } - struct boss_hydross_the_unstableAI : public BossAI + void JustReachedHome() override { - boss_hydross_the_unstableAI(Creature* creature) : BossAI(creature, DATA_HYDROSS_THE_UNSTABLE) + BossAI::JustReachedHome(); + if (!me->HasAura(SPELL_BLUE_BEAM)) { + me->RemoveAurasDueToSpell(SPELL_CLEANSING_FIELD_AURA); } + } - void Reset() override - { - BossAI::Reset(); - } + void SetForm(bool corrupt, bool initial) + { + scheduler.CancelGroup(GROUP_ABILITIES); + DoResetThreatList(); - void JustReachedHome() override + if (corrupt) { - BossAI::JustReachedHome(); - if (!me->HasAura(SPELL_BLUE_BEAM)) - me->RemoveAurasDueToSpell(SPELL_CLEANSING_FIELD_AURA); - } + me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + DoCastSelf(SPELL_CORRUPTION, true); - void SetForm(bool corrupt, bool initial) + scheduler.Schedule(0s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION1); + }).Schedule(15s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION2); + }).Schedule(30s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION3); + }).Schedule(45s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION4); + }).Schedule(60s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION5); + }).Schedule(75s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_CORRUPTION6); + }).Schedule(12150ms, GROUP_ABILITIES, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_VILE_SLUDGE, true); + context.Repeat(9700ms, 32800ms); + }); + } + else { - events.CancelEventGroup(GROUP_ABILITIES); - DoResetThreatList(); + me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + me->RemoveAurasDueToSpell(SPELL_CORRUPTION); - if (corrupt) + scheduler.Schedule(0s, GROUP_ABILITIES, [this](TaskContext) { - me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); - me->CastSpell(me, SPELL_CORRUPTION, true); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION1, 0, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION2, 15000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION3, 30000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION4, 45000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION5, 60000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION6, 75000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_VILE_SLUDGE, 7000, GROUP_ABILITIES); - } - else + DoCastSelf(SPELL_MARK_OF_HYDROSS1); + }).Schedule(15s, GROUP_ABILITIES, [this](TaskContext) { - me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); - me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); - me->RemoveAurasDueToSpell(SPELL_CORRUPTION); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS1, 0, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS2, 15000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS3, 30000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS4, 45000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS5, 60000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS6, 75000, GROUP_ABILITIES); - events.ScheduleEvent(EVENT_SPELL_WATER_TOMB, 7000, GROUP_ABILITIES); - } - - if (initial) - return; - - if (corrupt) + DoCastSelf(SPELL_MARK_OF_HYDROSS2); + }).Schedule(30s, GROUP_ABILITIES, [this](TaskContext) { - Talk(SAY_SWITCH_TO_CORRUPT); - for (uint32 i = SPELL_SUMMON_CORRUPTED1; i <= SPELL_SUMMON_CORRUPTED4; ++i) - me->CastSpell(me, i, true); - } - else + DoCastSelf(SPELL_MARK_OF_HYDROSS3); + }).Schedule(45s, GROUP_ABILITIES, [this](TaskContext) { - Talk(SAY_SWITCH_TO_CLEAN); - for (uint32 i = SPELL_SUMMON_PURIFIED1; i <= SPELL_SUMMON_PURIFIED4; ++i) - me->CastSpell(me, i, true); - } + DoCastSelf(SPELL_MARK_OF_HYDROSS4); + }).Schedule(60s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_HYDROSS5); + }).Schedule(75s, GROUP_ABILITIES, [this](TaskContext) + { + DoCastSelf(SPELL_MARK_OF_HYDROSS6); + }).Schedule(12150ms, GROUP_ABILITIES, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_WATER_TOMB, true); + context.Repeat(9700ms, 32800ms); + }); } - void JustEngagedWith(Unit* who) override + if (initial) { - BossAI::JustEngagedWith(who); - Talk(SAY_AGGRO); - - events.ScheduleEvent(EVENT_SPELL_ENRAGE, 600000); - events.ScheduleEvent(EVENT_CHECK_AURA, 1000); - SetForm(false, true); + return; } - void KilledUnit(Unit* /*victim*/) override + if (corrupt) { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) + Talk(SAY_SWITCH_TO_CORRUPT); + for (uint32 spellId = SPELL_SUMMON_CORRUPTED1; spellId <= SPELL_SUMMON_CORRUPTED4; ++spellId) { - Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); + DoCastSelf(spellId, true); } } - - void JustSummoned(Creature* summon) override + else { - summons.Summon(summon); - summon->CastSpell(summon, SPELL_ELEMENTAL_SPAWNIN, true); - summon->SetInCombatWithZone(); - - if (summon->GetEntry() == NPC_PURE_SPAWN_OF_HYDROSS) - summon->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); - else - summon->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + Talk(SAY_SWITCH_TO_CLEAN); + for (uint32 spellId = SPELL_SUMMON_PURIFIED1; spellId <= SPELL_SUMMON_PURIFIED4; ++spellId) + { + DoCastSelf(spellId, true); + } } + } + + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + Talk(SAY_AGGRO); + SetForm(false, true); - void SummonedCreatureDespawn(Creature* summon) override + scheduler.Schedule(1s, [this](TaskContext context) { - summons.Despawn(summon); - } + if (me->HasAura(SPELL_BLUE_BEAM) == me->HasAura(SPELL_CORRUPTION)) + { + SetForm(!me->HasAura(SPELL_BLUE_BEAM), false); + } + context.Repeat(1s); + }).Schedule(10min, [this](TaskContext) + { + DoCastSelf(SPELL_ENRAGE, true); + }); + } - void JustDied(Unit* killer) override + void KilledUnit(Unit* /*victim*/) override + { + if (!_recentlySpoken) { - Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH); - BossAI::JustDied(killer); + Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY); + _recentlySpoken = true; } - - void UpdateAI(uint32 diff) override + scheduler.Schedule(6s, [this](TaskContext) { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + _recentlySpoken = false; + }); + } - switch (events.ExecuteEvent()) - { - case EVENT_CHECK_AURA: - if (me->HasAura(SPELL_BLUE_BEAM) == me->HasAura(SPELL_CORRUPTION)) - SetForm(!me->HasAura(SPELL_BLUE_BEAM), false); - events.ScheduleEvent(EVENT_CHECK_AURA, 1000); - break; - case EVENT_SPELL_ENRAGE: - me->CastSpell(me, SPELL_ENRAGE, true); - break; - case EVENT_SPELL_MARK_OF_HYDROSS1: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS1, false); - break; - case EVENT_SPELL_MARK_OF_HYDROSS2: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS2, false); - break; - case EVENT_SPELL_MARK_OF_HYDROSS3: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS3, false); - break; - case EVENT_SPELL_MARK_OF_HYDROSS4: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS4, false); - break; - case EVENT_SPELL_MARK_OF_HYDROSS5: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS5, false); - break; - case EVENT_SPELL_MARK_OF_HYDROSS6: - me->CastSpell(me, SPELL_MARK_OF_HYDROSS6, false); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_HYDROSS6, 15000, GROUP_ABILITIES); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION1: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION1, false); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION2: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION2, false); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION3: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION3, false); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION4: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION4, false); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION5: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION5, false); - break; - case EVENT_SPELL_MARK_OF_CORRUPTION6: - me->CastSpell(me, SPELL_MARK_OF_CORRUPTION6, false); - events.ScheduleEvent(EVENT_SPELL_MARK_OF_CORRUPTION6, 15000, GROUP_ABILITIES); - break; - case EVENT_SPELL_WATER_TOMB: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true)) - me->CastSpell(target, SPELL_WATER_TOMB, false); - events.ScheduleEvent(EVENT_SPELL_WATER_TOMB, 7000, GROUP_ABILITIES); - break; - case EVENT_SPELL_VILE_SLUDGE: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true)) - me->CastSpell(target, SPELL_VILE_SLUDGE, false); - events.ScheduleEvent(EVENT_SPELL_VILE_SLUDGE, 15000, GROUP_ABILITIES); - break; - } + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + summon->CastSpell(summon, SPELL_ELEMENTAL_SPAWNIN, true); + summon->SetInCombatWithZone(); - DoMeleeAttackIfReady(); + if (summon->GetEntry() == NPC_PURE_SPAWN_OF_HYDROSS) + { + summon->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); } - }; + else + { + summon->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + } + } + + void SummonedCreatureDespawn(Creature* summon) override + { + summons.Despawn(summon); + } + + void JustDied(Unit* killer) override + { + Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH); + BossAI::JustDied(killer); + } +private: + bool _recentlySpoken; }; class spell_hydross_cleansing_field_aura : public SpellScriptLoader @@ -377,7 +343,7 @@ class spell_hydross_mark_of_hydross : public SpellScriptLoader void AddSC_boss_hydross_the_unstable() { - new boss_hydross_the_unstable(); + RegisterSerpentShrineAI(boss_hydross_the_unstable); new spell_hydross_cleansing_field_aura(); new spell_hydross_cleansing_field_command(); new spell_hydross_mark_of_hydross(); From a22a04908a4902e59cc71eeac29024d32bd4666e Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 17 Sep 2023 07:47:19 -0300 Subject: [PATCH 015/340] fix(DB/Creature): The Big Bad Wolf should be Taunt immune (#17255) Create rev_1694739263824086500.sql --- data/sql/updates/pending_db_world/rev_1694739263824086500.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694739263824086500.sql diff --git a/data/sql/updates/pending_db_world/rev_1694739263824086500.sql b/data/sql/updates/pending_db_world/rev_1694739263824086500.sql new file mode 100644 index 00000000000000..f78907e466b6e7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694739263824086500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 17521); From fac6ddbcfbcf119ce18411d94df604fa46475630 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 10:48:34 +0000 Subject: [PATCH 016/340] chore(DB): import pending files Referenced commit(s): a22a04908a4902e59cc71eeac29024d32bd4666e --- .../rev_1694739263824086500.sql => db_world/2023_09_17_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1694739263824086500.sql => db_world/2023_09_17_04.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1694739263824086500.sql b/data/sql/updates/db_world/2023_09_17_04.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1694739263824086500.sql rename to data/sql/updates/db_world/2023_09_17_04.sql index f78907e466b6e7..f117ffd69674f0 100644 --- a/data/sql/updates/pending_db_world/rev_1694739263824086500.sql +++ b/data/sql/updates/db_world/2023_09_17_04.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_17_03 -> 2023_09_17_04 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 17521); From d15d72c812dcb638cb7ef1cf6cf86f8f9422c255 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:50:43 +0200 Subject: [PATCH 017/340] fix(Scripts/BlackwingLair): Orb of Domination can no longer be used when you are controlling a pet (#16880) initial --- .../BlackrockMountain/BlackwingLair/boss_razorgore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index dc3a49443c3104..c61e28444e3645 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -290,7 +290,7 @@ class go_orb_of_domination : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) override { if (InstanceScript* instance = go->GetInstanceScript()) - if (instance->GetData(DATA_EGG_EVENT) != DONE && !player->HasAura(SPELL_MIND_EXHAUSTION)) + if (instance->GetData(DATA_EGG_EVENT) != DONE && !player->HasAura(SPELL_MIND_EXHAUSTION) && !player->GetPet()) if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_RAZORGORE_THE_UNTAMED))) { razor->AI()->SetGUID(player->GetGUID()); From a7d2f2effae62483c8ddcdd6038da23d024d371a Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 17 Sep 2023 09:24:07 -0300 Subject: [PATCH 018/340] fix(DB/Creature): Ravenous Flayer Matriarch (#17256) Create rev_1694740225097878900.sql --- .../rev_1694740225097878900.sql | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694740225097878900.sql diff --git a/data/sql/updates/pending_db_world/rev_1694740225097878900.sql b/data/sql/updates/pending_db_world/rev_1694740225097878900.sql new file mode 100644 index 00000000000000..d1ffde77c9c912 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694740225097878900.sql @@ -0,0 +1,55 @@ +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21205); +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`, `event_param6`, `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 +(21205, 0, 0, 0, 0, 0, 100, 0, 0, 5000, 20000, 35000, 0, 0, 11, 38363, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - In Combat - Cast \'Gushing Wound\''), +(21205, 0, 1, 0, 0, 0, 100, 0, 0, 3000, 15000, 30000, 0, 0, 11, 36464, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - In Combat - Cast \'The Den Mother`s Mark\''), +(21205, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 2120500, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - On Respawn - Start Patrol Path 2120500'), +(21205, 0, 3, 0, 1, 0, 100, 0, 60000, 180000, 60000, 180000, 0, 0, 80, 2120500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Out of Combat - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2120500); +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`, `event_param6`, `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 +(2120500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 54, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Pause Waypoint'), +(2120500, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 36691, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Cast \'Serverside - Lay Ravenous Flayer Egg\''), +(2120500, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Start Random Movement'), +(2120500, 9, 3, 0, 0, 0, 100, 0, 20000, 30000, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Resume Waypoint'); + +DELETE FROM `creature` WHERE `id1` = 21205 AND `guid` = 85392; +INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(85392, 21205, 530, 3520, 3520, -2730.536376953125, 1150.532958984375, 63.02117919921875, 3.796946525573730468, 300, 48069, 2, 'Scripted Pathing'); + +DELETE FROM `creature_addon` WHERE `guid` = 85392; +DELETE FROM `waypoint_data` WHERE `id` = 853920; + +DELETE FROM `waypoints` WHERE `entry` = 2120500; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(2120500, 1 , -2746.24, 1138.448, 54.15343, 'Ravenous Flayer Matriarch'), +(2120500, 2 , -2762.292, 1128.408, 46.53087, 'Ravenous Flayer Matriarch'), +(2120500, 3 , -2729.597, 1104.097, 49.9248, 'Ravenous Flayer Matriarch'), +(2120500, 4 , -2727.395, 1087.502, 48.17071, 'Ravenous Flayer Matriarch'), +(2120500, 5 , -2728.122, 1075.56, 45.84283, 'Ravenous Flayer Matriarch'), +(2120500, 6 , -2710.212, 1072.808, 47.86968, 'Ravenous Flayer Matriarch'), +(2120500, 7 , -2692.166, 1095.084, 51.25895, 'Ravenous Flayer Matriarch'), +(2120500, 8 , -2676.87, 1087.67, 48.08696, 'Ravenous Flayer Matriarch'), +(2120500, 9 , -2651.984, 1074.549, 49.94732, 'Ravenous Flayer Matriarch'), +(2120500, 10, -2634.343, 1060.091, 50.21058, 'Ravenous Flayer Matriarch'), +(2120500, 11, -2619.968, 1053.699, 37.64632, 'Ravenous Flayer Matriarch'), +(2120500, 12, -2598.035, 1047.925, 43.43085, 'Ravenous Flayer Matriarch'), +(2120500, 13, -2571.256, 1035.177, 43.26862, 'Ravenous Flayer Matriarch'), +(2120500, 14, -2563.9033, 1032.3075, 37.875877, 'Ravenous Flayer Matriarch - Decomposed'), +(2120500, 15, -2561.1533, 1031.0575, 33.125877, 'Ravenous Flayer Matriarch - Decomposed'), +(2120500, 16, -2552.076, 1026.859, 37.60755, 'Ravenous Flayer Matriarch'), +(2120500, 17, -2521.413, 1022.475, 42.70882, 'Ravenous Flayer Matriarch'), +(2120500, 18, -2516.2585, 1031.3173, 39.342514, 'Ravenous Flayer Matriarch - Decomposed'), +(2120500, 19, -2508.908, 1042.702, 49.50398, 'Ravenous Flayer Matriarch'), +(2120500, 20, -2502.511, 1057.798, 53.36262, 'Ravenous Flayer Matriarch'), +(2120500, 21, -2518.216, 1084.736, 63.13983, 'Ravenous Flayer Matriarch'), +(2120500, 22, -2519.813, 1103.396, 66.57159, 'Ravenous Flayer Matriarch'), +(2120500, 23, -2526.526, 1123.956, 72.65863, 'Ravenous Flayer Matriarch'), +(2120500, 24, -2555.379, 1145.952, 76.91769, 'Ravenous Flayer Matriarch'), +(2120500, 25, -2574.61, 1140.253, 74.28946, 'Ravenous Flayer Matriarch'), +(2120500, 26, -2581.985, 1117.115, 68.20245, 'Ravenous Flayer Matriarch'), +(2120500, 27, -2606.013, 1116.443, 66.19119, 'Ravenous Flayer Matriarch'), +(2120500, 28, -2631.04, 1119.793, 64.49197, 'Ravenous Flayer Matriarch'), +(2120500, 29, -2661.714, 1119.632, 64.44809, 'Ravenous Flayer Matriarch'), +(2120500, 30, -2698.282, 1122.563, 58.28287, 'Ravenous Flayer Matriarch'), +(2120500, 31, -2731.417, 1141.435, 59.53944, 'Ravenous Flayer Matriarch'); From 09eaea6c6a21292066b44eb95f20f9d76fbc263a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 12:25:16 +0000 Subject: [PATCH 019/340] chore(DB): import pending files Referenced commit(s): a7d2f2effae62483c8ddcdd6038da23d024d371a --- .../rev_1694740225097878900.sql => db_world/2023_09_17_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1694740225097878900.sql => db_world/2023_09_17_05.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1694740225097878900.sql b/data/sql/updates/db_world/2023_09_17_05.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1694740225097878900.sql rename to data/sql/updates/db_world/2023_09_17_05.sql index d1ffde77c9c912..03a9400582b6e5 100644 --- a/data/sql/updates/pending_db_world/rev_1694740225097878900.sql +++ b/data/sql/updates/db_world/2023_09_17_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_04 -> 2023_09_17_05 -- DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21205); 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`, `event_param6`, `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 From 45d6009cb7189706afe58812155b3d7bd60174dd Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 14:42:07 +0200 Subject: [PATCH 020/340] fix(Scripts/Darkshore): ensure Kerlonian Evershade is always in bear form (#17062) initial --- .../updates/pending_db_world/remove-aura-from-kerlonian.sql | 2 ++ src/server/scripts/Kalimdor/zone_darkshore.cpp | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql diff --git a/data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql b/data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql new file mode 100644 index 00000000000000..0c8153a67ee284 --- /dev/null +++ b/data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_addon` SET `auras` = '' WHERE `guid` = 39059; diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index 768eb3b5164045..3e048e3c99a614 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -175,6 +175,7 @@ enum Kerlonian SPELL_SLEEP_VISUAL = 25148, SPELL_AWAKEN = 17536, + SPELL_BEAR_FORM = 18309, QUEST_SLEEPER_AWAKENED = 5321, NPC_LILADRIS = 11219 //attackers entries unknown }; @@ -194,6 +195,8 @@ class npc_kerlonian : public CreatureScript void Reset() override { FallAsleepTimer = urand(10000, 45000); + + DoCastSelf(SPELL_BEAR_FORM); } void MoveInLineOfSight(Unit* who) override From f2ba787dfa56dd63e013f05a913678e957b054e1 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 12:43:13 +0000 Subject: [PATCH 021/340] chore(DB): import pending files Referenced commit(s): 45d6009cb7189706afe58812155b3d7bd60174dd --- .../2023_09_17_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/remove-aura-from-kerlonian.sql => db_world/2023_09_17_06.sql} (60%) diff --git a/data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql b/data/sql/updates/db_world/2023_09_17_06.sql similarity index 60% rename from data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql rename to data/sql/updates/db_world/2023_09_17_06.sql index 0c8153a67ee284..31eec4635d14ad 100644 --- a/data/sql/updates/pending_db_world/remove-aura-from-kerlonian.sql +++ b/data/sql/updates/db_world/2023_09_17_06.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_17_05 -> 2023_09_17_06 -- UPDATE `creature_addon` SET `auras` = '' WHERE `guid` = 39059; From 4b21f01b91ad7ee4edd3a09a59366b5f73287e94 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:14:28 +0200 Subject: [PATCH 022/340] fix(Core/TaskScheduler): warning (#17275) --- src/common/Utilities/TaskScheduler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h index c8b7b584d05e0a..56cdaf17f954fd 100644 --- a/src/common/Utilities/TaskScheduler.h +++ b/src/common/Utilities/TaskScheduler.h @@ -432,11 +432,11 @@ class TaskContext : _task(right._task), _owner(right._owner), _consumed(right._consumed) { } // Move construct - TaskContext(TaskContext&& right) + TaskContext(TaskContext&& right) noexcept : _task(std::move(right._task)), _owner(std::move(right._owner)), _consumed(std::move(right._consumed)) { } // Copy assign - TaskContext& operator= (TaskContext const& right) + TaskContext& operator= (TaskContext const& right) noexcept { _task = right._task; _owner = right._owner; @@ -445,7 +445,7 @@ class TaskContext } // Move assign - TaskContext& operator= (TaskContext&& right) + TaskContext& operator= (TaskContext&& right) noexcept { _task = std::move(right._task); _owner = std::move(right._owner); From 71de2e5c263e16905f548427c1c8e899bb6c09a3 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 17 Sep 2023 10:18:13 -0300 Subject: [PATCH 023/340] =?UTF-8?q?fix(Core/GameObject):=20Also=20send=20E?= =?UTF-8?q?ventInform()=20calls=20for=20GAMEOBJECT=5FTY=E2=80=A6=20(#17283?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/GameObject): Also send EventInform() calls for GAMEOBJECT_TYPE_CAMERA - This allows object and zone AI to process events called by camera objects as well (previously only possible through event_scripts) (cherry-picked from commit https://github.com/TrinityCore/TrinityCore/commit/6904073c9cf2d6d1291bf976b8efff55edae74bc) --- src/server/game/Entities/GameObject/GameObject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 1365834de96b75..ef2723897b6855 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1724,7 +1724,10 @@ void GameObject::Use(Unit* user) player->SendCinematicStart(info->camera.cinematicId); if (info->camera.eventID) + { GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this); + EventInform(info->camera.eventID); + } return; } From f1111be15287176e57126231fe60d6ec5030fbfd Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:19:09 +0200 Subject: [PATCH 024/340] chore(misc): cleanup (#17274) --- src/cmake/macros/FindOpenSSL.cmake | 2 +- src/common/Collision/Maps/MapDefines.h | 16 ++++++++++++++-- src/common/GitRevision.cpp | 18 +++++++++++++++--- src/common/GitRevision.h | 18 +++++++++++++++--- src/common/Utilities/EnumFlag.h | 16 ++++++++++++++-- src/common/Utilities/TaskScheduler.cpp | 16 ++++++++++++++-- src/common/Utilities/TaskScheduler.h | 16 ++++++++++++++-- .../game/Battlegrounds/BattlegroundScore.h | 2 +- src/server/game/Miscellaneous/Language.h | 2 +- src/server/game/Movement/Spline/MoveSpline.h | 6 +++--- .../game/Movement/Spline/MoveSplineFlag.h | 6 +++--- .../game/Movement/Spline/MoveSplineInit.h | 6 +++--- .../game/Movement/Spline/MoveSplineInitArgs.h | 6 +++--- .../Movement/Spline/MovementPacketBuilder.h | 6 +++--- .../game/Movement/Spline/MovementTypedefs.h | 6 +++--- src/server/game/Movement/Spline/Spline.h | 6 +++--- .../scripts/Kalimdor/ZulFarrak/zulfarrak.cpp | 17 ++++++++++++++--- .../underbog/instance_the_underbog.cpp | 8 ++++---- 18 files changed, 128 insertions(+), 45 deletions(-) diff --git a/src/cmake/macros/FindOpenSSL.cmake b/src/cmake/macros/FindOpenSSL.cmake index f40a591f9a72d3..fb1651e6d421bc 100644 --- a/src/cmake/macros/FindOpenSSL.cmake +++ b/src/cmake/macros/FindOpenSSL.cmake @@ -575,7 +575,7 @@ if(OPENSSL_FOUND) include(EnsureVersion) ENSURE_VERSION("${OPENSSL_EXPECTED_VERSION}" "${OPENSSL_VERSION}" OPENSSL_VERSION_OK) if(NOT OPENSSL_VERSION_OK) - message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. TrinityCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022") + message(FATAL_ERROR "AzerothCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. AzerothCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022") endif() if(NOT TARGET OpenSSL::Crypto AND diff --git a/src/common/Collision/Maps/MapDefines.h b/src/common/Collision/Maps/MapDefines.h index 94f926c8c184b2..6772a20c7021ec 100644 --- a/src/common/Collision/Maps/MapDefines.h +++ b/src/common/Collision/Maps/MapDefines.h @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2008+ TrinityCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 _MAPDEFINES_H diff --git a/src/common/GitRevision.cpp b/src/common/GitRevision.cpp index 9510a0f0dfc03f..4bfdffe7ccc607 100644 --- a/src/common/GitRevision.cpp +++ b/src/common/GitRevision.cpp @@ -1,7 +1,19 @@ /* -* Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. -* Copyright (C) 2008-2016 TrinityCore -*/ + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "GitRevision.h" #include "revision.h" diff --git a/src/common/GitRevision.h b/src/common/GitRevision.h index ececc723ab31b4..34d0d99223126d 100644 --- a/src/common/GitRevision.h +++ b/src/common/GitRevision.h @@ -1,7 +1,19 @@ /* -* Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. -* Copyright (C) 2008-2018 TrinityCore -*/ + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 __GITREVISION_H__ #define __GITREVISION_H__ diff --git a/src/common/Utilities/EnumFlag.h b/src/common/Utilities/EnumFlag.h index b9fc9168e5f4f5..d02232cfceb972 100644 --- a/src/common/Utilities/EnumFlag.h +++ b/src/common/Utilities/EnumFlag.h @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. - * Copyright (C) 2008-2021 TrinityCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 EnumFlag_h__ diff --git a/src/common/Utilities/TaskScheduler.cpp b/src/common/Utilities/TaskScheduler.cpp index b1c1cbd418874b..1d0bf89e6e355b 100644 --- a/src/common/Utilities/TaskScheduler.cpp +++ b/src/common/Utilities/TaskScheduler.cpp @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2008+ TrinityCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "TaskScheduler.h" diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h index 56cdaf17f954fd..a256be6801e6aa 100644 --- a/src/common/Utilities/TaskScheduler.h +++ b/src/common/Utilities/TaskScheduler.h @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2008+ TrinityCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 _TASK_SCHEDULER_H_ diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h index e07c41dd750f53..4ed344b7e780f3 100644 --- a/src/server/game/Battlegrounds/BattlegroundScore.h +++ b/src/server/game/Battlegrounds/BattlegroundScore.h @@ -122,4 +122,4 @@ struct AC_GAME_API BattlegroundScore uint32 HealingDone = 0; }; -#endif // TRINITY_BATTLEGROUND_SCORE_H +#endif // _BATTLEGROUND_SCORE_H diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 824810fdaa183e..4cbadd49d56780 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1058,7 +1058,7 @@ enum AcoreStrings LANG_COMMAND_TICKETLISTRESPONSE = 2029, LANG_COMMAND_TICKETCOMPLETED = 2030, - // Trinity strings 5000-9999 + // acore strings 5000-9999 LANG_COMMAND_FREEZE = 5000, LANG_COMMAND_FREEZE_ERROR = 5001, LANG_COMMAND_FREEZE_WRONG = 5002, diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index d713ba9f31d36c..5ebe5f5aa566f4 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_MOVEPLINE_H -#define TRINITYSERVER_MOVEPLINE_H +#ifndef AC_MOVEPLINE_H +#define AC_MOVEPLINE_H #include "MoveSplineInitArgs.h" #include "Spline.h" @@ -132,4 +132,4 @@ namespace Movement } }; } -#endif // TRINITYSERVER_MOVEPLINE_H +#endif // AC_MOVEPLINE_H diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index 638a921a16b8ff..17e8128156a062 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_MOVESPLINEFLAG_H -#define TRINITYSERVER_MOVESPLINEFLAG_H +#ifndef AC_MOVESPLINEFLAG_H +#define AC_MOVESPLINEFLAG_H #include "MovementTypedefs.h" #include @@ -145,4 +145,4 @@ namespace Movement #endif } -#endif // TRINITYSERVER_MOVESPLINEFLAG_H +#endif // AC_MOVESPLINEFLAG_H diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h index 5d969e9f06d6ac..a98da344650e54 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.h +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_MOVESPLINEINIT_H -#define TRINITYSERVER_MOVESPLINEINIT_H +#ifndef AC_MOVESPLINEINIT_H +#define AC_MOVESPLINEINIT_H #include "MoveSplineInitArgs.h" #include "PathGenerator.h" @@ -209,4 +209,4 @@ namespace Movement inline void MoveSplineInit::DisableTransportPathTransformations() { args.TransformForTransport = false; } } -#endif // TRINITYSERVER_MOVESPLINEINIT_H +#endif // AC_MOVESPLINEINIT_H diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h index e0789a4f14c95f..a0d26fd54f094f 100644 --- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h +++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_MOVESPLINEINIT_ARGS_H -#define TRINITYSERVER_MOVESPLINEINIT_ARGS_H +#ifndef AC_MOVESPLINEINIT_ARGS_H +#define AC_MOVESPLINEINIT_ARGS_H #include "MoveSplineFlag.h" #include @@ -68,4 +68,4 @@ namespace Movement }; } -#endif // TRINITYSERVER_MOVESPLINEINIT_ARGS_H +#endif // AC_MOVESPLINEINIT_ARGS_H diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h index 6ec1af6a3304d8..711eccc33e888e 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.h +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_PACKET_BUILDER_H -#define TRINITYSERVER_PACKET_BUILDER_H +#ifndef AC_PACKET_BUILDER_H +#define AC_PACKET_BUILDER_H #include "Define.h" @@ -40,4 +40,4 @@ namespace Movement static void WriteCreate(const MoveSpline& mov, ByteBuffer& data); }; } -#endif // TRINITYSERVER_PACKET_BUILDER_H +#endif // AC_PACKET_BUILDER_H diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h index d0b879c05c7b2f..512bcc7dc16e56 100644 --- a/src/server/game/Movement/Spline/MovementTypedefs.h +++ b/src/server/game/Movement/Spline/MovementTypedefs.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_TYPEDEFS_H -#define TRINITYSERVER_TYPEDEFS_H +#ifndef AC_TYPEDEFS_H +#define AC_TYPEDEFS_H #include "Common.h" @@ -74,4 +74,4 @@ namespace Movement extern UInt32Counter splineIdGen; } -#endif // TRINITYSERVER_TYPEDEFS_H +#endif // AC_TYPEDEFS_H diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h index 98896d931a183f..d9d255f0a2dc4a 100644 --- a/src/server/game/Movement/Spline/Spline.h +++ b/src/server/game/Movement/Spline/Spline.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef TRINITYSERVER_SPLINE_H -#define TRINITYSERVER_SPLINE_H +#ifndef AC_SPLINE_H +#define AC_SPLINE_H #include "Errors.h" #include "MovementTypedefs.h" @@ -210,4 +210,4 @@ namespace Movement #include "SplineImpl.h" -#endif // TRINITYSERVER_SPLINE_H +#endif // AC_SPLINE_H diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 1689944cf54e64..80862401e5c6af 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -1,7 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 . */ /* ScriptData diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp index c06178bb399bb1..557afea8d512cd 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp @@ -1,14 +1,14 @@ /* - * Copyright (C) 2008-2018 TrinityCore + * This file is part of the AzerothCore 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 + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 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 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for * more details. * * You should have received a copy of the GNU General Public License along From c709e2e7d3ba426178c2eebce30f6d30da71ff7c Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:25:32 +0200 Subject: [PATCH 025/340] chore(Worldserver/Config): Clean up and reorganize config file (#17272) * chore(Worldserver/Config): Clean up and reorganize config file * Update worldserver.conf.dist * \n\n\n --- .../apps/worldserver/worldserver.conf.dist | 5724 +++++++++-------- 1 file changed, 2952 insertions(+), 2772 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 5a25dc2cd6db15..2bef3eb52bc27a 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -6,54 +6,78 @@ ################################################################################################### # SECTION INDEX # -# EXAMPLE CONFIG -# CONNECTIONS AND DIRECTORIES -# PERFORMANCE SETTINGS -# SERVER LOGGING -# SERVER SETTINGS +# SERVER SYSTEM SETTINGS +# DATABASE & CONNECTIONS +# DIRECTORIES +# CONSOLE +# AUTOUPDATER +# NETWORK +# REMOTE ACCESS # CRYPTOGRAPHY -# WARDEN SETTINGS -# PLAYER INTERACTION -# CREATURE SETTINGS -# CHAT SETTINGS -# GAME MASTER SETTINGS -# VISIBILITY AND DISTANCES -# SERVER RATES -# STATS LIMITS -# AUTO BROADCAST -# BATTLEGROUND CONFIG -# BATTLEFIELD CONFIG -# ARENA CONFIG -# NETWORK CONFIG -# CONSOLE AND REMOTE ACCESS -# CHARACTER DELETE OPTIONS -# ITEM DELETE OPTIONS -# CUSTOM SERVER OPTIONS -# UPDATE SETTINGS -# LOGGING SYSTEM SETTINGS +# PERFORMANCE +# LOGGING +# METRIC +# SERVER # PACKET SPOOF PROTECTION SETTINGS +# WARDEN +# AUTO BROADCAST +# VISIBILITY AND DISTANCES +# MAPS +# WEATHER +# TICKETS +# COMMAND +# +# GAME SETTINGS +# GAME MASTER +# CHEAT +# CHARACTER DATABASE +# CHARACTER DELETE +# CHARACTER CREATION +# CHARACTER +# SKILL +# STATS +# REPUTATION +# EXPERIENCE +# CURRENCY +# DURABILITY +# DEATH +# PET +# ITEM DELETE +# ITEM +# QUEST +# CREATURE +# VENDOR +# GROUP +# INSTANCE +# DUNGEON AND BATTLEGROUND FINDER +# CHARTER +# GUILD +# FFAPVP +# WINTERGRASP +# BATTLEGROUND +# ARENA +# MAIL +# TRANSPORT +# CHAT CHANNEL +# FACTION INTERACTION +# RECRUIT A FRIEND +# CALENDAR +# GAME EVENT +# AUCTION HOUSE +# PLAYER DUMP +# CUSTOM # DEBUG -# METRIC SETTINGS # ################################################################################################### ################################################################################################### -# EXAMPLE CONFIG -# -# Variable -# Description: Brief description what the variable is doing. -# Important: Annotation for important things about this variable. -# Example: "Example, i.e. if the value is a string" -# Default: 10 - (Enabled|Comment|Variable name in case of grouped config options) -# 0 - (Disabled|Comment|Variable name in case of grouped config options) -# -# Note to developers: -# - Copy this example to keep the formatting. -# - Line breaks should be at column 100. +# # +# SERVER SYSTEM SETTINGS BEGIN # +# # ################################################################################################### ################################################################################################### -# CONNECTIONS AND DIRECTORIES +# DATABASE & CONNECTIONS # # RealmID # Description: ID of the Realm using this config. @@ -63,33 +87,18 @@ RealmID = 1 # -# DataDir -# Description: Data directory setting. -# Important: DataDir needs to be quoted, as the string might contain space characters. -# Example: "@prefix@\home\youruser\azerothcore\data" -# Default: "." - -DataDir = "." - -# -# LogsDir -# Description: Logs directory setting. -# Important: LogsDir needs to be quoted, as the string might contain space characters. -# Logs directory must exists, or log file creation will be disabled. -# Example: "/home/youruser/azerothcore/logs" -# Default: "" - (Log files will be stored in the current path) +# WorldServerPort +# Description: TCP port to reach the world server. +# Default: 8085 -LogsDir = "" +WorldServerPort = 8085 # -# TempDir -# Description: Temp directory setting. -# Important: TempDir needs to be quoted, as the string might contain space characters. -# TempDir directory must exists, or the server can't work properly -# Example: "/home/youruser/azerothcore/temp" -# Default: "" - (Temp files will be stored in the current path) +# BindIP +# Description: Bind world server to IP/hostname +# Default: "0.0.0.0" - (Bind to all IPs on the system) -TempDir = "" +BindIP = "0.0.0.0" # # LoginDatabaseInfo @@ -110,18 +119,6 @@ LoginDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_auth" WorldDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_world" CharacterDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_characters" -# -# Database.Reconnect.Seconds -# Database.Reconnect.Attempts -# -# Description: How many seconds between every reconnection attempt -# and how many attempts will be performed in total -# Default: 20 attempts every 15 seconds -# - -Database.Reconnect.Seconds = 15 -Database.Reconnect.Attempts = 20 - # # LoginDatabase.WorkerThreads # WorldDatabase.WorkerThreads @@ -158,18 +155,50 @@ CharacterDatabase.SynchThreads = 2 MaxPingTime = 30 # -# WorldServerPort -# Description: TCP port to reach the world server. -# Default: 8085 +# Database.Reconnect.Seconds +# Database.Reconnect.Attempts +# +# Description: How many seconds between every reconnection attempt +# and how many attempts will be performed in total +# Default: 20 attempts every 15 seconds +# -WorldServerPort = 8085 +Database.Reconnect.Seconds = 15 +Database.Reconnect.Attempts = 20 # -# BindIP -# Description: Bind world server to IP/hostname -# Default: "0.0.0.0" - (Bind to all IPs on the system) +################################################################################################### -BindIP = "0.0.0.0" +################################################################################################### +# DIRECTORIES +# +# DataDir +# Description: Data directory setting. +# Important: DataDir needs to be quoted, as the string might contain space characters. +# Example: "@prefix@\home\youruser\azerothcore\data" +# Default: "." + +DataDir = "." + +# +# LogsDir +# Description: Logs directory setting. +# Important: LogsDir needs to be quoted, as the string might contain space characters. +# Logs directory must exists, or log file creation will be disabled. +# Example: "/home/youruser/azerothcore/logs" +# Default: "" - (Log files will be stored in the current path) + +LogsDir = "" + +# +# TempDir +# Description: Temp directory setting. +# Important: TempDir needs to be quoted, as the string might contain space characters. +# TempDir directory must exists, or the server can't work properly +# Example: "/home/youruser/azerothcore/temp" +# Default: "" - (Temp files will be stored in the current path) + +TempDir = "" # # CMakeCommand @@ -194,7 +223,7 @@ BuildDirectory = "" # SourceDirectory # Description: The path to your AzerothCore source directory. # If the path is left empty, the built-in CMAKE_SOURCE_DIR is used. -# Example: "../AzerothCore" +# Example: "../azerothcore-wotlk" # Default: "" SourceDirectory = "" @@ -211,248 +240,280 @@ SourceDirectory = "" MySQLExecutable = "" # -# ThreadPool -# Description: Number of threads to be used for the global thread pool -# The thread pool is currently used for: -# - Signal handling -# - Remote access -# - Database keep-alive ping -# - Core freeze check -# - World socket networking -# Default: 2 +# PidFile +# Description: World daemon PID file. +# Example: "./world.pid" - (Enabled) +# Default: "" - (Disabled) -ThreadPool = 2 +PidFile = "" # -# IPLocationFile -# Description: The path to your IP2Location database CSV file. -# Example: "C:/acore/IP2LOCATION-LITE-DB1.CSV" -# "/home/acore/IP2LOCATION-LITE-DB1.CSV" -# Default: "" - (Disabled) +################################################################################################### + +################################################################################################### +# CONSOLE # +# Console.Enable +# Description: Enable console. +# Default: 1 - (Enabled) +# 0 - (Disabled) -IPLocationFile = "" +Console.Enable = 1 # -# AllowLoggingIPAddressesInDatabase -# Description: Specifies if IP addresses can be logged to the database +# BeepAtStart +# Description: Beep when the world server finished starting (Unix/Linux systems). # Default: 1 - (Enabled) # 0 - (Disabled) + +BeepAtStart = 1 + # +# FlashAtStart +# Description: Flashes in taskbar when the world server finished starting. (Works on Windows only) +# Default: 1 - (Enabled) +# 0 - (Disabled) -AllowLoggingIPAddressesInDatabase = 1 +FlashAtStart = 1 # ################################################################################################### ################################################################################################### -# PERFORMANCE SETTINGS +# AUTOUPDATER # -# UseProcessors -# Description: Processors mask for Windows and Linux based multi-processor systems. -# Example: For a computer with 3 CPUs: -# 1 - 1st CPU only -# 2 - 2nd CPU only -# 4 - 3rd CPU only -# 6 - 2nd + 3rd CPUs, because "2 | 4" -> 6 -# Default: 0 - (Selected by OS) -# 1+ - (Bit mask value of selected processors) - -UseProcessors = 0 - +# Updates.EnableDatabases +# Description: A mask that describes which databases should be updated. # -# ProcessPriority -# Description: Process priority setting for Windows based systems. -# Default: 1 - (High) -# 0 - (Normal) +# Following flags are available +# DATABASE_LOGIN = 1, // Auth database +# DATABASE_CHARACTER = 2, // Character database +# DATABASE_WORLD = 4, // World database +# +# Default: 7 - (All enabled) +# 4 - (Enable world only) +# 0 - (All disabled) -ProcessPriority = 1 +Updates.EnableDatabases = 7 # -# Compression -# Description: Compression level for client update packages -# Range: 1-9 -# Default: 1 - (Speed) -# 9 - (Best compression) +# Updates.AutoSetup +# Description: Auto populate empty databases. +# Default: 1 - (Enabled) +# 0 - (Disabled) -Compression = 1 +Updates.AutoSetup = 1 # -# PlayerLimit -# Description: Maximum number of players in the world. Excluding Mods, GMs and Admins. -# Important: If you want to block players and only allow Mods, GMs or Admins to join the -# server, use the DB field "auth.realmlist.allowedSecurityLevel". -# Default: 1000 - (Enabled) -# 1+ - (Enabled) -# 0 - (Disabled, No limit) +# Updates.Redundancy +# Description: Perform data redundancy checks through hashing +# to detect changes on sql updates and reapply it. +# Default: 1 - (Enabled) +# 0 - (Disabled) -PlayerLimit = 1000 +Updates.Redundancy = 1 # -# SaveRespawnTimeImmediately -# Description: Save respawn time for creatures at death and gameobjects at use/open. -# Default: 1 - (Enabled, Save respawn time immediately) -# 0 - (Disabled, Save respawn time at grid unloading) +# Updates.ArchivedRedundancy +# Description: Check hashes of archived updates (slows down startup). +# Default: 0 - (Disabled) +# 1 - (Enabled) -SaveRespawnTimeImmediately = 1 +Updates.ArchivedRedundancy = 0 # -# MaxOverspeedPings -# Description: Maximum overspeed ping count before character is disconnected. -# Default: 2 - (Enabled, Minimum value) -# 3+ - (Enabled, More checks before kick) -# 0 - (Disabled) +# Updates.AllowRehash +# Description: Inserts the current file hash in the database if it is left empty. +# Useful if you want to mark a file as applied but you don't know its hash. +# Default: 1 - (Enabled) +# 0 - (Disabled) -MaxOverspeedPings = 2 +Updates.AllowRehash = 1 # -# CloseIdleConnections -# Description: Automatically close idle connections. -# SocketTimeOutTime and SocketTimeOutTimeActive determine when a connection is considered as idle. -# Default: 1 - (enable, Automatically close idle connections) -# 0 - (disable, Do not close idle connections) +# Updates.CleanDeadRefMaxCount +# Description: Cleans dead/ orphaned references that occur if an update was removed or renamed and edited in one step. +# It only starts the clean up if the count of the missing updates is below or equal the Updates.CleanDeadRefMaxCount value. +# This way prevents erasing of the update history due to wrong source directory state (maybe wrong branch or bad revision). +# Disable this if you want to know if the database is in a possible "dirty state". +# Default: 3 - (Enabled) +# 0 - (Disabled) +# -1 - (Enabled - unlimited) -CloseIdleConnections = 1 +Updates.CleanDeadRefMaxCount = 3 # -# SocketTimeOutTime -# Description: Time (in milliseconds) after which a connection being idle on the character -# selection screen is disconnected. -# Default: 900000 - (15 minutes) - -SocketTimeOutTime = 900000 +################################################################################################### +################################################################################################### +# NETWORK # -# SocketTimeOutTimeActive -# Description: Time (in milliseconds) after which an idle connection is dropped while -# logged into the world. -# The client sends keepalive packets every 30 seconds. Values <= 30s are not recommended. -# Default: 60000 - (1 minute) +# Network.Threads +# Description: Number of threads for network. +# Default: 1 - (Recommended 1 thread per 1000 connections) -SocketTimeOutTimeActive = 60000 +Network.Threads = 1 # -# SessionAddDelay -# Description: Time (in microseconds) that a network thread will sleep after authentication -# protocol handling before adding a connection to the world session map. -# Default: 10000 - (10 milliseconds, 0.01 second) +# Network.OutKBuff +# Description: Amount of memory (in bytes) used for the output kernel buffer (see SO_SNDBUF +# socket option, TCP manual). +# Default: -1 - (Use system default setting) -SessionAddDelay = 10000 +Network.OutKBuff = -1 # -# MinWorldUpdateTime -# Description: Minimum time (milliseconds) between world update ticks (for mostly idle servers). -# Default: 1 - (0.001 second) +# Network.OutUBuff +# Description: Amount of memory (in bytes) reserved in the user space per connection for +# output buffering. +# Default: 65536 -MinWorldUpdateTime = 1 +Network.OutUBuff = 65536 # -# MapUpdateInterval -# Description: Time (milliseconds) for map update interval. -# Default: 10 - (0.01 second) +# Network.TcpNoDelay: +# Description: TCP Nagle algorithm setting. +# Default: 0 - (Enabled, Less traffic, More latency) +# 1 - (Disabled, More traffic, Less latency, TCP_NO_DELAY) -MapUpdateInterval = 10 +Network.TcpNodelay = 1 # -# ChangeWeatherInterval -# Description: Time (in milliseconds) for weather update interval. -# Default: 600000 - (10 min) +################################################################################################### -ChangeWeatherInterval = 600000 +################################################################################################### +# REMOTE ACCESS +# +# Ra.Enable +# Description: Enable remote console (telnet). +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Ra.Enable = 0 # -# PlayerSaveInterval -# Description: Time (in milliseconds) for player save interval. -# Default: 900000 - (15 min) +# Ra.IP +# Description: Bind remote access to IP/hostname. +# Default: "0.0.0.0" - (Bind to all IPs on the system) -PlayerSaveInterval = 900000 +Ra.IP = "0.0.0.0" # -# PlayerSave.Stats.MinLevel -# Description: Minimum level for saving character stats in the database for external usage. -# Default: 0 - (Disabled, Do not save character stats) -# 1+ - (Enabled, Level beyond which character stats are saved) +# Ra.Port +# Description: TCP port to reach the remote console. +# Default: 3443 -PlayerSave.Stats.MinLevel = 0 +Ra.Port = 3443 # -# PlayerSave.Stats.SaveOnlyOnLogout -# Description: Save player stats only on logout. -# Default: 1 - (Enabled, Only save on logout) -# 0 - (Disabled, Save on every player save) +# Ra.MinLevel +# Description: Required security level to use the remote console. +# Default: 3 -PlayerSave.Stats.SaveOnlyOnLogout = 1 +Ra.MinLevel = 3 # -# vmap.enableLOS -# vmap.enableHeight -# Description: VMmap support for line of sight and height calculation. -# Default: 1 - (Enabled, vmap.enableLOS) -# 1 - (Enabled, vmap.enableHeight) -# 0 - (Disabled) +# SOAP.Enable +# Description: Enable soap service +# Default: 0 - (Disabled) +# 1 - (Enabled) -vmap.enableLOS = 1 -vmap.enableHeight = 1 +SOAP.Enabled = 0 # -# vmap.petLOS -# Description: Check line of sight for pets, to avoid them attacking through walls. -# Default: 1 - (Enabled, each pet attack will be checked for line of sight) -# 0 - (Disabled, somewhat less CPU usage) +# SOAP.IP +# Description: Bind SOAP service to IP/hostname +# Default: "127.0.0.1" - (Bind to localhost) -vmap.petLOS = 1 +SOAP.IP = "127.0.0.1" -# vmap.BlizzlikePvPLOS -# Description: Check line of sight for battleground and arena gameobjects and other doodads (such as WSG treestumps). -# Default: 1 - (Enabled, players will be able to fire spells through treestumps and other objects). -# 0 - (Disabled, players will NOT be able to fire spells through treestumps and other objects). +# +# SOAP.Port +# Description: TCP port to reach the SOAP service. +# Default: 7878 -vmap.BlizzlikePvPLOS = 1 +SOAP.Port = 7878 # -# vmap.enableIndoorCheck -# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.). -# Default: 1 - (Enabled) -# 0 - (Disabled, somewhat less CPU usage) +################################################################################################### -vmap.enableIndoorCheck = 1 +################################################################################################### +# CRYPTOGRAPHY +# +# TOTPMasterSecret +# Description: The key used by authserver to decrypt TOTP secrets from database storage. +# You only need to set this here if you plan to use the in-game 2FA +# management commands (.account 2fa), otherwise this can be left blank. +# +# The server will auto-detect if this does not match your authserver setting, +# in which case any commands reliant on the secret will be disabled. +# +# Default: +# + +TOTPMasterSecret = # -# DetectPosCollision -# Description: Check final move position, summon position, etc for visible collision with -# other objects or walls (walls only if vmaps are enabled). -# Default: 1 - (Enabled) -# 0 - (Disabled, Less position precision but less CPU usage) +################################################################################################### -DetectPosCollision = 1 +################################################################################################### +# PERFORMANCE +# +# ThreadPool +# Description: Number of threads to be used for the global thread pool +# The thread pool is currently used for: +# - Signal handling +# - Remote access +# - Database keep-alive ping +# - Core freeze check +# - World socket networking +# Default: 2 + +ThreadPool = 2 # -# CheckGameObjectLoS -# Description: Include dynamic game objects (doors, chests etc.) in line of sight checks. -# This increases CPU usage somewhat. -# Default: 1 - (Enabled) -# 0 - (Disabled, may break some boss encounters) +# UseProcessors +# Description: Processors mask for Windows and Linux based multi-processor systems. +# Example: For a computer with 3 CPUs: +# 1 - 1st CPU only +# 2 - 2nd CPU only +# 4 - 3rd CPU only +# 6 - 2nd + 3rd CPUs, because "2 | 4" -> 6 +# Default: 0 - (Selected by OS) +# 1+ - (Bit mask value of selected processors) -CheckGameObjectLoS = 1 +UseProcessors = 0 # -# TargetPosRecalculateRange -# Description: Max distance from movement target point (+moving unit size) and targeted -# object (+size) after that new target movement point calculated. -# Range: 0.5-5.0 -# Default: 1.5 -# 0.5 - (Minimum, Contact Range, More sensitive reaction to target movement) -# 5.0 - (Maximum, Melee attack range, Less CPU usage) +# ProcessPriority +# Description: Process priority setting for Windows based systems. +# Default: 1 - (High) +# 0 - (Normal) -TargetPosRecalculateRange = 1.5 +ProcessPriority = 1 # -# UpdateUptimeInterval -# Description: Update realm uptime period (in minutes). -# Default: 10 - (10 minutes) -# 1+ +# Compression +# Description: Compression level for client update packages +# Range: 1-9 +# Default: 1 - (Speed) +# 9 - (Best compression) -UpdateUptimeInterval = 1 +Compression = 1 + +# +################################################################################################### + +################################################################################################### +# LOGGING +# +# PacketLogFile +# Description: Binary packet logging file for the world server. +# Filename extension must be .pkt to be parsable with WowPacketParser. +# Example: "World.pkt" - (Enabled) +# Default: "" - (Disabled) + +PacketLogFile = "" # # LogDB.Opt.ClearInterval @@ -472,1881 +533,1777 @@ LogDB.Opt.ClearInterval = 10 LogDB.Opt.ClearTime = 1209600 # -# MaxCoreStuckTime -# Description: Time (in seconds) before the server is forced to crash if it is frozen. -# FreezeDetector -# Default: 0 - (Disabled) -# 10+ - (Enabled, Recommended 30+) -# Note: If enabled and the setting is too low, it can cause unexpected crash. +# RecordUpdateTimeDiffInterval +# Description: Time (in milliseconds) update time diff is written to the log file. +# Update diff can be used as a performance indicator. Diff < 300: good +# performance. Diff > 600 bad performance, may be caused by high CPU usage. +# Default: 300000 - (Enabled, 5 minutes) +# 0 - (Disabled) -MaxCoreStuckTime = 0 +RecordUpdateTimeDiffInterval = 300000 # -# AddonChannel -# Description: Configure the use of the addon channel through the server (some client side -# addons will not work correctly with disabled addon channel) -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MinRecordUpdateTimeDiff +# Description: Only record update time diff which is greater than this value. +# Default: 100 -AddonChannel = 1 +MinRecordUpdateTimeDiff = 100 # -# MapUpdate.Threads -# Description: Number of threads to update maps. -# Default: 1 - -MapUpdate.Threads = 1 - +# IPLocationFile +# Description: The path to your IP2Location database CSV file. +# Example: "C:/acore/IP2LOCATION-LITE-DB1.CSV" +# "/home/acore/IP2LOCATION-LITE-DB1.CSV" +# Default: "" - (Disabled) # -# CleanCharacterDB -# Description: Clean out deprecated achievements, skills, spells and talents from the db. -# Default: 0 - (Disabled) -# 1 - (Enable) -CleanCharacterDB = 0 +IPLocationFile = "" # -# PersistentCharacterCleanFlags -# Description: Determines the character clean flags that remain set after cleanups. -# This is a bitmask value, you can use one of the following values: -# -# CLEANING_FLAG_ACHIEVEMENT_PROGRESS = 0x1 -# CLEANING_FLAG_SKILLS = 0x2 -# CLEANING_FLAG_SPELLS = 0x4 -# CLEANING_FLAG_TALENTS = 0x8 -# CLEANING_FLAG_QUESTSTATUS = 0x10 -# -# Before use this feature, make a backup of your database. +# AllowLoggingIPAddressesInDatabase +# Description: Specifies if IP addresses can be logged to the database +# Default: 1 - (Enabled) +# 0 - (Disabled) # -# Example: 14 - (CLEANING_FLAG_SKILLS + CLEANING_FLAG_SPELLS + CLEANING_FLAG_TALENTS -# 2+4+8 => 14. This will clean up skills, talents and spells will -# remain enabled after the next cleanup) -# Default: 0 - (All cleanup methods will be disabled after the next cleanup) -PersistentCharacterCleanFlags = 0 +AllowLoggingIPAddressesInDatabase = 1 # -# PreloadAllNonInstancedMapGrids -# Description: Preload all grids on all non-instanced maps. This will take a great amount -# of additional RAM (ca. 9 GB) and causes the server to take longer to start, -# but can increase performance if used on a server with a high amount of players. -# It will also activate all creatures which are set active (e.g. the Fel Reavers -# in Hellfire Peninsula) on server start. +# Allow.IP.Based.Action.Logging +# Description: Logs actions, e.g. account login and logout to name a few, based on IP of current session. # Default: 0 - (Disabled) # 1 - (Enabled) +# -PreloadAllNonInstancedMapGrids = 0 +Allow.IP.Based.Action.Logging = 0 # -# SetAllCreaturesWithWaypointMovementActive -# Description: Set all creatures with waypoint movement active. This means that they will start -# movement once they are loaded (which happens on grid load) and keep moving even -# when no player is near. This will increase CPU usage significantly and can be -# used with enabled "PreloadAllNonInstancedMapGrids" to start waypoint movement on -# server startup. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -SetAllCreaturesWithWaypointMovementActive = 0 - -# -################################################################################################### - -################################################################################################### -# SERVER LOGGING -# -# PidFile -# Description: World daemon PID file. -# Example: "./world.pid" - (Enabled) -# Default: "" - (Disabled) - -PidFile = "" - +# Appender config values: Given an appender "name" +# Appender.name +# Description: Defines 'where to log'. +# Format: Type,LogLevel,Flags,optional1,optional2,optional3 # -# PacketLogFile -# Description: Binary packet logging file for the world server. -# Filename extension must be .pkt to be parsable with WowPacketParser. -# Example: "World.pkt" - (Enabled) -# Default: "" - (Disabled) - -PacketLogFile = "" - -# Extended Logging system configuration moved to end of file (on purpose) +# Type +# 0 - (None) +# 1 - (Console) +# 2 - (File) +# 3 - (DB) # -################################################################################################### - -################################################################################################### -# SERVER SETTINGS +# LogLevel +# 0 - (Disabled) +# 1 - (Fatal) +# 2 - (Error) +# 3 - (Warning) +# 4 - (Info) +# 5 - (Debug) +# 6 - (Trace) # -# GameType -# Description: Server realm type. -# Default: 0 - (NORMAL) -# 1 - (PVP) -# 4 - (NORMAL) -# 6 - (RP) -# 8 - (RPPVP) -# 16 - (FFA_PVP, Free for all PvP mode like arena PvP in all zones except rest -# activated places and sanctuaries) - -GameType = 0 - +# Flags: +# 0 - None +# 1 - Prefix Timestamp to the text +# 2 - Prefix Log Level to the text +# 4 - Prefix Log Filter type to the text +# 8 - Append timestamp to the log file name. Format: YYYY-MM-DD_HH-MM-SS +# (Only used with Type = 2) +# 16 - Make a backup of existing file before overwrite +# (Only used with Mode = w) # -# RealmZone -# Description: Server realm zone. Set allowed alphabet in character, etc. names. -# Default 1 - (Development - any language) -# 2 - (United States - extended-Latin) -# 3 - (Oceanic - extended-Latin) -# 4 - (Latin America - extended-Latin) -# 5 - (Tournament - basic-Latin at create, any at login) -# 6 - (Korea - East-Asian) -# 7 - (Tournament - basic-Latin at create, any at login) -# 8 - (English - extended-Latin) -# 9 - (German - extended-Latin) -# 10 - (French - extended-Latin) -# 11 - (Spanish - extended-Latin) -# 12 - (Russian - Cyrillic) -# 13 - (Tournament - basic-Latin at create, any at login) -# 14 - (Taiwan - East-Asian) -# 15 - (Tournament - basic-Latin at create, any at login) -# 16 - (China - East-Asian) -# 17 - (CN1 - basic-Latin at create, any at login) -# 18 - (CN2 - basic-Latin at create, any at login) -# 19 - (CN3 - basic-Latin at create, any at login) -# 20 - (CN4 - basic-Latin at create, any at login) -# 21 - (CN5 - basic-Latin at create, any at login) -# 22 - (CN6 - basic-Latin at create, any at login) -# 23 - (CN7 - basic-Latin at create, any at login) -# 24 - (CN8 - basic-Latin at create, any at login) -# 25 - (Tournament - basic-Latin at create, any at login) -# 26 - (Test Server - any language) -# 27 - (Tournament - basic-Latin at create, any at login) -# 28 - (QA Server - any language) -# 29 - (CN9 - basic-Latin at create, any at login) - -RealmZone = 1 - +# Colors (read as optional1 if Type = Console) +# Format: "fatal error warn info debug trace" +# 0 - BLACK +# 1 - RED +# 2 - GREEN +# 3 - BROWN +# 4 - BLUE +# 5 - MAGENTA +# 6 - CYAN +# 7 - GREY +# 8 - YELLOW +# 9 - LRED +# 10 - LGREEN +# 11 - LBLUE +# 12 - LMAGENTA +# 13 - LCYAN +# 14 - WHITE +# Example: "1 9 3 6 5 8" # -# World.RealmAvailability -# Description: If enabled, players will enter the realm normally. -# Character creation will still be possible even when realm is disabled. -# Default: 1 - (Enabled) -# 0 - (Disabled) - -World.RealmAvailability = 1 - +# File: Name of the file (read as optional1 if Type = File) +# Allows to use one "%s" to create dynamic files # -# StrictNames.Reserved -# Description: Use the Reserved Filter from DBC. -# Prevents Player, Pet & Charter names from containing reserved names. -# Default: 1 - Enabled -# 0 - Disabled - -StrictNames.Reserved = 1 - +# Mode: Mode to open the file (read as optional2 if Type = File) +# a - (Append) +# w - (Overwrite) # -# StrictNames.Profanity -# Description: Use the Profanity Filter from DBC. -# Prevents Player, Pet & Charter names from containing profanity. -# Default: 1 - Enabled -# 0 - Disabled - -StrictNames.Profanity = 1 - +# MaxFileSize: Maximum file size of the log file before creating a new log file +# (read as optional3 if Type = File) +# Size is measured in bytes expressed in a 64-bit unsigned integer. +# Maximum value is 4294967295 (4 GB). Leave blank for no limit. +# NOTE: Does not work with dynamic filenames. +# Example: 536870912 (512 MB) # -# StrictPlayerNames -# Description: Limit player name to language specific symbol set. Prevents character -# creation and forces rename request if not allowed symbols are used -# Default: 0 - (Disable, Limited server timezone dependent client check) -# 1 - (Enabled, Strictly basic Latin characters) -# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, -# Note: Client needs to have the appropriate fonts installed which support -# the charset. For non-official localization, custom fonts need to be -# placed in clientdir/Fonts. -# 3 - (Enabled, Basic Latin characters + server timezone specific) -StrictPlayerNames = 0 +Appender.Console=1,4,0,"1 9 3 6 5 8" +Appender.Server=2,5,0,Server.log,w +# Appender.GM=2,5,15,gm_%s.log +Appender.Errors=2,5,0,Errors.log +# Appender.DB=3,5,0 +# Logger config values: Given a logger "name" +# Logger.name +# Description: Defines 'What to log' +# Format: LogLevel,AppenderList # -# StrictCharterNames -# Description: Limit guild/arena team charter names to language specific symbol set. -# Prevents charter creation if not allowed symbols are used. -# Default: 0 - (Disable, Limited server timezone dependent client check) -# 1 - (Enabled, Strictly basic Latin characters) -# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, -# Note: Client needs to have the appropriate fonts installed which support -# the charset. For non-official localization, custom fonts need to be -# placed in clientdir/Fonts. -# 3 - (Enabled, Basic Latin characters + server timezone specific) - -StrictCharterNames = 0 - +# LogLevel +# 0 - (Disabled) +# 1 - (Fatal) +# 2 - (Error) +# 3 - (Warning) +# 4 - (Info) +# 5 - (Debug) +# 6 - (Trace) # -# StrictPetNames -# Description: Limit pet names to language specific symbol set. -# Prevents pet naming if not allowed symbols are used. -# Default: 0 - (Disable, Limited server timezone dependent client check) -# 1 - (Enabled, Strictly basic Latin characters) -# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, -# Note: Client needs to have the appropriate fonts installed which support -# the charset. For non-official localization, custom fonts need to be -# placed in clientdir/Fonts. -# 3 - (Enabled, Basic Latin characters + server timezone specific) - -StrictPetNames = 0 - +# AppenderList: List of appenders linked to logger +# (Using spaces as separator). # -# DBC.Locale -# Description: DBC language settings. -# Default: 255 - (Auto Detect) -# 0 - (English) -# 1 - (Korean) -# 2 - (French) -# 3 - (German) -# 4 - (Chinese) -# 5 - (Taiwanese) -# 6 - (Spanish) -# 7 - (Spanish Mexico) -# 8 - (Russian) -DBC.Locale = 255 +Logger.root=2,Console Server +Logger.commands.gm=4,Console GM +Logger.diff=3,Console Server +Logger.mmaps=4,Server +Logger.scripts.hotswap=4,Console Server +Logger.server=4,Console Server +Logger.sql.sql=2,Console Errors +Logger.sql=4,Console Server +Logger.time.update=4,Console Server +Logger.module=4,Console Server +Logger.spells.scripts=2,Console Errors +#Logger.achievement=4,Console Server +#Logger.addon=4,Console Server +#Logger.ahbot=4,Console Server +#Logger.auctionHouse=4,Console Server +#Logger.autobroadcast=4, Console Server +#Logger.bg.arena=4,Console Server +#Logger.bg.battlefield=4,Console Server +#Logger.bg.battleground=4,Console Server +#Logger.bg.reportpvpafk=4,Console Server +#Logger.calendar=4,Console Server +#Logger.chat.log=4,Console Server +#Logger.chat.log.addon=4,Console Server +#Logger.chat.system=4,Console Server +#Logger.cheat=4,Console Server +#Logger.commands.ra=4,Console Server +#Logger.condition=4,Console Server +#Logger.dbc=4,Console Server +#Logger.disable=4,Console Server +#Logger.entities.dyobject=4,Console Server +#Logger.entities.faction=4,Console Server +#Logger.entities.gameobject=4,Console Server +#Logger.entities.object=4,Console Server +#Logger.entities.pet=4,Console Server +#Logger.entities.player.character=4,Console Server +#Logger.entities.player.dump=4,Console Server +#Logger.entities.player.items=4,Console Server +#Logger.entities.player.loading=4,Console Server +#Logger.entities.player.skills=4,Console Server +#Logger.entities.player=4,Console Server +#Logger.entities.transport=4,Console Server +#Logger.entities.unit.ai=4,Console Server +#Logger.entities.unit=4,Console Server +#Logger.entities.vehicle=4,Console Server +#Logger.gameevent=4,Console Server +#Logger.group=4,Console Server +#Logger.guild=4,Console Server +#Logger.instance.save=4,Console Server +#Logger.instance.script=4,Console Server +#Logger.lfg=4,Console Server +#Logger.loot=4,Console Server +#Logger.mail=4,Console Server +#Logger.maps.script=4,Console Server +#Logger.maps=4,Console Server +#Logger.misc=4,Console Server +#Logger.mmaps.tiles=4,Console Server +#Logger.movement.flightpath=4,Console Server +#Logger.movement.motionmaster=4,Console Server +#Logger.movement.splinechain=4,Console Server +#Logger.movement=4,Console Server +#Logger.network.kick=4,Console Server +#Logger.network.opcode=4,Console Server +#Logger.network.soap=4,Console Server +#Logger.network=4,Console Server +#Logger.outdoorpvp=4,Console Server +#Logger.pool=4,Console Server +#Logger.rbac=4,Console Server +#Logger.reputation=4,Console Server +#Logger.scripts.ai.escortai=4,Console Server +#Logger.scripts.ai.followerai=4,Console Server +#Logger.scripts.ai.petai=4,Console Server +#Logger.scripts.ai.sai=4,Console Server +#Logger.scripts.ai=4,Console Server +#Logger.scripts.cos=4,Console Server +#Logger.scripts=4,Console Server +#Logger.server.authserver=4,Console Server +#Logger.spells.aura.effect.nospell=4,Console Server +#Logger.spells.aura.effect=4,Console Server +#Logger.spells.effect.nospell=4,Console Server +#Logger.spells.effect=4,Console Server +#Logger.spells.scripts=4,Console Server +#Logger.spells=4,Console Server +#Logger.sql.dev=4,Console Server +#Logger.sql.driver=4,Console Server +#Logger.vehicles=4,Console Server +#Logger.warden=4,Console Server +#Logger.weather=4,Console Server # -# DeclinedNames -# Description: Allow Russian clients to set and use declined names. -# Default: 0 - (Disabled, Except when the Russian RealmZone is set) +# Log.Async.Enable +# Description: Enables asynchronous message logging. +# Default: 0 - (Disabled) # 1 - (Enabled) -DeclinedNames = 0 - -# -# Expansion -# Description: Allow server to use content from expansions. Checks for expansion-related -# map files, client compatibility and class/race character creation. -# Default: 2 - (Expansion 2) -# 1 - (Expansion 1) -# 0 - (Disabled, Ignore and disable expansion content (maps, races, classes) - -Expansion = 2 - -# -# MinPlayerName -# Description: Minimal player name length. -# Range: 1-12 -# Default: 2 - -MinPlayerName = 2 +Log.Async.Enable = 0 # -# MinCharterName -# Description: Minimal charter name length. -# Range: 1-24 -# Default: 2 - -MinCharterName = 2 +################################################################################################### +################################################################################################### +# METRIC # -# MinPetName -# Description: Minimal pet name length. -# Range: 1-12 -# Default: 2 - -MinPetName = 2 - +# These settings control the statistics sent to the metric database (currently InfluxDB) # -# Guild.CharterCost -# ArenaTeam.CharterCost.2v2 -# ArenaTeam.CharterCost.3v3 -# ArenaTeam.CharterCost.5v5 -# Description: Amount of money (in Copper) the petitions costs. -# Default: 1000 - (10 Silver) -# 800000 - (80 Gold) -# 1200000 - (120 Gold) -# 2000000 - (200 Gold) - -Guild.CharterCost = 1000 -ArenaTeam.CharterCost.2v2 = 800000 -ArenaTeam.CharterCost.3v3 = 1200000 -ArenaTeam.CharterCost.5v5 = 2000000 - +# Metric.Enable +# Description: Enables statistics sent to the metric database. +# Default: 0 - (Disabled) +# 1 - (Enabled) # -# MaxWhoListReturns -# Description: Set the max number of players returned in the /who list and interface. -# Default: 49 - (stable) -MaxWhoListReturns = 49 +Metric.Enable = 0 # -# CharacterCreating.Disabled -# Description: Disable character creation for players based on faction. -# Default: 0 - (Enabled, All factions are allowed) -# 1 - (Disabled, Alliance) -# 2 - (Disabled, Horde) -# 3 - (Disabled, Both factions) +# Metric.Interval +# Description: Interval between every batch of data sent in seconds +# Default: 10 seconds +# -CharacterCreating.Disabled = 0 +Metric.Interval = 10 # -# CharacterCreating.Disabled.RaceMask -# Description: Mask of races which cannot be created by players. -# Example: 1536 - (1024 + 512, Blood Elf and Draenei races are disabled) -# Default: 0 - (Enabled, All races are allowed) -# 1 - (Disabled, Human) -# 2 - (Disabled, Orc) -# 4 - (Disabled, Dwarf) -# 8 - (Disabled, Night Elf) -# 16 - (Disabled, Undead) -# 32 - (Disabled, Tauren) -# 64 - (Disabled, Gnome) -# 128 - (Disabled, Troll) -# 512 - (Disabled, Blood Elf) -# 1024 - (Disabled, Draenei) +# Metric.ConnectionInfo +# Description: Connection settings for metric database (currently InfluxDB). +# Example: "hostname;port;database" +# Default: "127.0.0.1;8086;worldserver" +# -CharacterCreating.Disabled.RaceMask = 0 +Metric.ConnectionInfo = "127.0.0.1;8086;worldserver" # -# CharacterCreating.Disabled.ClassMask -# Description: Mask of classes which cannot be created by players. -# Example: 288 - (32 + 256, Death Knight and Warlock classes are disabled) -# Default: 0 - (Enabled, All classes are allowed) -# 1 - (Disabled, Warrior) -# 2 - (Disabled, Paladin) -# 4 - (Disabled, Hunter) -# 8 - (Disabled, Rogue) -# 16 - (Disabled, Priest) -# 32 - (Disabled, Death Knight) -# 64 - (Disabled, Shaman) -# 128 - (Disabled, Mage) -# 256 - (Disabled, Warlock) -# 1024 - (Disabled, Druid) +# Metric.OverallStatusInterval +# Description: Interval between every gathering of overall worldserver status data in seconds +# Default: 1 second +# -CharacterCreating.Disabled.ClassMask = 0 +Metric.OverallStatusInterval = 1 # -# CharactersPerAccount -# Description: Limit number of characters per account on all realms on this realmlist. -# Important: Number must be >= CharactersPerRealm -# Default: 50 - -CharactersPerAccount = 50 +# Metric threshold values: Given a metric "name" +# Metric.Threshold.name +# Description: Skips sending statistics with a value lower than the config value. +# If the threshold is commented out, the metric will be ignored. +# Only metrics logged with METRIC_DETAILED_TIMER in the sources are affected. +# Disabled by default. Requires WITH_DETAILED_METRICS CMake flag. +# +# Format: Value as integer # -# CharactersPerRealm -# Description: Limit number of characters per account on this realm. -# Range: 1-10 -# Default: 10 - (Client limitation) -CharactersPerRealm = 10 +#Metric.Threshold.world_update_sessions_time = 100 +#Metric.Threshold.worldsession_update_opcode_time = 50 # -# HeroicCharactersPerRealm -# Description: Limit number of heroic class characters per account on this realm. -# Range: 1-10 -# Default: 1 +################################################################################################### -HeroicCharactersPerRealm = 1 +################################################################################################### +# SERVER +# +# BirthdayTime +# Description: Set to date of project's birth in UNIX time. By default Thu Oct 2, 2008 +# Default: 1222964635 + +BirthdayTime = 1222964635 # -# CharacterCreating.MinLevelForHeroicCharacter -# Description: Limit creating heroic characters only for account with another -# character of specific level (ignored for GM accounts) -# Default: 55 - (Enabled, Requires at least another level 55 character) -# 0 - (Disabled) -# 1 - (Enabled, Requires at least another level 1 character) +# PlayerLimit +# Description: Maximum number of players in the world. Excluding Mods, GMs and Admins. +# Important: If you want to block players and only allow Mods, GMs or Admins to join the +# server, use the DB field "auth.realmlist.allowedSecurityLevel". +# Default: 1000 - (Enabled) +# 1+ - (Enabled) +# 0 - (Disabled, No limit) -CharacterCreating.MinLevelForHeroicCharacter = 55 +PlayerLimit = 1000 # -# SkipCinematics -# Description: Disable cinematic intro at first login after character creation. -# Prevents buggy intros in case of custom start location coordinates. -# Default: 0 - (Show intro for each new character) -# 1 - (Show intro only for first character of selected race) -# 2 - (Disable intro for all classes) +# World.RealmAvailability +# Description: If enabled, players will enter the realm normally. +# Character creation will still be possible even when realm is disabled. +# Default: 1 - (Enabled) +# 0 - (Disabled) -SkipCinematics = 0 +World.RealmAvailability = 1 # -# MaxPlayerLevel -# Description: Maximum level that can be reached by players. -# Important: Levels beyond 100 are not recommended at all. -# Range: 1-255 -# Default: 80 +# GameType +# Description: Server realm type. +# Default: 0 - (NORMAL) +# 1 - (PVP) +# 4 - (NORMAL) +# 6 - (RP) +# 8 - (RPPVP) +# 16 - (FFA_PVP, Free for all PvP mode like arena PvP in all zones except rest +# activated places and sanctuaries) -MaxPlayerLevel = 80 +GameType = 0 # -# MinDualSpecLevel -# Description: Level requirement for Dual Talent Specialization -# Default: 40 +# RealmZone +# Description: Server realm zone. Set allowed alphabet in character, etc. names. +# Default 1 - (Development - any language) +# 2 - (United States - extended-Latin) +# 3 - (Oceanic - extended-Latin) +# 4 - (Latin America - extended-Latin) +# 5 - (Tournament - basic-Latin at create, any at login) +# 6 - (Korea - East-Asian) +# 7 - (Tournament - basic-Latin at create, any at login) +# 8 - (English - extended-Latin) +# 9 - (German - extended-Latin) +# 10 - (French - extended-Latin) +# 11 - (Spanish - extended-Latin) +# 12 - (Russian - Cyrillic) +# 13 - (Tournament - basic-Latin at create, any at login) +# 14 - (Taiwan - East-Asian) +# 15 - (Tournament - basic-Latin at create, any at login) +# 16 - (China - East-Asian) +# 17 - (CN1 - basic-Latin at create, any at login) +# 18 - (CN2 - basic-Latin at create, any at login) +# 19 - (CN3 - basic-Latin at create, any at login) +# 20 - (CN4 - basic-Latin at create, any at login) +# 21 - (CN5 - basic-Latin at create, any at login) +# 22 - (CN6 - basic-Latin at create, any at login) +# 23 - (CN7 - basic-Latin at create, any at login) +# 24 - (CN8 - basic-Latin at create, any at login) +# 25 - (Tournament - basic-Latin at create, any at login) +# 26 - (Test Server - any language) +# 27 - (Tournament - basic-Latin at create, any at login) +# 28 - (QA Server - any language) +# 29 - (CN9 - basic-Latin at create, any at login) -MinDualSpecLevel = 40 +RealmZone = 1 # -# StartPlayerLevel -# Description: Starting level for characters after creation. -# Range: 1-MaxPlayerLevel -# Default: 1 +# DBC.Locale +# Description: DBC language settings. +# Default: 255 - (Auto Detect) +# 0 - (English) +# 1 - (Korean) +# 2 - (French) +# 3 - (German) +# 4 - (Chinese) +# 5 - (Taiwanese) +# 6 - (Spanish) +# 7 - (Spanish Mexico) +# 8 - (Russian) -StartPlayerLevel = 1 +DBC.Locale = 255 # -# StartHeroicPlayerLevel -# Description: Staring level for heroic class characters after creation. -# Range: 1-MaxPlayerLevel -# Default: 55 +# Expansion +# Description: Allow server to use content from expansions. Checks for expansion-related +# map files, client compatibility and class/race character creation. +# Default: 2 - (Expansion 2) +# 1 - (Expansion 1) +# 0 - (Disabled, Ignore and disable expansion content (maps, races, classes) -StartHeroicPlayerLevel = 55 +Expansion = 2 # -# StartPlayerMoney -# Description: Amount of money (in Copper) that a character has after creation. -# Default: 0 -# 100 - (1 Silver) +# ClientCacheVersion +# Description: Client cache version for client cache data reset. Use any value different +# from DB and not recently been used to trigger client side cache reset. +# Default: 0 - (Use DB value from world DB db_version.cache_id field) -StartPlayerMoney = 0 +ClientCacheVersion = 0 # -# StartHeroicPlayerMoney -# Description: Amount of money (in Copper) that heroic class characters have after creation. -# Default: 2000 -# 2000 - (20 Silver) +# SessionAddDelay +# Description: Time (in microseconds) that a network thread will sleep after authentication +# protocol handling before adding a connection to the world session map. +# Default: 10000 - (10 milliseconds, 0.01 second) -StartHeroicPlayerMoney = 2000 +SessionAddDelay = 10000 # -# MaxHonorPoints -# Description: Maximum honor points a character can have. -# Default: 75000 +# CloseIdleConnections +# Description: Automatically close idle connections. +# SocketTimeOutTime and SocketTimeOutTimeActive determine when a connection is considered as idle. +# Default: 1 - (enable, Automatically close idle connections) +# 0 - (disable, Do not close idle connections) -MaxHonorPoints = 75000 +CloseIdleConnections = 1 # -# MaxHonorPointsMoneyPerPoint -# Description: Convert excess honor points into money if players got more points than allowed after changing the honor cap. -# Honor points will be converted into copper according to the value set in this config. -# Default: 0 - Disabled +# SocketTimeOutTime +# Description: Time (in milliseconds) after which a connection being idle on the character +# selection screen is disconnected. +# Default: 900000 - (15 minutes) -MaxHonorPointsMoneyPerPoint = 0 +SocketTimeOutTime = 900000 # -# StartHonorPoints -# Description: Amount of honor points that characters have after creation. -# Default: 0 +# SocketTimeOutTimeActive +# Description: Time (in milliseconds) after which an idle connection is dropped while +# logged into the world. +# The client sends keepalive packets every 30 seconds. Values <= 30s are not recommended. +# Default: 60000 - (1 minute) -StartHonorPoints = 0 +SocketTimeOutTimeActive = 60000 # -# MaxArenaPoints -# Description: Maximum arena points a character can have. -# Default: 10000 +# MaxOverspeedPings +# Description: Maximum overspeed ping count before character is disconnected. +# Default: 2 - (Enabled, Minimum value) +# 3+ - (Enabled, More checks before kick) +# 0 - (Disabled) -MaxArenaPoints = 10000 +MaxOverspeedPings = 2 # -# StartArenaPoints -# Description: Amount of arena points that characters has after creation. +# DisconnectToleranceInterval +# Description: Allows to skip queue after being disconnected for a given number of seconds. # Default: 0 -StartArenaPoints = 0 +DisconnectToleranceInterval = 0 # -# Arena.LegacyArenaPoints -# Description: Use arena point calculation from TBC for season 1 - 5 when rating is less or equal to 1500 -# Default: 1 - (Enabled) -# 0 - (Disabled) +# EnableLoginAfterDC +# Description: After not logging out properly (clicking Logout and waiting 20 seconds), +# characters stay in game world for a full minute, even if the client connection was closed. +# Such behaviour prevents for example exploiting boss encounters by alt+f4 +# and skipping crucial boss abilities, or escaping opponents in PvP. +# This setting is used to allow/disallow players to log back into characters that are left in world. +# Default: 1 - (by clicking "Enter World" player will log back into a character that is already in world) +# 0 - (by clicking "Enter World" player will get an error message when trying to log into a character +# that is left in world, and has to wait a minute for the character to be removed from world) -Arena.LegacyArenaPoints = 0 +EnableLoginAfterDC = 1 # -# RecruitAFriend.MaxLevel -# Description: Highest level up to which a character can benefit from the Recruit-A-Friend -# experience multiplier. -# Default: 60 +# MinWorldUpdateTime +# Description: Minimum time (milliseconds) between world update ticks (for mostly idle servers). +# Default: 1 - (0.001 second) -RecruitAFriend.MaxLevel = 60 +MinWorldUpdateTime = 1 # -# RecruitAFriend.MaxDifference -# Description: Highest level difference between linked Recruiter and Friend benefit from -# the Recruit-A-Friend experience multiplier. -# Default: 4 +# UpdateUptimeInterval +# Description: Update realm uptime period (in minutes). +# Default: 10 - (10 minutes) +# 1+ -RecruitAFriend.MaxDifference = 4 +UpdateUptimeInterval = 1 # -# InstantLogout -# Description: Required security level for instantly logging out everywhere. -# Does not work while in combat, dueling or falling. -# Default: 1 - (Enabled, Mods/GMs/Admins) -# 0 - (Enabled, Everyone) -# 2 - (Enabled, GMs/Admins) -# 3 - (Enabled, Admins) -# 4 - (Disabled) +# MaxCoreStuckTime +# Description: Time (in seconds) before the server is forced to crash if it is frozen. +# FreezeDetector +# Default: 0 - (Disabled) +# 10+ - (Enabled, Recommended 30+) +# Note: If enabled and the setting is too low, it can cause unexpected crash. -InstantLogout = 1 +MaxCoreStuckTime = 0 # -# PreventAFKLogout -# Description: Prevent players AFK from being logged out -# Default: 0 - (Disabled) -# 1 - (Enabled, prevent players AFK from being logged out in Sanctuary zones) -# 2 - (Enabled, prevent players AFK from being logged out in all zones) +# SaveRespawnTimeImmediately +# Description: Save respawn time for creatures at death and gameobjects at use/open. +# Default: 1 - (Enabled, Save respawn time immediately) +# 0 - (Disabled, Save respawn time at grid unloading) -PreventAFKLogout = 0 +SaveRespawnTimeImmediately = 1 # -# DisableWaterBreath -# Description: Required security level for water breathing. -# Default: 4 - (Disabled) -# 0 - (Enabled, Everyone) -# 1 - (Enabled, Mods/GMs/Admins) -# 2 - (Enabled, GMs/Admins) -# 3 - (Enabled, Admins) +# Server.LoginInfo +# Description: Display core version (.server info) on login. +# Default: 0 - (Disabled) +# 1 - (Enabled) -DisableWaterBreath = 4 +Server.LoginInfo = 0 # -# AllFlightPaths -# Description: Character knows all flight paths (of both factions) after creation. +# ShowKickInWorld +# Description: Determines whether a message is broadcast to the entire server when a +# player gets kicked # Default: 0 - (Disabled) # 1 - (Enabled) -AllFlightPaths = 0 +ShowKickInWorld = 0 # -# InstantFlightPaths -# Description: Flight paths will take players to their destination instantly instead -# of making them wait while flying. +# ShowMuteInWorld +# Description: Determines whether a message is broadcast to the entire server when a +# player gets muted. # Default: 0 - (Disabled) # 1 - (Enabled) -# 2 - (Enabled, but the player can toggle instant flight off or on at each flight master) -InstantFlightPaths = 0 +ShowMuteInWorld = 0 # -# AlwaysMaxSkillForLevel -# Description: Players will automatically gain max skill level when logging in or leveling -# up. +# ShowBanInWorld +# Description: Determines whether a message is broadcast to the entire server when a +# player gets banned. # Default: 0 - (Disabled) # 1 - (Enabled) -AlwaysMaxSkillForLevel = 0 +ShowBanInWorld = 0 # -# ActivateWeather -# Description: Activate the weather system. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MaxWhoListReturns +# Description: Set the max number of players returned in the /who list and interface. +# Default: 49 - (stable) -ActivateWeather = 1 +MaxWhoListReturns = 49 # -# CastUnstuck -# Description: Allow casting the Unstuck spell using .start or unstuck button in client -# help options. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# PreventAFKLogout +# Description: Prevent players AFK from being logged out +# Default: 0 - (Disabled) +# 1 - (Enabled, prevent players AFK from being logged out in Sanctuary zones) +# 2 - (Enabled, prevent players AFK from being logged out in all zones) -CastUnstuck = 1 +PreventAFKLogout = 0 # -# Instance.IgnoreLevel -# Description: Ignore level requirement when entering instances. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -Instance.IgnoreLevel = 0 +################################################################################################### +################################################################################################### +# PACKET SPOOF PROTECTION SETTINGS # -# Instance.IgnoreRaid -# Description: Ignore raid group requirement when entering instances. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# These settings determine which action to take when harmful packet spoofing is detected. +# +# PacketSpoof.Policy +# Description: Determines the course of action when packet spoofing is detected. +# Values: 0 - Log only +# 1 - Log + kick +# 2 - Log + kick + ban -Instance.IgnoreRaid = 0 +PacketSpoof.Policy = 1 # -# Instance.GMSummonPlayer -# Description: Allow GM to summon players or only other GM accounts inside instances. -# Default: 0 - (Disabled, Only GM accounts can be summoned by GM) -# 1 - (Enabled, GM and Player accounts can be summoned by GM) +# PacketSpoof.BanMode +# Description: If PacketSpoof.Policy equals 2, this will determine the ban mode. +# Values: 0 - Ban Account +# 1 - Ban IP +# Note: Banning by character not supported for logical reasons. +# -Instance.GMSummonPlayer = 0 +PacketSpoof.BanMode = 0 # -# Instance.ResetTimeHour -# Description: Hour of the day when the global instance reset occurs. -# Range: 0-23 -# Default: 4 - (04:00 AM) +# PacketSpoof.BanDuration +# Description: Duration of the ban in seconds. Only valid if PacketSpoof.Policy is set to 2. +# Set to 0 for permanent ban. +# Default: 86400 seconds (1 day) +# -Instance.ResetTimeHour = 4 +PacketSpoof.BanDuration = 86400 # -# Instance.UnloadDelay -# Description: Time (in milliseconds) before instance maps are unloaded from memory if no -# characters are inside. -# Default: 1800000 - (Enabled, 30 minutes) -# 0 - (Disabled, Instance maps are kept in memory until the instance -# resets) - -Instance.UnloadDelay = 1800000 +################################################################################################### +################################################################################################### +# WARDEN SETTINGS # -# Quests.EnableQuestTracker -# Description: Store data in the database about quest completion and abandonment to help finding bugged quests. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Warden.Enabled +# Description: Enable Warden anti-cheat system. +# Default: 1 - (Enabled) +# 0 - (Disabled) -Quests.EnableQuestTracker = 0 +Warden.Enabled = 1 # -# Quests.LowLevelHideDiff -# Description: Level difference between player and quest level at which quests are -# considered low-level and are not shown via exclamation mark (!) at quest -# givers. -# Default: 4 - (Enabled, Hide quests that have 4 levels less than the character) -# -1 - (Disabled, Show all available quest marks) +# Warden.NumMemChecks +# Description: Number of Warden memory checks that are sent to the client each cycle. +# Default: 3 - (Enabled) +# 0 - (Disabled) -Quests.LowLevelHideDiff = 4 +Warden.NumMemChecks = 3 # -# Quests.HighLevelHideDiff -# Description: Level difference between player and quest level at which quests are -# considered high-level and are not shown via exclamation mark (!) at quest -# givers. -# Default: 7 - (Enabled, Hide quests that have 7 levels more than the character) -# -1 - (Disabled, Show all available quest marks) +# Warden.NumLuaChecks +# Description: Number of Warden LUA checks that are sent to the client each cycle. +# Default: 1 - (Enabled) +# 0 - (Disabled) -Quests.HighLevelHideDiff = 7 +Warden.NumLuaChecks = 1 # -# Quests.IgnoreRaid -# Description: Allow non-raid quests to be completed while in a raid group. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Warden.NumOtherChecks +# Description: Number of Warden checks other than memory checks that are added to request +# each checking cycle. +# Default: 7 - (Enabled) +# 0 - (Disabled) -Quests.IgnoreRaid = 0 +Warden.NumOtherChecks = 7 # -# Quests.IgnoreAutoAccept -# Description: Ignore auto accept flag. Clients will have to manually accept all quests. -# Default: 0 - (Disabled, DB values determine if quest is marked auto accept or not.) -# 1 - (Enabled, clients will not be told to automatically accept any quest.) +# Warden.ClientResponseDelay +# Description: Time (in seconds) before client is getting disconnecting for not responding. +# Default: 600 - (10 Minutes) +# 0 - (Disabled, client won't be kicked) -Quests.IgnoreAutoAccept = 0 +Warden.ClientResponseDelay = 600 # -# Quests.IgnoreAutoComplete -# Description: Ignore auto complete flag. Clients will have to manually complete all quests. -# Default: 0 - (Disabled, DB values determine if quest is marked auto complete or not.) -# 1 - (Enabled, clients will not be told to automatically complete any quest.) +# Warden.ClientCheckHoldOff +# Description: Time (in seconds) to wait before sending the next check request to the client. +# A low number increases traffic and load on client and server side. +# Default: 30 - (30 Seconds) +# 0 - (Send check as soon as possible) -Quests.IgnoreAutoComplete = 0 +Warden.ClientCheckHoldOff = 30 # -# Calendar.DeleteOldEventsHour -# Description: Hour of the day when the daily deletion of old calendar events occurs. -# Range: 0-23 -# Default: 6 - (06:00 AM) +# Warden.ClientCheckFailAction +# Description: Default action being taken if a client check failed. Actions can be +# overwritten for each single check via warden_action table in characters +# database. +# Default: 0 - (Disabled, Logging only) +# 1 - (Kick) +# 2 - (Ban) -Calendar.DeleteOldEventsHour = 6 +Warden.ClientCheckFailAction = 0 # -# Guild.EventLogRecordsCount -# Description: Number of log entries for guild events that are stored per guild. Old entries -# will be overwritten if the number of log entries exceed the configured value. -# High numbers prevent this behavior but may have performance impacts. -# Default: 100 +# Warden.BanDuration +# Description: Time (in seconds) an account will be banned if ClientCheckFailAction is set +# to ban. +# Default: 86400 - (24 hours) +# 0 - (Permanent ban) -Guild.EventLogRecordsCount = 100 +Warden.BanDuration = 259200 # -# Guild.ResetHour -# Description: Hour of the day when the daily cap resets occur. -# Range: 0-23 -# Default: 6 - (06:00 AM) - -Guild.ResetHour = 6 +################################################################################################### +################################################################################################### +# AUTO BROADCAST # -# Guild.BankEventLogRecordsCount -# Description: Number of log entries for guild bank events that are stored per guild. Old -# entries will be overwritten if the number of log entries exceed the -# configured value. High numbers prevent this behavior but may have performance -# impacts. -# Default: 25 - (Minimum) +# AutoBroadcast.On +# Description: Enable auto broadcast. +# Default: 0 - (Disabled) +# 1 - (Enabled) -Guild.BankEventLogRecordsCount = 25 +AutoBroadcast.On = 0 # -# MaxPrimaryTradeSkill -# Description: Maximum number of primary professions a character can learn. -# Range: 0-11 -# Default: 2 +# AutoBroadcast.Center +# Description: Auto broadcasting display method. +# Default: 0 - (Announce) +# 1 - (Notify) +# 2 - (Both) -MaxPrimaryTradeSkill = 2 +AutoBroadcast.Center = 0 # -# MinPetitionSigns -# Description: Number of required signatures on charters to create a guild. -# Range: 0-9 -# Default: 9 +# AutoBroadcast.Timer +# Description: Timer (in milliseconds) for auto broadcasts. +# Default: 60000 - (60 seconds) -MinPetitionSigns = 9 +AutoBroadcast.Timer = 60000 # -# MaxGroupXPDistance -# Description: Max distance to creature for group member to get experience at creature -# death. -# Default: 74 +# AutoBroadcast.MinDisableLevel +# Description: Minimum level required to disable autobroadcast announcements if EnablePlayerSettings option is enabled. +# Default: 0 - (Not allowed to disable it) -MaxGroupXPDistance = 74 +AutoBroadcast.MinDisableLevel = 0 # -# MaxRecruitAFriendBonusDistance -# Description: Max distance between character and and group to gain the Recruit-A-Friend -# XP multiplier. -# Default: 100 - -MaxRecruitAFriendBonusDistance = 100 +################################################################################################### +################################################################################################### +# VISIBILITY AND DISTANCES # -# MailDeliveryDelay -# Description: Time (in seconds) mail delivery is delayed when sending items. -# Default: 3600 - (1 hour) +# Visibility.GroupMode +# Description: Group visibility modes. Defines which groups can aways detect invisible +# characters of the same raid, group or faction. +# Default: 1 - (Raid) +# 0 - (Party) +# 2 - (Faction) -MailDeliveryDelay = 3600 +Visibility.GroupMode = 1 # -# SkillChance.Prospecting -# Description: Allow skill increase from prospecting. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Visibility.Distance.Continents +# Visibility.Distance.Instances +# Visibility.Distance.BGArenas +# Description: Visibility distance to see other players or gameobjects. +# Visibility on continents on retail ~90 yards. In BG/Arenas ~180. +# For instances default ~120. +# Max limited by active player zone: ~ 333 +# Min limit is max aggro radius (45) * Rate.Creature.Aggro +# Default: 90 - (Visibility.Distance.Continents) +# 120 - (Visibility.Distance.Instances) +# 180 - (Visibility.Distance.BGArenas) -SkillChance.Prospecting = 0 +Visibility.Distance.Continents = 90 +Visibility.Distance.Instances = 120 +Visibility.Distance.BGArenas = 180 # -# SkillChance.Milling -# Description: Allow skill increase from milling. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Visibility.Notify.Period.OnContinents +# Visibility.Notify.Period.InInstances +# Visibility.Notify.Period.InBGArenas +# Description: Time (in milliseconds) for visibility update period. Lower values may have +# performance impact. +# Default: 1000 - (Visibility.Notify.Period.OnContinents) +# 1000 - (Visibility.Notify.Period.InInstances) +# 1000 - (Visibility.Notify.Period.InBGArenas) -SkillChance.Milling = 0 +Visibility.Notify.Period.OnContinents = 1000 +Visibility.Notify.Period.InInstances = 1000 +Visibility.Notify.Period.InBGArenas = 1000 # -# OffhandCheckAtSpellUnlearn -# Description: Unlearning certain spells can change offhand weapon restrictions -# for equip slots. -# Default: 1 - (Recheck offhand slot weapon at unlearning a spell) -# 0 - (Recheck offhand slot weapon only at zone update) +# Visibility.ObjectSparkles +# Description: Whether or not to display sparkles on gameobjects related to active quests. +# Default: 1 - (Show Sparkles) +# 0 - (Hide Sparkles) -OffhandCheckAtSpellUnlearn = 1 +Visibility.ObjectSparkles = 1 # -# ClientCacheVersion -# Description: Client cache version for client cache data reset. Use any value different -# from DB and not recently been used to trigger client side cache reset. -# Default: 0 - (Use DB value from world DB db_version.cache_id field) +# Visibility.ObjectQuestMarkers +# Description: Show quest icons above game objects in the same way as creature quest givers. +# Default: 1 - (Show quest markers, post patch 2.3 behavior) +# 0 - (Hide quest markers, pre patch 2.3 behavior) -ClientCacheVersion = 0 +Visibility.ObjectQuestMarkers = 1 # -# Event.Announce -# Description: Announce events. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -Event.Announce = 0 +################################################################################################### +################################################################################################### +# MAPS # -# BeepAtStart -# Description: Beep when the world server finished starting (Unix/Linux systems). -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MapUpdateInterval +# Description: Time (milliseconds) for map update interval. +# Default: 10 - (0.01 second) -BeepAtStart = 1 +MapUpdateInterval = 10 # -# FlashAtStart -# Description: Flashes in taskbar when the world server finished starting. (Works on Windows only) -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MapUpdate.Threads +# Description: Number of threads to update maps. +# Default: 1 -FlashAtStart = 1 +MapUpdate.Threads = 1 # -# Server.LoginInfo -# Description: Display core version (.server info) on login. +# MoveMaps.Enable +# Description: Enable/Disable pathfinding using mmaps - recommended. # Default: 0 - (Disabled) # 1 - (Enabled) -Server.LoginInfo = 0 +MoveMaps.Enable = 1 # -# Command.LookupMaxResults -# Description: Number of results being displayed using a .lookup command. -# Default: 0 - (Unlimited) +# vmap.enableLOS +# vmap.enableHeight +# Description: VMmap support for line of sight and height calculation. +# Default: 1 - (Enabled, vmap.enableLOS) +# 1 - (Enabled, vmap.enableHeight) +# 0 - (Disabled) -Command.LookupMaxResults = 0 +vmap.enableLOS = 1 +vmap.enableHeight = 1 # -# AllowTickets -# Description: Allow/disallow sending new tickets. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# vmap.petLOS +# Description: Check line of sight for pets, to avoid them attacking through walls. +# Default: 1 - (Enabled, each pet attack will be checked for line of sight) +# 0 - (Disabled, somewhat less CPU usage) -AllowTickets = 1 +vmap.petLOS = 1 -# DeletedCharacterTicketTrace -# Description: Keep trace of tickets opened by deleted characters -# gm_ticket.playerGuid will be 0, old GUID and character name -# will be included in gm_ticket.comment -# Default: 0 - (Disabled) -# 1 - (Enabled) +# vmap.BlizzlikePvPLOS +# Description: Check line of sight for battleground and arena gameobjects and other doodads (such as WSG treestumps). +# Default: 1 - (Enabled, players will be able to fire spells through treestumps and other objects). +# 0 - (Disabled, players will NOT be able to fire spells through treestumps and other objects). -DeletedCharacterTicketTrace = 0 +vmap.BlizzlikePvPLOS = 1 # -# DBC.EnforceItemAttributes -# Disallow overriding item attributes stored in DBC files with values from the database -# Default: 0 - Off, Use DB values -# 1 - On, Enforce DBC Values (default) +# vmap.enableIndoorCheck +# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.). +# Default: 1 - (Enabled) +# 0 - (Disabled, somewhat less CPU usage) -DBC.EnforceItemAttributes = 1 +vmap.enableIndoorCheck = 1 # -# AccountInstancesPerHour -# Description: Controls the max amount of different instances player can enter within hour -# Default: 5 +# DetectPosCollision +# Description: Check final move position, summon position, etc for visible collision with +# other objects or walls (walls only if vmaps are enabled). +# Default: 1 - (Enabled) +# 0 - (Disabled, Less position precision but less CPU usage) -AccountInstancesPerHour = 5 +DetectPosCollision = 1 # -# BirthdayTime -# Description: Set to date of project's birth in UNIX time. By default Thu Oct 2, 2008 -# Default: 1222964635 -# -# +# CheckGameObjectLoS +# Description: Include dynamic game objects (doors, chests etc.) in line of sight checks. +# This increases CPU usage somewhat. +# Default: 1 - (Enabled) +# 0 - (Disabled, may break some boss encounters) -BirthdayTime = 1222964635 +CheckGameObjectLoS = 1 # -# IsContinentTransport.Enabled -# Description: Controls the continent transport (ships, zeppelins etc..) -# Default: 1 - (Enabled) -# -# +# TargetPosRecalculateRange +# Description: Max distance from movement target point (+moving unit size) and targeted +# object (+size) after that new target movement point calculated. +# Range: 0.5-5.0 +# Default: 1.5 +# 0.5 - (Minimum, Contact Range, More sensitive reaction to target movement) +# 5.0 - (Maximum, Melee attack range, Less CPU usage) -IsContinentTransport.Enabled = 1 +TargetPosRecalculateRange = 1.5 # -# IsPreloadedContinentTransport.Enabled -# Description: Should we preload the transport? -# (Not recommended on low-end servers as it consumes 100% more ram) -# and it's not really necessary to be enabled. -# +# PreloadAllNonInstancedMapGrids +# Description: Preload all grids on all non-instanced maps. This will take a great amount +# of additional RAM (ca. 9 GB) and causes the server to take longer to start, +# but can increase performance if used on a server with a high amount of players. +# It will also activate all creatures which are set active (e.g. the Fel Reavers +# in Hellfire Peninsula) on server start. # Default: 0 - (Disabled) -# -# +# 1 - (Enabled) -IsPreloadedContinentTransport.Enabled = 0 +PreloadAllNonInstancedMapGrids = 0 # -################################################################################################### +# SetAllCreaturesWithWaypointMovementActive +# Description: Set all creatures with waypoint movement active. This means that they will start +# movement once they are loaded (which happens on grid load) and keep moving even +# when no player is near. This will increase CPU usage significantly and can be +# used with enabled "PreloadAllNonInstancedMapGrids" to start waypoint movement on +# server startup. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +SetAllCreaturesWithWaypointMovementActive = 0 -################################################################################################### -# CRYPTOGRAPHY -# -# TOTPMasterSecret -# Description: The key used by authserver to decrypt TOTP secrets from database storage. -# You only need to set this here if you plan to use the in-game 2FA -# management commands (.account 2fa), otherwise this can be left blank. -# -# The server will auto-detect if this does not match your authserver setting, -# in which case any commands reliant on the secret will be disabled. -# -# Default: # +# DontCacheRandomMovementPaths +# Description: Random movement paths (calculated using MoveMaps) can be cached to save cpu time, +# but this may use up considerable amount of memory and can be prevented by setting this option to 1. +# Recommended setting for populated servers is having enough RAM and setting this to 0. +# Default: 0 - (cache paths, uses more memory) +# 1 - (don't cache, uses more cpu) -TOTPMasterSecret = +DontCacheRandomMovementPaths = 0 # ################################################################################################### ################################################################################################### -# UPDATE SETTINGS +# WEATHER # -# Updates.EnableDatabases -# Description: A mask that describes which databases shall be updated. -# -# Following flags are available -# DATABASE_LOGIN = 1, // Auth database -# DATABASE_CHARACTER = 2, // Character database -# DATABASE_WORLD = 4, // World database -# -# Default: 7 - (All enabled) -# 4 - (Enable world only) -# 0 - (All disabled) - -Updates.EnableDatabases = 7 - -# -# Updates.AutoSetup -# Description: Auto populate empty databases. +# ActivateWeather +# Description: Activate the weather system. # Default: 1 - (Enabled) # 0 - (Disabled) -Updates.AutoSetup = 1 +ActivateWeather = 1 # -# Updates.Redundancy -# Description: Perform data redundancy checks through hashing -# to detect changes on sql updates and reapply it. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# ChangeWeatherInterval +# Description: Time (in milliseconds) for weather update interval. +# Default: 600000 - (10 min) -Updates.Redundancy = 1 +ChangeWeatherInterval = 600000 # -# Updates.ArchivedRedundancy -# Description: Check hashes of archived updates (slows down startup). -# Default: 0 - (Disabled) -# 1 - (Enabled) - -Updates.ArchivedRedundancy = 0 +################################################################################################### +################################################################################################### +# TICKETS # -# Updates.AllowRehash -# Description: Inserts the current file hash in the database if it is left empty. -# Useful if you want to mark a file as applied but you don't know its hash. +# AllowTickets +# Description: Allow/disallow sending new tickets. # Default: 1 - (Enabled) # 0 - (Disabled) -Updates.AllowRehash = 1 +AllowTickets = 1 # -# Updates.CleanDeadRefMaxCount -# Description: Cleans dead/ orphaned references that occur if an update was removed or renamed and edited in one step. -# It only starts the clean up if the count of the missing updates is below or equal the Updates.CleanDeadRefMaxCount value. -# This way prevents erasing of the update history due to wrong source directory state (maybe wrong branch or bad revision). -# Disable this if you want to know if the database is in a possible "dirty state". -# Default: 3 - (Enabled) -# 0 - (Disabled) -# -1 - (Enabled - unlimited) +# LevelReq.Ticket +# Description: Level requirement for characters to be able to write tickets. +# Default: 1 -Updates.CleanDeadRefMaxCount = 3 +LevelReq.Ticket = 1 + +# DeletedCharacterTicketTrace +# Description: Keep trace of tickets opened by deleted characters +# gm_ticket.playerGuid will be 0, old GUID and character name +# will be included in gm_ticket.comment +# Default: 0 - (Disabled) +# 1 - (Enabled) + +DeletedCharacterTicketTrace = 0 # ################################################################################################### ################################################################################################### -# WARDEN SETTINGS +# COMMAND # -# Warden.Enabled -# Description: Enable Warden anti-cheat system. +# AllowPlayerCommands +# Description: Allow players to use commands. # Default: 1 - (Enabled) # 0 - (Disabled) -Warden.Enabled = 1 +AllowPlayerCommands = 1 # -# Warden.NumMemChecks -# Description: Number of Warden memory checks that are sent to the client each cycle. -# Default: 3 - (Enabled) -# 0 - (Disabled) +# Command.LookupMaxResults +# Description: Number of results being displayed using a .lookup command. +# Default: 0 - (Unlimited) -Warden.NumMemChecks = 3 +Command.LookupMaxResults = 0 # -# Warden.NumLuaChecks -# Description: Number of Warden LUA checks that are sent to the client each cycle. +# Die.Command.Mode +# Description: Do not trigger things like loot from .die command. # Default: 1 - (Enabled) # 0 - (Disabled) -Warden.NumLuaChecks = 1 +Die.Command.Mode = 1 # -# Warden.NumOtherChecks -# Description: Number of Warden checks other than memory checks that are added to request -# each checking cycle. -# Default: 7 - (Enabled) -# 0 - (Disabled) +################################################################################################### -Warden.NumOtherChecks = 7 +################################################################################################### +# # +# SERVER SYSTEM SETTINGS END # +# # +################################################################################################### + +################################################################################################### +# # +# GAME SETTINGS BEGIN # +# # +################################################################################################### +################################################################################################### +# GAME MASTER # -# Warden.ClientResponseDelay -# Description: Time (in seconds) before client is getting disconnecting for not responding. -# Default: 600 - (10 Minutes) -# 0 - (Disabled, client won't be kicked) +# GM.LoginState +# Description: GM mode at login. +# Default: 2 - (Last save state) +# 0 - (Disable) +# 1 - (Enable) -Warden.ClientResponseDelay = 600 +GM.LoginState = 2 # -# Warden.ClientCheckHoldOff -# Description: Time (in seconds) to wait before sending the next check request to the client. -# A low number increases traffic and load on client and server side. -# Default: 30 - (30 Seconds) -# 0 - (Send check as soon as possible) +# GM.Visible +# Description: GM visibility at login. +# Default: 2 - (Last save state) +# 0 - (Invisible) +# 1 - (Visible) -Warden.ClientCheckHoldOff = 30 +GM.Visible = 2 # -# Warden.ClientCheckFailAction -# Description: Default action being taken if a client check failed. Actions can be -# overwritten for each single check via warden_action table in characters -# database. -# Default: 0 - (Disabled, Logging only) -# 1 - (Kick) -# 2 - (Ban) +# GM.Chat +# Description: GM chat mode at login. +# Default: 2 - (Last save state) +# 0 - (Disable) +# 1 - (Enable) -Warden.ClientCheckFailAction = 0 +GM.Chat = 2 # -# Warden.BanDuration -# Description: Time (in seconds) an account will be banned if ClientCheckFailAction is set -# to ban. -# Default: 86400 - (24 hours) -# 0 - (Permanent ban) +# GM.WhisperingTo +# Description: Is GM accepting whispers from player by default or not. +# Default: 2 - (Last save state) +# 0 - (Disable) +# 1 - (Enable) -Warden.BanDuration = 259200 +GM.WhisperingTo = 2 # -################################################################################################### +# GM.InGMList.Level +# Description: Maximum GM level shown in GM list (if enabled) in non-GM state (.gm off). +# Default: 3 - (Anyone) +# 0 - (Only players) +# 1 - (Only moderators) +# 2 - (Only gamemasters) + +GM.InGMList.Level = 3 -################################################################################################### -# PLAYER INTERACTION # -# AllowTwoSide.Accounts -# Description: Allow creating characters of both factions on the same account. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# GM.InWhoList.Level +# Description: Max GM level showed in who list (if visible). +# Default: 3 - (Anyone) +# 0 - (Only players) +# 1 - (Only moderators) +# 2 - (Only gamemasters) -AllowTwoSide.Accounts = 1 +GM.InWhoList.Level = 3 # -# AllowTwoSide.Interaction.Calendar -# Description: Allow calendar invites between factions. +# GM.StartLevel +# Description: GM character starting level. +# Default: 1 + +GM.StartLevel = 1 + +# +# GM.AllowInvite +# Description: Allow players to invite GM characters. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Calendar = 0 +GM.AllowInvite = 0 # -# AllowTwoSide.Interaction.Chat -# Description: Allow say chat between factions. +# GM.AllowFriend +# Description: Allow players to add GM characters to their friends list. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Chat = 0 +GM.AllowFriend = 0 # -# AllowTwoSide.Interaction.Emote -# Description: Allow emote messages between factions (e.g. "/e looks into the sky") +# GM.LowerSecurity +# Description: Allow lower security levels to use commands on higher security level +# characters. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Emote = 0 +GM.LowerSecurity = 0 + +# +# GM.TicketSystem.ChanceOfGMSurvey +# Description: Chance of sending a GM survey after ticket completion. +# Default: 50 - (Enabled) +# 0 - (Disabled) + +GM.TicketSystem.ChanceOfGMSurvey = 50 + +# +################################################################################################### +################################################################################################### +# CHEAT # -# AllowTwoSide.Interaction.Channel -# Description: Allow channel chat between factions. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# DisableWaterBreath +# Description: Required security level for water breathing. +# Default: 4 - (Disabled) +# 0 - (Enabled, Everyone) +# 1 - (Enabled, Mods/GMs/Admins) +# 2 - (Enabled, GMs/Admins) +# 3 - (Enabled, Admins) -AllowTwoSide.Interaction.Channel = 0 +DisableWaterBreath = 4 # -# AllowTwoSide.Interaction.Group -# Description: Allow group joining between factions. +# AllFlightPaths +# Description: Character knows all flight paths (of both factions) after creation. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Group = 0 +AllFlightPaths = 0 # -# AllowTwoSide.Interaction.Guild -# Description: Allow guild joining between factions. +# InstantFlightPaths +# Description: Flight paths will take players to their destination instantly instead +# of making them wait while flying. # Default: 0 - (Disabled) # 1 - (Enabled) +# 2 - (Enabled, but the player can toggle instant flight off or on at each flight master) -AllowTwoSide.Interaction.Guild = 0 +InstantFlightPaths = 0 # -# AllowTwoSide.Interaction.Arena -# Description: Allow joining arena teams between factions. +# AlwaysMaxSkillForLevel +# Description: Players will automatically gain max skill level when logging in or leveling +# up. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Arena = 0 +AlwaysMaxSkillForLevel = 0 # -# AllowTwoSide.Interaction.Auction -# Description: Allow auctions between factions. +# AlwaysMaxWeaponSkill +# Description: Players will automatically gain max weapon/defense skill when logging in, +# or leveling. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Auction = 0 +AlwaysMaxWeaponSkill = 0 # -# AllowTwoSide.Interaction.Mail -# Description: Allow sending mails between factions. +# PlayerStart.AllReputation +# Description: Players will start with most of the high level reputations that are needed +# for items, mounts etc. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.Interaction.Mail = 0 +PlayerStart.AllReputation = 0 # -# AllowTwoSide.WhoList -# Description: Show characters from both factions in the /who list. +# PlayerStart.CustomSpells +# Description: If enabled, players will start with custom spells defined in +# playercreateinfo_spell_custom table. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.WhoList = 0 +PlayerStart.CustomSpells = 0 # -# AllowTwoSide.AddFriend -# Description: Allow adding friends from other faction the friends list. +# PlayerStart.MapsExplored +# Description: Characters start with all maps explored. # Default: 0 - (Disabled) # 1 - (Enabled) -AllowTwoSide.AddFriend = 0 +PlayerStart.MapsExplored = 0 # -# AllowTwoSide.Trade -# Description: Allow trading between factions. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# InstantLogout +# Description: Required security level for instantly logging out everywhere. +# Does not work while in combat, dueling or falling. +# Default: 1 - (Enabled, Mods/GMs/Admins) +# 0 - (Enabled, Everyone) +# 2 - (Enabled, GMs/Admins) +# 3 - (Enabled, Admins) +# 4 - (Disabled) -AllowTwoSide.Trade = 0 +InstantLogout = 1 # -# TalentsInspecting -# Description: Allow inspecting characters from the opposing faction. -# Doesn't affect characters in gamemaster mode. +# CastUnstuck +# Description: Allow casting the Unstuck spell using .start or unstuck button in client +# help options. # Default: 1 - (Enabled) # 0 - (Disabled) -TalentsInspecting = 1 +CastUnstuck = 1 # ################################################################################################### ################################################################################################### -# CREATURE SETTINGS -# -# ThreatRadius -# Description: Distance for creatures to evade after being pulled away from the combat -# starting point. If ThreatRadius is less than creature aggro radius then aggro -# radius will be used. -# Default: 60 - -ThreatRadius = 60 - -# -# Rate.Creature.Aggro -# Description: Aggro radius percentage. -# Default: 1 - (Enabled, 100%) -# 1.5 - (Enabled, 150%) -# 0 - (Disabled, 0%) - -Rate.Creature.Aggro = 1 - -# -# CreatureFamilyFleeAssistanceRadius -# Description: Distance for fleeing creatures seeking assistance from other creatures. -# Default: 30 - (Enabled) -# 0 - (Disabled) - -CreatureFamilyFleeAssistanceRadius = 30 - -# -# CreatureFamilyAssistanceRadius -# Description: Distance for creatures calling for assistance from other creatures without -# moving. -# Default: 10 - (Enabled) -# 0 - (Disabled) - -CreatureFamilyAssistanceRadius = 10 - -# -# CreatureFamilyAssistanceDelay -# Description: Time (in milliseconds) before creature assistance call. -# Default: 2000 - (2 Seconds) - -CreatureFamilyAssistanceDelay = 2000 - -# -# CreatureFamilyAssistancePeriod -# Description: Time (in milliseconds) before next creature assistance call. -# Default: 3000 - (3 Seconds) -# 0 - (Disabled) - -CreatureFamilyAssistancePeriod = 3000 - +# CHARACTER DATABASE # -# CreatureFamilyFleeDelay -# Description: Time (in milliseconds) during which creature can flee if no assistance was -# found. -# Default: 7000 (7 Seconds) +# PlayerSaveInterval +# Description: Time (in milliseconds) for player save interval. +# Default: 900000 - (15 min) -CreatureFamilyFleeDelay = 7000 +PlayerSaveInterval = 900000 # -# WorldBossLevelDiff -# Description: World boss level difference. -# Default: 3 +# PlayerSave.Stats.MinLevel +# Description: Minimum level for saving character stats in the database for external usage. +# Default: 0 - (Disabled, Do not save character stats) +# 1+ - (Enabled, Level beyond which character stats are saved) -WorldBossLevelDiff = 3 +PlayerSave.Stats.MinLevel = 0 # -# Corpse.Decay.NORMAL -# Corpse.Decay.RARE -# Corpse.Decay.ELITE -# Corpse.Decay.RAREELITE -# Corpse.Decay.WORLDBOSS -# Description: Time (in seconds) until creature corpse will decay if not looted or skinned. -# Default: 60 - (1 Minute, Corpse.Decay.NORMAL) -# 300 - (5 Minutes, Corpse.Decay.RARE) -# 300 - (5 Minutes, Corpse.Decay.ELITE) -# 300 - (5 Minutes, Corpse.Decay.RAREELITE) -# 3600 - (1 Hour, Corpse.Decay.WORLDBOSS) +# PlayerSave.Stats.SaveOnlyOnLogout +# Description: Save player stats only on logout. +# Default: 1 - (Enabled, Only save on logout) +# 0 - (Disabled, Save on every player save) -Corpse.Decay.NORMAL = 60 -Corpse.Decay.RARE = 300 -Corpse.Decay.ELITE = 300 -Corpse.Decay.RAREELITE = 300 -Corpse.Decay.WORLDBOSS = 3600 +PlayerSave.Stats.SaveOnlyOnLogout = 1 # -# Rate.Corpse.Decay.Looted -# Description: Multiplier for Corpse.Decay.* to configure how long creature corpses stay -# after they have been looted. -# Default: 0.5 +# CleanCharacterDB +# Description: Clean out deprecated achievements, skills, spells and talents from the db. +# Default: 0 - (Disabled) +# 1 - (Enable) -Rate.Corpse.Decay.Looted = 0.5 +CleanCharacterDB = 0 # -# Rate.Creature.Normal.Damage -# Rate.Creature.Elite.Elite.Damage -# Rate.Creature.Elite.RARE.Damage -# Rate.Creature.Elite.RAREELITE.Damage -# Rate.Creature.Elite.WORLDBOSS.Damage -# Description: Multiplier for creature melee damage. -# Default: 1 - (Rate.Creature.Normal.Damage) -# 1 - (Rate.Creature.Elite.Elite.Damage) -# 1 - (Rate.Creature.Elite.RARE.Damage) -# 1 - (Rate.Creature.Elite.RAREELITE.Damage) -# 1 - (Rate.Creature.Elite.WORLDBOSS.Damage) +# PersistentCharacterCleanFlags +# Description: Determines the character clean flags that remain set after cleanups. +# This is a bitmask value, you can use one of the following values: # - -Rate.Creature.Normal.Damage = 1 -Rate.Creature.Elite.Elite.Damage = 1 -Rate.Creature.Elite.RARE.Damage = 1 -Rate.Creature.Elite.RAREELITE.Damage = 1 -Rate.Creature.Elite.WORLDBOSS.Damage = 1 - +# CLEANING_FLAG_ACHIEVEMENT_PROGRESS = 0x1 +# CLEANING_FLAG_SKILLS = 0x2 +# CLEANING_FLAG_SPELLS = 0x4 +# CLEANING_FLAG_TALENTS = 0x8 +# CLEANING_FLAG_QUESTSTATUS = 0x10 # -# Rate.Creature.Normal.SpellDamage -# Rate.Creature.Elite.Elite.SpellDamage -# Rate.Creature.Elite.RARE.SpellDamage -# Rate.Creature.Elite.RAREELITE.SpellDamage -# Rate.Creature.Elite.WORLDBOSS.SpellDamage -# Description: Multiplier for creature spell damage. -# Default: 1 - (Rate.Creature.Normal.SpellDamage) -# 1 - (Rate.Creature.Elite.Elite.SpellDamage) -# 1 - (Rate.Creature.Elite.RARE.SpellDamage) -# 1 - (Rate.Creature.Elite.RAREELITE.SpellDamage) -# 1 - (Rate.Creature.Elite.WORLDBOSS.SpellDamage) - -Rate.Creature.Normal.SpellDamage = 1 -Rate.Creature.Elite.Elite.SpellDamage = 1 -Rate.Creature.Elite.RARE.SpellDamage = 1 -Rate.Creature.Elite.RAREELITE.SpellDamage = 1 -Rate.Creature.Elite.WORLDBOSS.SpellDamage = 1 - +# Before use this feature, make a backup of your database. # -# Rate.Creature.Normal.HP -# Rate.Creature.Elite.Elite.HP -# Rate.Creature.Elite.RARE.HP -# Rate.Creature.Elite.RAREELITE.HP -# Rate.Creature.Elite.WORLDBOSS.HP -# Description: Multiplier for creature health. -# Default: 1 - (Rate.Creature.Normal.HP) -# 1 - (Rate.Creature.Elite.Elite.HP) -# 1 - (Rate.Creature.Elite.RARE.HP) -# 1 - (Rate.Creature.Elite.RAREELITE.HP) -# 1 - (Rate.Creature.Elite.WORLDBOSS.HP) +# Example: 14 - (CLEANING_FLAG_SKILLS + CLEANING_FLAG_SPELLS + CLEANING_FLAG_TALENTS +# 2+4+8 => 14. This will clean up skills, talents and spells will +# remain enabled after the next cleanup) +# Default: 0 - (All cleanup methods will be disabled after the next cleanup) -Rate.Creature.Normal.HP = 1 -Rate.Creature.Elite.Elite.HP = 1 -Rate.Creature.Elite.RARE.HP = 1 -Rate.Creature.Elite.RAREELITE.HP = 1 -Rate.Creature.Elite.WORLDBOSS.HP = 1 +PersistentCharacterCleanFlags = 0 # -# ListenRange.Say -# Description: Distance in which players can read say messages from creatures or -# gameobjects. -# Default: 40 - -ListenRange.Say = 40 +################################################################################################### +################################################################################################### +# CHARACTER DELETE # -# ListenRange.TextEmote -# Description: Distance in which players can read emotes from creatures or gameobjects. -# Default: 40 +# CharDelete.Method +# Description: Character deletion behavior. +# Default: 0 - (Completely remove character from the database) +# 1 - (Unlink the character from account and free up the name, Appears as +# deleted ingame) -ListenRange.TextEmote = 40 +CharDelete.Method = 0 # -# ListenRange.Yell -# Description: Distance in which players can read yell messages from creatures or -# gameobjects. -# Default: 300 +# CharDelete.MinLevel +# Description: Required level to use the unlinking method if enabled. +# Default: 0 - (Same method for every level) +# 1+ - (Only characters with the specified level will use the unlinking method) -ListenRange.Yell = 300 +CharDelete.MinLevel = 0 # -# Creature.MovingStopTimeForPlayer -# Description: Time (in milliseconds) during which creature will not move after -# interaction with player. -# Default: 180000 - -Creature.MovingStopTimeForPlayer = 180000 +# CharDelete.KeepDays +# Description: Time (in days) before unlinked characters will be removed from the database. +# Default: 30 - (Enabled) +# 0 - (Disabled, Don't delete any characters) -# WaypointMovementStopTimeForPlayer -# Description: Specifies the time (in seconds) that a creature with waypoint -# movement will wait after a player interacts with it. -# default: 120 +CharDelete.KeepDays = 30 -WaypointMovementStopTimeForPlayer = 120 +# +################################################################################################### -# NpcEvadeIfTargetIsUnreachable -# Description: Specifies the time (in seconds) that a creature whom target -# is unreachable to end up in evade mode. -# Default: 5 +################################################################################################### +# CHARACTER CREATION +# +# MinPlayerName +# Description: Minimal player name length. +# Range: 1-12 +# Default: 2 -NpcEvadeIfTargetIsUnreachable = 5 +MinPlayerName = 2 -# NpcRegenHPIfTargetIsUnreachable -# Description: Regenerates HP for Creatures in Raids if they cannot reach the target. -# Keep disabled if you are experiencing mmaps/pathing issues. # -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MinPetName +# Description: Minimal pet name length. +# Range: 1-12 +# Default: 2 -NpcRegenHPIfTargetIsUnreachable = 1 +MinPetName = 2 -# NpcRegenHPTimeIfTargetIsUnreachable -# Description: Specifies the time (in seconds) that a creature whom target -# is unreachable in raid to end up regenerate health. -# Default: 10 +# +# DeclinedNames +# Description: Allow Russian clients to set and use declined names. +# Default: 0 - (Disabled, Except when the Russian RealmZone is set) +# 1 - (Enabled) -NpcRegenHPTimeIfTargetIsUnreachable = 10 +DeclinedNames = 0 -# Creatures.CustomIDs -# Description: The list of custom creatures with gossip dialogues hardcoded in core, -# divided by "," without spaces. -# It is implied that you do not use for these NPC dialogs data from "gossip_menu" table. -# Server will skip these IDs during the definitions validation process. -# Example: Creatures.CustomIDs = "190010,55005,999991,25462,98888,601014" - Npcs for Transmog, Guild-zone, 1v1-arena, Skip Dk, -# Racial Trait Swap, NPC - All Mounts Modules -# Default: "" +# +# StrictNames.Reserved +# Description: Use the Reserved Filter from DBC. +# Prevents Player, Pet & Charter names from containing reserved names. +# Default: 1 - Enabled +# 0 - Disabled -Creatures.CustomIDs = "190010,55005,999991,25462,98888,601014,34567,34568" +StrictNames.Reserved = 1 # -################################################################################################### +# StrictNames.Profanity +# Description: Use the Profanity Filter from DBC. +# Prevents Player, Pet & Charter names from containing profanity. +# Default: 1 - Enabled +# 0 - Disabled + +StrictNames.Profanity = 1 -################################################################################################### -# CHAT SETTINGS -# -# ChatFakeMessagePreventing -# Description: Additional protection from creating fake chat messages using spaces. -# Collapses multiple subsequent whitespaces into a single whitespace. -# Not applied to the addon language, but may break old addons that use -# "normal" chat messages for sending data to other clients. -# Default: 1 - (Enabled, Blizzlike) -# 0 - (Disabled) # +# StrictPlayerNames +# Description: Limit player name to language specific symbol set. Prevents character +# creation and forces rename request if not allowed symbols are used +# Default: 0 - (Disable, Limited server timezone dependent client check) +# 1 - (Enabled, Strictly basic Latin characters) +# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, +# Note: Client needs to have the appropriate fonts installed which support +# the charset. For non-official localization, custom fonts need to be +# placed in clientdir/Fonts.) +# 3 - (Enabled, Basic Latin characters + server timezone specific) -ChatFakeMessagePreventing = 1 +StrictPlayerNames = 0 # -# ChatStrictLinkChecking.Severity -# Description: Check chat messages for in-game links to spells, items, quests, etc. -# -1 - (Only verify validity of link data, but permit use of custom colors) -# Default: 0 - (Only verify that link data and color are valid without checking text) -# 1 - (Additionally verifies that the link text matches the provided data) -# -# Note: If this is set to '1', you must additionally provide .dbc files for all -# client locales that are in use on your server. -# If any files are missing, messages with links from clients using those -# locales will likely be blocked by the server. -# +# StrictPetNames +# Description: Limit pet names to language specific symbol set. +# Prevents pet naming if not allowed symbols are used. +# Default: 0 - (Disable, Limited server timezone dependent client check) +# 1 - (Enabled, Strictly basic Latin characters) +# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, +# Note: Client needs to have the appropriate fonts installed which support +# the charset. For non-official localization, custom fonts need to be +# placed in clientdir/Fonts.) +# 3 - (Enabled, Basic Latin characters + server timezone specific) -ChatStrictLinkChecking.Severity = 0 +StrictPetNames = 0 # -# ChatStrictLinkChecking.Kick -# Description: Defines what should be done if a message containing invalid control characters -# is received. -# Default: 0 - (Silently ignore message) -# 1 - (Ignore message and kick player) +# CharacterCreating.Disabled +# Description: Disable character creation for players based on faction. +# Default: 0 - (Enabled, All factions are allowed) +# 1 - (Disabled, Alliance) +# 2 - (Disabled, Horde) +# 3 - (Disabled, Both factions) + +CharacterCreating.Disabled = 0 + # +# CharacterCreating.Disabled.RaceMask +# Description: Mask of races which cannot be created by players. +# Example: 1536 - (1024 + 512, Blood Elf and Draenei races are disabled) +# Default: 0 - (Enabled, All races are allowed) +# 1 - (Disabled, Human) +# 2 - (Disabled, Orc) +# 4 - (Disabled, Dwarf) +# 8 - (Disabled, Night Elf) +# 16 - (Disabled, Undead) +# 32 - (Disabled, Tauren) +# 64 - (Disabled, Gnome) +# 128 - (Disabled, Troll) +# 512 - (Disabled, Blood Elf) +# 1024 - (Disabled, Draenei) -ChatStrictLinkChecking.Kick = 0 +CharacterCreating.Disabled.RaceMask = 0 # -# ChatFlood.MessageCount -# Description: Chat flood protection, number of messages before player gets muted. -# Default: 10 - (Enabled) -# 0 - (Disabled) +# CharacterCreating.Disabled.ClassMask +# Description: Mask of classes which cannot be created by players. +# Example: 288 - (32 + 256, Death Knight and Warlock classes are disabled) +# Default: 0 - (Enabled, All classes are allowed) +# 1 - (Disabled, Warrior) +# 2 - (Disabled, Paladin) +# 4 - (Disabled, Hunter) +# 8 - (Disabled, Rogue) +# 16 - (Disabled, Priest) +# 32 - (Disabled, Death Knight) +# 64 - (Disabled, Shaman) +# 128 - (Disabled, Mage) +# 256 - (Disabled, Warlock) +# 1024 - (Disabled, Druid) -ChatFlood.MessageCount = 10 +CharacterCreating.Disabled.ClassMask = 0 # -# ChatFlood.MessageDelay -# Description: Time (in seconds) between messages to be counted into ChatFlood.MessageCount. -# Default: 1 +# CharactersPerAccount +# Description: Limit number of characters per account on all realms on this realmlist. +# Important: Number must be >= CharactersPerRealm +# Default: 50 -ChatFlood.MessageDelay = 1 +CharactersPerAccount = 50 # -# ChatFlood.AddonMessageCount -# Description: Chat flood protection, number of addon messages before player gets muted. -# Default: 100 - (Enabled) -# 0 - (Disabled) +# CharactersPerRealm +# Description: Limit number of characters per account on this realm. +# Range: 1-10 +# Default: 10 - (Client limitation) -ChatFlood.AddonMessageCount = 100 +CharactersPerRealm = 10 # -# ChatFlood.AddonMessageDelay -# Description: Time (in seconds) between addon messages to be counted into ChatFlood.AddonMessageCount. +# HeroicCharactersPerRealm +# Description: Limit number of heroic class characters per account on this realm. +# Range: 1-10 # Default: 1 -ChatFlood.AddonMessageDelay = 1 +HeroicCharactersPerRealm = 1 # -# ChatFlood.MuteTime -# Description: Time (in seconds) characters get muted for violating ChatFlood.MessageCount / ChatFlood.AddonMessageCount. -# Default: 10 +# CharacterCreating.MinLevelForHeroicCharacter +# Description: Limit creating heroic characters only for account with another +# character of specific level (ignored for GM accounts) +# Default: 55 - (Enabled, Requires at least another level 55 character) +# 0 - (Disabled) +# 1 - (Enabled, Requires at least another level 1 character) -ChatFlood.MuteTime = 10 +CharacterCreating.MinLevelForHeroicCharacter = 55 # -# Chat.MuteFirstLogin -# Description: Speaking is allowed after playing for Chat.MuteTimeFirstLogin minutes. You may use party and guild chat. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# StartPlayerLevel +# Description: Starting level for characters after creation. +# Range: 1-MaxPlayerLevel +# Default: 1 -Chat.MuteFirstLogin = 0 +StartPlayerLevel = 1 # -# Chat.MuteTimeFirstLogin -# Description: The time after which the player will be able to speak. -# Default: 120 - (Minutes) +# StartHeroicPlayerLevel +# Description: Staring level for heroic class characters after creation. +# Range: 1-MaxPlayerLevel +# Default: 55 -Chat.MuteTimeFirstLogin = 120 +StartHeroicPlayerLevel = 55 # -# Channel.RestrictedLfg -# Description: Restrict LookupForGroup channel to characters registered in the LFG tool. -# Default: 1 - (Enabled, Allow join to channel only if registered in LFG) -# 0 - (Disabled, Allow join to channel in any time) +# SkipCinematics +# Description: Disable cinematic intro at first login after character creation. +# Prevents buggy intros in case of custom start location coordinates. +# Default: 0 - (Show intro for each new character) +# 1 - (Show intro only for first character of selected race) +# 2 - (Disable intro for all classes) -Channel.RestrictedLfg = 1 +SkipCinematics = 0 # -# Channel.SilentlyGMJoin -# Description: Silently join GM characters to channels. If set to 1, channel kick and ban -# commands issued by a GM will not be broadcasted. -# Default: 0 - (Disabled, Join with announcement) -# 1 - (Enabled, Join without announcement) - -Channel.SilentlyGMJoin = 0 - -# Channel.ModerationGMLevel -# Min GM account security level required for executing moderator in-game commands in the channels -# This also bypasses password prompts on joining channels which require password -# 0 (in-game channel moderator privileges only) -# Default: 1 (enabled for moderators and above) +# StartPlayerMoney +# Description: Amount of money (in Copper) that a character has after creation. +# Default: 0 +# 100 - (1 Silver) -Channel.ModerationGMLevel = 1 +StartPlayerMoney = 0 # -# ChatLevelReq.Channel -# Description: Level requirement for characters to be able to write in chat channels. -# Default: 1 +# StartHeroicPlayerMoney +# Description: Amount of money (in Copper) that heroic class characters have after creation. +# Default: 2000 +# 2000 - (20 Silver) -ChatLevelReq.Channel = 1 +StartHeroicPlayerMoney = 2000 # -# ChatLevelReq.Whisper -# Description: Level requirement for characters to be able to whisper other characters. -# Default: 1 +# PlayerStart.String +# Description: String to be displayed at first login of newly created characters. +# Default: "" - (Disabled) -ChatLevelReq.Whisper = 1 +PlayerStart.String = "" # -# ChatLevelReq.Say -# Description: Level requirement for characters to be able to use say/yell/emote. -# Default: 1 - -ChatLevelReq.Say = 1 +################################################################################################### +################################################################################################### +# CHARACTER # -# PartyLevelReq -# Description: Minimum level at which players can invite to group, even if they aren't on -# the invite friends list. (Players who are on that friend list can always -# invite despite having lower level) -# Default: 1 +# EnablePlayerSettings +# Description: Enables the usage of character specific settings. +# Default: 0 - Disabled +# 1 - Enabled -PartyLevelReq = 1 +EnablePlayerSettings = 0 # -# AllowPlayerCommands -# Description: Allow players to use commands. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# MaxPlayerLevel +# Description: Maximum level that can be reached by players. +# Important: Levels beyond 100 are not recommended at all. +# Range: 1-255 +# Default: 80 -AllowPlayerCommands = 1 +MaxPlayerLevel = 80 # -# PreserveCustomChannels -# Description: Store custom chat channel settings like password, automatic ownership handout -# or ban list in the database. Needs to be enabled to save custom -# world/trade/etc. channels that have automatic ownership handout disabled. -# (.channel set ownership $channel off) -# Default: 0 - (Disabled, Blizzlike, Channel settings are lost if last person left) -# 1 - (Enabled) +# MinDualSpecLevel +# Description: Level requirement for Dual Talent Specialization +# Default: 40 -PreserveCustomChannels = 1 +MinDualSpecLevel = 40 # -# PreserveCustomChannelDuration -# Description: Time (in days) that needs to pass before the customs chat channels get -# cleaned up from the database. Only channels with ownership handout enabled -# (default behavior) will be cleaned. -# Default: 14 - (Enabled, Clean channels that haven't been used for 14 days) -# 0 - (Disabled, Infinite channel storage) +# WaterBreath.Timer +# Description: The timer for player's breath underwater in milliseconds +# Default: 180000 (3 minutes) +# -PreserveCustomChannelDuration = 14 +WaterBreath.Timer = 180000 # -################################################################################################### +# EnableLowLevelRegenBoost +# Description: Greatly increase Health and Mana regen rates for players under level 15 (Added in patch 3.3) +# Default: 1 - Enabled +# 0 - Disabled +# + +EnableLowLevelRegenBoost = 1 -################################################################################################### -# GAME MASTER SETTINGS # -# GM.LoginState -# Description: GM mode at login. -# Default: 2 - (Last save state) -# 0 - (Disable) -# 1 - (Enable) +# Rate.MoveSpeed +# Description: Movement speed rate. +# Default: 1 -GM.LoginState = 2 +Rate.MoveSpeed = 1 # -# GM.Visible -# Description: GM visibility at login. -# Default: 2 - (Last save state) -# 0 - (Invisible) -# 1 - (Visible) +# Rate.Damage.Fall +# Description: Damage after fall rate. +# Default: 1 -GM.Visible = 2 +Rate.Damage.Fall = 1 # -# GM.Chat -# Description: GM chat mode at login. -# Default: 2 - (Last save state) -# 0 - (Disable) -# 1 - (Enable) +# Rate.Talent +# Description: Talent point rate. +# Default: 1 -GM.Chat = 2 +Rate.Talent = 1 # -# GM.WhisperingTo -# Description: Is GM accepting whispers from player by default or not. -# Default: 2 - (Last save state) -# 0 - (Disable) -# 1 - (Enable) +# Rate.Health +# Rate.Mana +# Rate.Rage.Income +# Rate.Rage.Loss +# Rate.RunicPower.Income +# Rate.RunicPower.Loss +# Rate.Focus +# Rate.Energy +# Rate.Loyalty +# Description: Multiplier to configure health, mana, incoming rage, loss of rage, focus +# energy and loyalty increase or decrease. +# Default: 1 - (Rate.Health) +# 1 - (Rate.Mana) +# 1 - (Rate.Rage.Income) +# 1 - (Rate.Rage.Loss) +# 1 - (Rate.RunicPower.Income) +# 1 - (Rate.RunicPower.Loss) +# 1 - (Rate.Focus) +# 1 - (Rate.Energy) +# 1 - (Rate.Loyalty) -GM.WhisperingTo = 2 +Rate.Health = 1 +Rate.Mana = 1 +Rate.Rage.Income = 1 +Rate.Rage.Loss = 1 +Rate.RunicPower.Income = 1 +Rate.RunicPower.Loss = 1 +Rate.Focus = 1 +Rate.Energy = 1 +Rate.Loyalty = 1 # -# GM.InGMList.Level -# Description: Maximum GM level shown in GM list (if enabled) in non-GM state (.gm off). -# Default: 3 - (Anyone) -# 0 - (Only players) -# 1 - (Only moderators) -# 2 - (Only gamemasters) +# Rate.Rest.InGame +# Rate.Rest.Offline.InTavernOrCity +# Rate.Rest.Offline.InWilderness +# Description: Resting points grow rates. +# Default: 1 - (Rate.Rest.InGame) +# 1 - (Rate.Rest.Offline.InTavernOrCity) +# 1 - (Rate.Rest.Offline.InWilderness) -GM.InGMList.Level = 3 +Rate.Rest.InGame = 1 +Rate.Rest.Offline.InTavernOrCity = 1 +Rate.Rest.Offline.InWilderness = 1 # -# GM.InWhoList.Level -# Description: Max GM level showed in who list (if visible). -# Default: 3 - (Anyone) -# 0 - (Only players) -# 1 - (Only moderators) -# 2 - (Only gamemasters) +# Rate.MissChanceMultiplier.Creature +# Rate.MissChanceMultiplier.Player +# Rate.MissChanceMultiplier.OnlyAffectsPlayer +# +# Description: When the target is 3 or more level higher than the player, +# the chance to hit is determined by the formula: 94 - (levelDiff - 2) * Rate.MissChanceMultiplier +# The higher the Rate.MissChanceMultiplier constant, the higher is the chance to miss. +# +# Note: this does not affect when the player is less than 3 levels different than the target, +# where this (linear) formula is used instead to calculate the hit chance: 96 - levelDiff. +# You can set Rate.MissChanceMultiplier.OnlyAffectsPlayer to 1 if you only want to affect the MissChance +# for player casters only. This way you won't be affecting creature missing chance. +# +# Example: if you want the chance to keep growing linearly, use 1. +# +# Default: Rate.MissChanceMultiplier.TargetCreature = 11 +# Rate.MissChanceMultiplier.TargetPlayer = 7 +# Rate.MissChanceMultiplier.OnlyAffectsPlayer = 0 +# -GM.InWhoList.Level = 3 +Rate.MissChanceMultiplier.TargetCreature = 11 +Rate.MissChanceMultiplier.TargetPlayer = 7 +Rate.MissChanceMultiplier.OnlyAffectsPlayer = 0 # -# GM.StartLevel -# Description: GM character starting level. +# LevelReq.Trade +# Description: Level requirement for characters to be able to trade. # Default: 1 -GM.StartLevel = 1 +LevelReq.Trade = 1 # -# GM.AllowInvite -# Description: Allow players to invite GM characters. +# NoResetTalentsCost +# Description: Resetting talents doesn't cost anything. # Default: 0 - (Disabled) # 1 - (Enabled) -GM.AllowInvite = 0 +NoResetTalentsCost = 0 # -# GM.AllowFriend -# Description: Allow players to add GM characters to their friends list. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# ToggleXP.Cost +# Description: Cost of locking/unlocking XP +# Default: 100000 - (10 Gold) +# -GM.AllowFriend = 0 +ToggleXP.Cost = 100000 # -# GM.LowerSecurity -# Description: Allow lower security levels to use commands on higher security level -# characters. -# Default: 0 - (Disabled) -# 1 - (Enabled) +################################################################################################### -GM.LowerSecurity = 0 +################################################################################################### +# SKILL +# +# MaxPrimaryTradeSkill +# Description: Maximum number of primary professions a character can learn. +# Range: 0-11 +# Default: 2 + +MaxPrimaryTradeSkill = 2 # -# GM.TicketSystem.ChanceOfGMSurvey -# Description: Chance of sending a GM survey after ticket completion. -# Default: 50 - (Enabled) -# 0 - (Disabled) +# SkillChance.Prospecting +# Description: Allow skill increase from prospecting. +# Default: 0 - (Disabled) +# 1 - (Enabled) -GM.TicketSystem.ChanceOfGMSurvey = 50 +SkillChance.Prospecting = 0 # -################################################################################################### +# SkillChance.Milling +# Description: Allow skill increase from milling. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +SkillChance.Milling = 0 -################################################################################################### -# VISIBILITY AND DISTANCES # -# Visibility.GroupMode -# Description: Group visibility modes. Defines which groups can aways detect invisible -# characters of the same raid, group or faction. -# Default: 1 - (Raid) -# 0 - (Party) -# 2 - (Faction) +# Rate.Skill.Discovery +# Description: Multiplier for skill discovery. +# Default: 1 -Visibility.GroupMode = 1 +Rate.Skill.Discovery = 1 # -# Visibility.Distance.Continents -# Visibility.Distance.Instances -# Visibility.Distance.BGArenas -# Description: Visibility distance to see other players or gameobjects. -# Visibility on continents on retail ~90 yards. In BG/Arenas ~180. -# For instances default ~120. -# Max limited by active player zone: ~ 333 -# Min limit is max aggro radius (45) * Rate.Creature.Aggro -# Default: 90 - (Visibility.Distance.Continents) -# 120 - (Visibility.Distance.Instances) -# 180 - (Visibility.Distance.BGArenas) +# SkillGain.Crafting +# SkillGain.Defense +# SkillGain.Gathering +# SkillGain.Weapon +# Description: Crafting/defense/gathering/weapon skills gain rate. +# Default: 1 - (SkillGain.Crafting) +# 1 - (SkillGain.Defense) +# 1 - (SkillGain.Gathering) +# 1 - (SkillGain.Weapon) -Visibility.Distance.Continents = 90 -Visibility.Distance.Instances = 120 -Visibility.Distance.BGArenas = 180 +SkillGain.Crafting = 1 +SkillGain.Defense = 1 +SkillGain.Gathering = 1 +SkillGain.Weapon = 1 # -# Visibility.Notify.Period.OnContinents -# Visibility.Notify.Period.InInstances -# Visibility.Notify.Period.InBGArenas -# Description: Time (in milliseconds) for visibility update period. Lower values may have -# performance impact. -# Default: 1000 - (Visibility.Notify.Period.OnContinents) -# 1000 - (Visibility.Notify.Period.InInstances) -# 1000 - (Visibility.Notify.Period.InBGArenas) +# SkillChance.Orange +# SkillChance.Yellow +# SkillChance.Green +# SkillChance.Grey +# Description: Chance to increase skill based on recipe color. +# Default: 100 - (SkillChance.Orange) +# 75 - (SkillChance.Yellow) +# 25 - (SkillChance.Green) +# 0 - (SkillChance.Grey) -Visibility.Notify.Period.OnContinents = 1000 -Visibility.Notify.Period.InInstances = 1000 -Visibility.Notify.Period.InBGArenas = 1000 +SkillChance.Orange = 100 +SkillChance.Yellow = 75 +SkillChance.Green = 25 +SkillChance.Grey = 0 # -# Visibility.ObjectSparkles -# Description: Whether or not to display sparkles on gameobjects related to active quests. -# Default: 1 - (Show Sparkles) -# 0 - (Hide Sparkles) +# SkillChance.MiningSteps +# SkillChance.SkinningSteps +# Description: Skinning and Mining chance decreases with skill level. +# Default: 0 - (Disabled) +# 75 - (In 2 times each 75 skill points) -Visibility.ObjectSparkles = 1 +SkillChance.MiningSteps = 0 +SkillChance.SkinningSteps = 0 # -# Visibility.ObjectQuestMarkers -# Description: Show quest icons above game objects in the same way as creature quest givers. -# Default: 1 - (Show quest markers, post patch 2.3 behavior) -# 0 - (Hide quest markers, pre patch 2.3 behavior) +# OffhandCheckAtSpellUnlearn +# Description: Unlearning certain spells can change offhand weapon restrictions +# for equip slots. +# Default: 1 - (Recheck offhand slot weapon at unlearning a spell) +# 0 - (Recheck offhand slot weapon only at zone update) -Visibility.ObjectQuestMarkers = 1 +OffhandCheckAtSpellUnlearn = 1 # ################################################################################################### ################################################################################################### -# SERVER RATES +# STATS # -# Rate.Health -# Rate.Mana -# Rate.Rage.Income -# Rate.Rage.Loss -# Rate.RunicPower.Income -# Rate.RunicPower.Loss -# Rate.Focus -# Rate.Energy -# Rate.Loyalty -# Description: Multiplier to configure health, mana, incoming rage, loss of rage, focus -# energy and loyalty increase or decrease. -# Default: 1 - (Rate.Health) -# 1 - (Rate.Mana) -# 1 - (Rate.Rage.Income) -# 1 - (Rate.Rage.Loss) -# 1 - (Rate.RunicPower.Income) -# 1 - (Rate.RunicPower.Loss) -# 1 - (Rate.Focus) -# 1 - (Rate.Energy) -# 1 - (Rate.Loyalty) +# Stats.Limits.Enable +# Description: Enable or disable stats system limitations +# Default: 0 - Disabled +# 1 - Enabled -Rate.Health = 1 -Rate.Mana = 1 -Rate.Rage.Income = 1 -Rate.Rage.Loss = 1 -Rate.RunicPower.Income = 1 -Rate.RunicPower.Loss = 1 -Rate.Focus = 1 -Rate.Energy = 1 -Rate.Loyalty = 1 +Stats.Limits.Enable = 0 # -# Rate.Skill.Discovery -# Description: Multiplier for skill discovery. -# Default: 1 +# Stats.Limit.[STAT] +# Description: Set percentage limit for dodge, parry, block and crit rating +# Default: 95.0 (95%) -Rate.Skill.Discovery = 1 +Stats.Limits.Dodge = 95.0 +Stats.Limits.Parry = 95.0 +Stats.Limits.Block = 95.0 +Stats.Limits.Crit = 95.0 # -# Rate.Drop.Item.Poor -# Rate.Drop.Item.Normal -# Rate.Drop.Item.Uncommon -# Rate.Drop.Item.Rare -# Rate.Drop.Item.Epic -# Rate.Drop.Item.Legendary -# Rate.Drop.Item.Artifact -# Rate.Drop.Item.Referenced -# Rate.Drop.Money -# Description: Drop rates for money and items based on quality. -# Default: 1 - (Rate.Drop.Item.Poor) -# 1 - (Rate.Drop.Item.Normal) -# 1 - (Rate.Drop.Item.Uncommon) -# 1 - (Rate.Drop.Item.Rare) -# 1 - (Rate.Drop.Item.Epic) -# 1 - (Rate.Drop.Item.Legendary) -# 1 - (Rate.Drop.Item.Artifact) -# 1 - (Rate.Drop.Item.Referenced) -# 1 - (Rate.Drop.Money) - -Rate.Drop.Item.Poor = 1 -Rate.Drop.Item.Normal = 1 -Rate.Drop.Item.Uncommon = 1 -Rate.Drop.Item.Rare = 1 -Rate.Drop.Item.Epic = 1 -Rate.Drop.Item.Legendary = 1 -Rate.Drop.Item.Artifact = 1 -Rate.Drop.Item.Referenced = 1 -Rate.Drop.Money = 1 +################################################################################################### -# Rate.Drop.Item.ReferencedAmount -# Description: Multiplier for referenced loot amount. Makes many raid bosses (and others) drop additional loot. +################################################################################################### +# REPUTATION +# +# Rate.Reputation.Gain +# Description: Reputation gain rate. # Default: 1 -Rate.Drop.Item.ReferencedAmount = 1 +Rate.Reputation.Gain = 1 # -# Rate.Drop.Item.GroupAmount -# Description: Multiplier for grouped items. Makes many dungeon bosses (and others) drop additional loot. +# Rate.Reputation.LowLevel.Kill +# Description: Reputation gain from killing low level (grey) creatures. # Default: 1 -Rate.Drop.Item.GroupAmount = 1 +Rate.Reputation.LowLevel.Kill = 1 -# Rate.RewardBonusMoney -# Description: Allows to further tweak the amount of extra money rewarded by quests when the player -# is at MaxPlayerLevel (this amount is specified in quest_template.RewardBonusMoney). -# NOTE: the final amount will also affected by Rate.Drop.Money +# +# Rate.Reputation.LowLevel.Quest +# Description: Reputation gain rate. # Default: 1 -Rate.RewardBonusMoney = 1 +Rate.Reputation.LowLevel.Quest = 1 # -# Rate.SellValue.Item.Poor -# Rate.SellValue.Item.Normal -# Rate.SellValue.Item.Uncommon -# Rate.SellValue.Item.Rare -# Rate.SellValue.Item.Epic -# Rate.SellValue.Item.Legendary -# Rate.SellValue.Item.Artifact -# Rate.SellValue.Item.Heirloom -# Description: Item Sale Value rates based on quality. -# Default: 1 - (Rate.SellValue.Item.Poor) -# 1 - (Rate.SellValue.Item.Normal) -# 1 - (Rate.SellValue.Item.Uncommon) -# 1 - (Rate.SellValue.Item.Rare) -# 1 - (Rate.SellValue.Item.Epic) -# 1 - (Rate.SellValue.Item.Legendary) -# 1 - (Rate.SellValue.Item.Artifact) -# 1 - (Rate.SellValue.Item.Heirloom) +# Rate.Reputation.RecruitAFriendBonus +# Description: Reputation bonus rate for recruit-a-friend. +# Default: 0.1 -Rate.SellValue.Item.Poor = 1 -Rate.SellValue.Item.Normal = 1 -Rate.SellValue.Item.Uncommon = 1 -Rate.SellValue.Item.Rare = 1 -Rate.SellValue.Item.Epic = 1 -Rate.SellValue.Item.Legendary = 1 -Rate.SellValue.Item.Artifact = 1 -Rate.SellValue.Item.Heirloom = 1 +Rate.Reputation.RecruitAFriendBonus = 0.1 # -# Rate.BuyValue.Item.Poor -# Rate.BuyValue.Item.Normal -# Rate.BuyValue.Item.Uncommon -# Rate.BuyValue.Item.Rare -# Rate.BuyValue.Item.Epic -# Rate.BuyValue.Item.Legendary -# Rate.BuyValue.Item.Artifact -# Rate.BuyValue.Item.Heirloom -# Description: Item Sale Value rates based on quality. -# Default: 1 - (Rate.BuyValue.Item.Poor) -# 1 - (Rate.BuyValue.Item.Normal) -# 1 - (Rate.BuyValue.Item.Uncommon) -# 1 - (Rate.BuyValue.Item.Rare) -# 1 - (Rate.BuyValue.Item.Epic) -# 1 - (Rate.BuyValue.Item.Legendary) -# 1 - (Rate.BuyValue.Item.Artifact) -# 1 - (Rate.BuyValue.Item.Heirloom) +################################################################################################### -Rate.BuyValue.Item.Poor = 1 -Rate.BuyValue.Item.Normal = 1 -Rate.BuyValue.Item.Uncommon = 1 -Rate.BuyValue.Item.Rare = 1 -Rate.BuyValue.Item.Epic = 1 -Rate.BuyValue.Item.Legendary = 1 -Rate.BuyValue.Item.Artifact = 1 -Rate.BuyValue.Item.Heirloom = 1 +################################################################################################### +# EXPERIENCE +# +# MaxGroupXPDistance +# Description: Max distance to creature for group member to get experience at creature +# death. +# Default: 74 + +MaxGroupXPDistance = 74 # # Rate.XP.Kill @@ -2380,1154 +2337,1492 @@ Rate.XP.BattlegroundKillSOTA = 1 Rate.XP.BattlegroundKillIC = 1 # -# Rate.RepairCost -# Description: Repair cost rate. +# Rate.Pet.LevelXP +# Description: Modifies the amount of experience required to level up a pet. +# The lower the rate the less experience is required. +# Default: 0.05 +# + +Rate.Pet.LevelXP = 0.05 + +# +################################################################################################### + +################################################################################################### +# CURRENCY +# +# MaxHonorPoints +# Description: Maximum honor points a character can have. +# Default: 75000 + +MaxHonorPoints = 75000 + +# +# MaxHonorPointsMoneyPerPoint +# Description: Convert excess honor points into money if players got more points than allowed after changing the honor cap. +# Honor points will be converted into copper according to the value set in this config. +# Default: 0 - Disabled + +MaxHonorPointsMoneyPerPoint = 0 + +# +# StartHonorPoints +# Description: Amount of honor points that characters have after creation. +# Default: 0 + +StartHonorPoints = 0 + +# +# HonorPointsAfterDuel +# Description: Amount of honor points the duel winner will get after a duel. +# Default: 0 - (Disabled) +# 1+ - (Enabled) + +HonorPointsAfterDuel = 0 + +# +# Rate.Honor +# Description: Honor gain rate. # Default: 1 -Rate.RepairCost = 1 +Rate.Honor = 1 # -# Rate.Rest.InGame -# Rate.Rest.Offline.InTavernOrCity -# Rate.Rest.Offline.InWilderness -# Description: Resting points grow rates. -# Default: 1 - (Rate.Rest.InGame) -# 1 - (Rate.Rest.Offline.InTavernOrCity) -# 1 - (Rate.Rest.Offline.InWilderness) +# MaxArenaPoints +# Description: Maximum arena points a character can have. +# Default: 10000 + +MaxArenaPoints = 10000 + +# +# StartArenaPoints +# Description: Amount of arena points that characters has after creation. +# Default: 0 + +StartArenaPoints = 0 + +# +# Arena.LegacyArenaPoints +# Description: Use arena point calculation from TBC for season 1 - 5 when rating is less or equal to 1500 +# Default: 1 - (Enabled) +# 0 - (Disabled) + +Arena.LegacyArenaPoints = 0 + +# +# Rate.ArenaPoints +# Description: Arena points gain rate. +# Default: 1 + +Rate.ArenaPoints = 1 + +# +# PvPToken.Enable +# Description: Character will receive a token after defeating another character that yields +# honor. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +PvPToken.Enable = 0 + +# +# PvPToken.MapAllowType +# Description: Define where characters can receive tokens. +# Default: 4 - (All maps) +# 3 - (Battlegrounds) +# 2 - (FFA areas only like Gurubashi arena) +# 1 - (Battlegrounds and FFA areas) + +PvPToken.MapAllowType = 4 + +# +# PvPToken.ItemID +# Description: Item characters will receive after defeating another character if PvP Token +# system is enabled. +# Default: 29434 - (Badge of justice) + +PvPToken.ItemID = 29434 + +# +# PvPToken.ItemCount +# Description: Number of tokens a character will receive. +# Default: 1 + +PvPToken.ItemCount = 1 + +# +################################################################################################### + +################################################################################################### +# DURABILITY +# +# DurabilityLoss.InPvP +# Description: Durability loss on death during PvP. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +DurabilityLoss.InPvP = 0 + +# +# DurabilityLoss.OnDeath +# Description: Durability loss percentage on death. +# Note: On 3.3.5 client always shows log message "Your items have lost 10% durability" +# Default: 10 + +DurabilityLoss.OnDeath = 10 + +# +# DurabilityLossChance.Damage +# Description: Chance to lose durability on one equipped item from damage. +# Default: 0.5 - (100/0.5 = 200, Each 200 damage one equipped item will use durability) + +DurabilityLossChance.Damage = 0.5 + +# +# DurabilityLossChance.Absorb +# Description: Chance to lose durability on one equipped armor item when absorbing damage. +# Default: 0.5 - (100/0.5 = 200, Each 200 absorbed damage one equipped item will lose +# durability) + +DurabilityLossChance.Absorb = 0.5 + +# +# DurabilityLossChance.Parry +# Description: Chance to lose durability on main weapon when parrying attacks. +# Default: 0.05 - (100/0.05 = 2000, Each 2000 parried damage the main weapon will lose +# durability) + +DurabilityLossChance.Parry = 0.05 + +# +# DurabilityLossChance.Block +# Description: Chance to lose durability on shield when blocking attacks. +# Default: 0.05 - (100/0.05 = 2000, Each 2000 blocked damage the shield will lose +# durability) + +DurabilityLossChance.Block = 0.05 + +# +################################################################################################### + +################################################################################################### +# DEATH +# +# Death.SicknessLevel +# Description: Starting level for resurrection sickness. +# Example: 11 - (Level 1-10 characters will not be affected, +# Level 11-19 characters will be affected for 1 minute, +# Level 20-MaxPlayerLevel characters will be affected for 10 minutes) +# Default: 11 - (Enabled, See Example) +# MaxPlayerLevel+1 - (Disabled) +# -10 - (Enabled, Level 1+ characters have 10 minute duration) + +Death.SicknessLevel = 11 + +# +# Death.CorpseReclaimDelay.PvP +# Death.CorpseReclaimDelay.PvE +# Description: Increase corpse reclaim delay at PvP/PvE deaths. +# Default: 1 - (Enabled) +# 0 - (Disabled) + +Death.CorpseReclaimDelay.PvP = 1 +Death.CorpseReclaimDelay.PvE = 0 + +# +# Death.Bones.World +# Death.Bones.BattlegroundOrArena +# Description: Create bones instead of corpses at resurrection in normal zones, instances, +# battleground or arenas. +# Default: 1 - (Enabled, Death.Bones.World) +# 1 - (Enabled, Death.Bones.BattlegroundOrArena) +# 0 - (Disabled) + +Death.Bones.World = 1 +Death.Bones.BattlegroundOrArena = 1 + +# +################################################################################################### + +################################################################################################### +# PET +# +# Pet.RankMod.Health +# Description: Allows pet health to be modified by rank health rates (set in config) +# Default: 1 - Enabled +# 0 - Disabled + +Pet.RankMod.Health = 1 + +# +################################################################################################### + +################################################################################################### +# ITEM DELETE +# +# ItemDelete.Method +# Description: Item deletion behavior. +# Default: 0 - (Completely remove item from the database) +# 1 - (Save Item to database) + +ItemDelete.Method = 0 + +# +# ItemDelete.Vendor +# Description: Saving items into database when the player sells items to vendor +# Default: 0 (disabled) +# 1 (enabled) +# + +ItemDelete.Vendor = 0 + +# +# ItemDelete.Quality +# Description: Saving items into database that have quality greater or equal to ItemDelete.Quality +# +# ID | Color | Quality +# 0 | Grey | Poor +# 1 | White | Common +# 2 | Green | Uncommon +# 3 | Blue | Rare +# 4 | Purple| Epic +# 5 | Orange| Legendary +# 6 | Red | Artifact +# 7 | Gold | Bind to Account +# +# Default: 3 +# -Rate.Rest.InGame = 1 -Rate.Rest.Offline.InTavernOrCity = 1 -Rate.Rest.Offline.InWilderness = 1 +ItemDelete.Quality = 3 # -# Rate.Damage.Fall -# Description: Damage after fall rate. -# Default: 1 +# ItemDelete.ItemLevel +# Description: Saving items into database that are Item Levels greater or equal to ItemDelete.ItemLevel +# Default: 80 +# -Rate.Damage.Fall = 1 +ItemDelete.ItemLevel = 80 # -# Rate.Auction.Time -# Rate.Auction.Deposit -# Rate.Auction.Cut -# Description: Auction rates (auction time, deposit get at auction start, -# auction cut from price at auction end) -# Default: 1 - (Rate.Auction.Time) -# 1 - (Rate.Auction.Deposit) -# 1 - (Rate.Auction.Cut) - -Rate.Auction.Time = 1 -Rate.Auction.Deposit = 1 -Rate.Auction.Cut = 1 +################################################################################################### +################################################################################################### +# ITEM # -# Rate.Honor -# Description: Honor gain rate. -# Default: 1 +# DBC.EnforceItemAttributes +# Disallow overriding item attributes stored in DBC files with values from the database +# Default: 0 - Off, Use DB values +# 1 - On, Enforce DBC Values (default) -Rate.Honor = 1 +DBC.EnforceItemAttributes = 1 # -# Rate.ArenaPoints -# Description: Arena points gain rate. -# Default: 1 +# Rate.Drop.Item.Poor +# Rate.Drop.Item.Normal +# Rate.Drop.Item.Uncommon +# Rate.Drop.Item.Rare +# Rate.Drop.Item.Epic +# Rate.Drop.Item.Legendary +# Rate.Drop.Item.Artifact +# Rate.Drop.Item.Referenced +# Rate.Drop.Money +# Description: Drop rates for money and items based on quality. +# Default: 1 - (Rate.Drop.Item.Poor) +# 1 - (Rate.Drop.Item.Normal) +# 1 - (Rate.Drop.Item.Uncommon) +# 1 - (Rate.Drop.Item.Rare) +# 1 - (Rate.Drop.Item.Epic) +# 1 - (Rate.Drop.Item.Legendary) +# 1 - (Rate.Drop.Item.Artifact) +# 1 - (Rate.Drop.Item.Referenced) +# 1 - (Rate.Drop.Money) -Rate.ArenaPoints = 1 +Rate.Drop.Item.Poor = 1 +Rate.Drop.Item.Normal = 1 +Rate.Drop.Item.Uncommon = 1 +Rate.Drop.Item.Rare = 1 +Rate.Drop.Item.Epic = 1 +Rate.Drop.Item.Legendary = 1 +Rate.Drop.Item.Artifact = 1 +Rate.Drop.Item.Referenced = 1 +Rate.Drop.Money = 1 -# -# Rate.Talent -# Description: Talent point rate. +# Rate.Drop.Item.ReferencedAmount +# Description: Multiplier for referenced loot amount. Makes many raid bosses (and others) drop additional loot. # Default: 1 -Rate.Talent = 1 +Rate.Drop.Item.ReferencedAmount = 1 # -# Rate.Reputation.Gain -# Description: Reputation gain rate. +# Rate.Drop.Item.GroupAmount +# Description: Multiplier for grouped items. Makes many dungeon bosses (and others) drop additional loot. # Default: 1 -Rate.Reputation.Gain = 1 +Rate.Drop.Item.GroupAmount = 1 # -# Rate.Reputation.LowLevel.Kill -# Description: Reputation gain from killing low level (grey) creatures. -# Default: 1 +# LootNeedBeforeGreedILvlRestriction +# Description: Specify level restriction for items below player's subclass in Need Before Greed loot mode in DF groups +# Default: 70 +# 0 - Disabled -Rate.Reputation.LowLevel.Kill = 1 +LootNeedBeforeGreedILvlRestriction = 70 # -# Rate.Reputation.LowLevel.Quest -# Description: Reputation gain rate. -# Default: 1 +# Item.SetItemTradeable +# Description: Enabled/Disabled trading BoP items among raid members. +# Default: 1 - (Set BoP items tradeable timer to 2 hours) +# 0 - (Disable trading BoP items among raid members) -Rate.Reputation.LowLevel.Quest = 1 +Item.SetItemTradeable = 1 # -# Rate.Reputation.RecruitAFriendBonus -# Description: Reputation bonus rate for recruit-a-friend. -# Default: 0.1 - -Rate.Reputation.RecruitAFriendBonus = 0.1 +################################################################################################### +################################################################################################### +# QUEST # -# Rate.MoveSpeed -# Description: Movement speed rate. -# Default: 1 +# Quests.EnableQuestTracker +# Description: Store data in the database about quest completion and abandonment to help finding bugged quests. +# Default: 0 - (Disabled) +# 1 - (Enabled) -Rate.MoveSpeed = 1 +Quests.EnableQuestTracker = 0 # -# Rate.InstanceResetTime -# Description: Multiplier for the rate between global raid/heroic instance resets -# (dbc value). Higher value increases the time between resets, -# lower value lowers the time, you need clean instance_reset in -# characters db in order to let new values work. -# Default: 1 +# QuestPOI.Enabled +# Description: Show points of interest on the map +# Default: 1 - Enabled +# 0 - Disabled -Rate.InstanceResetTime = 1 +QuestPOI.Enabled = 1 # -# Rate.Pet.LevelXP -# Description: Modifies the amount of experience required to level up a pet. -# The lower the rate the less experience is required. -# Default: 0.05 -# +# Quests.LowLevelHideDiff +# Description: Level difference between player and quest level at which quests are +# considered low-level and are not shown via exclamation mark (!) at quest +# givers. +# Default: 4 - (Enabled, Hide quests that have 4 levels less than the character) +# -1 - (Disabled, Show all available quest marks) -Rate.Pet.LevelXP = 0.05 +Quests.LowLevelHideDiff = 4 # -# WaterBreath.Timer -# Description: The timer for player's breath underwater in milliseconds -# Default: 180000 (3 minutes) -# +# Quests.HighLevelHideDiff +# Description: Level difference between player and quest level at which quests are +# considered high-level and are not shown via exclamation mark (!) at quest +# givers. +# Default: 7 - (Enabled, Hide quests that have 7 levels more than the character) +# -1 - (Disabled, Show all available quest marks) -WaterBreath.Timer = 180000 +Quests.HighLevelHideDiff = 7 # -# EnableLowLevelRegenBoost -# Description: Greatly increase Health and Mana regen rates for players under level 15 (Added in patch 3.3) -# Default: 1 - Enabled -# 0 - Disabled -# +# Quests.IgnoreRaid +# Description: Allow non-raid quests to be completed while in a raid group. +# Default: 0 - (Disabled) +# 1 - (Enabled) -EnableLowLevelRegenBoost = 1 +Quests.IgnoreRaid = 0 # -# SkillGain.Crafting -# SkillGain.Defense -# SkillGain.Gathering -# SkillGain.Weapon -# Description: Crafting/defense/gathering/weapon skills gain rate. -# Default: 1 - (SkillGain.Crafting) -# 1 - (SkillGain.Defense) -# 1 - (SkillGain.Gathering) -# 1 - (SkillGain.Weapon) +# Quests.IgnoreAutoAccept +# Description: Ignore auto accept flag. Clients will have to manually accept all quests. +# Default: 0 - (Disabled, DB values determine if quest is marked auto accept or not.) +# 1 - (Enabled, clients will not be told to automatically accept any quest.) -SkillGain.Crafting = 1 -SkillGain.Defense = 1 -SkillGain.Gathering = 1 -SkillGain.Weapon = 1 +Quests.IgnoreAutoAccept = 0 # -# SkillChance.Orange -# SkillChance.Yellow -# SkillChance.Green -# SkillChance.Grey -# Description: Chance to increase skill based on recipe color. -# Default: 100 - (SkillChance.Orange) -# 75 - (SkillChance.Yellow) -# 25 - (SkillChance.Green) -# 0 - (SkillChance.Grey) +# Quests.IgnoreAutoComplete +# Description: Ignore auto complete flag. Clients will have to manually complete all quests. +# Default: 0 - (Disabled, DB values determine if quest is marked auto complete or not.) +# 1 - (Enabled, clients will not be told to automatically complete any quest.) -SkillChance.Orange = 100 -SkillChance.Yellow = 75 -SkillChance.Green = 25 -SkillChance.Grey = 0 +Quests.IgnoreAutoComplete = 0 # -# SkillChance.MiningSteps -# SkillChance.SkinningSteps -# Description: Skinning and Mining chance decreases with skill level. -# Default: 0 - (Disabled) -# 75 - (In 2 times each 75 skill points) +# Rate.RewardBonusMoney +# Description: Allows to further tweak the amount of extra money rewarded by quests when the player +# is at MaxPlayerLevel (this amount is specified in quest_template.RewardBonusMoney). +# NOTE: the final amount will also affected by Rate.Drop.Money +# Default: 1 -SkillChance.MiningSteps = 0 -SkillChance.SkinningSteps = 0 +Rate.RewardBonusMoney = 1 # -# DurabilityLoss.InPvP -# Description: Durability loss on death during PvP. -# Default: 0 - (Disabled) -# 1 - (Enabled) +################################################################################################### -DurabilityLoss.InPvP = 0 +################################################################################################### +# CREATURE +# +# MonsterSight +# Description: The maximum distance in yards that a "monster" creature can see +# regardless of level difference (through CreatureAI::IsVisible). +# Increases CONFIG_SIGHT_MONSTER to 50 yards. Used to be 20 yards. +# Default: 50.000000 + +MonsterSight = 50.000000 # -# DurabilityLoss.OnDeath -# Description: Durability loss percentage on death. -# Note: On 3.3.5 client always shows log message "Your items have lost 10% durability" -# Default: 10 +# ThreatRadius +# Description: Distance for creatures to evade after being pulled away from the combat +# starting point. If ThreatRadius is less than creature aggro radius then aggro +# radius will be used. +# Default: 60 -DurabilityLoss.OnDeath = 10 +ThreatRadius = 60 # -# DurabilityLossChance.Damage -# Description: Chance to lose durability on one equipped item from damage. -# Default: 0.5 - (100/0.5 = 200, Each 200 damage one equipped item will use durability) +# Rate.Creature.Aggro +# Description: Aggro radius percentage. +# Default: 1 - (Enabled, 100%) +# 1.5 - (Enabled, 150%) +# 0 - (Disabled, 0%) -DurabilityLossChance.Damage = 0.5 +Rate.Creature.Aggro = 1 # -# DurabilityLossChance.Absorb -# Description: Chance to lose durability on one equipped armor item when absorbing damage. -# Default: 0.5 - (100/0.5 = 200, Each 200 absorbed damage one equipped item will lose -# durability) +# CreatureFamilyFleeAssistanceRadius +# Description: Distance for fleeing creatures seeking assistance from other creatures. +# Default: 30 - (Enabled) +# 0 - (Disabled) -DurabilityLossChance.Absorb = 0.5 +CreatureFamilyFleeAssistanceRadius = 30 # -# DurabilityLossChance.Parry -# Description: Chance to lose durability on main weapon when parrying attacks. -# Default: 0.05 - (100/0.05 = 2000, Each 2000 parried damage the main weapon will lose -# durability) +# CreatureFamilyAssistanceRadius +# Description: Distance for creatures calling for assistance from other creatures without +# moving. +# Default: 10 - (Enabled) +# 0 - (Disabled) -DurabilityLossChance.Parry = 0.05 +CreatureFamilyAssistanceRadius = 10 # -# DurabilityLossChance.Block -# Description: Chance to lose durability on shield when blocking attacks. -# Default: 0.05 - (100/0.05 = 2000, Each 2000 blocked damage the shield will lose -# durability) +# CreatureFamilyAssistanceDelay +# Description: Time (in milliseconds) before creature assistance call. +# Default: 2000 - (2 Seconds) -DurabilityLossChance.Block = 0.05 +CreatureFamilyAssistanceDelay = 2000 # -# Death.SicknessLevel -# Description: Starting level for resurrection sickness. -# Example: 11 - (Level 1-10 characters will not be affected, -# Level 11-19 characters will be affected for 1 minute, -# Level 20-MaxPlayerLevel characters will be affected for 10 minutes) -# Default: 11 - (Enabled, See Example) -# MaxPlayerLevel+1 - (Disabled) -# -10 - (Enabled, Level 1+ characters have 10 minute duration) +# CreatureFamilyAssistancePeriod +# Description: Time (in milliseconds) before next creature assistance call. +# Default: 3000 - (3 Seconds) +# 0 - (Disabled) -Death.SicknessLevel = 11 +CreatureFamilyAssistancePeriod = 3000 # -# Death.CorpseReclaimDelay.PvP -# Death.CorpseReclaimDelay.PvE -# Description: Increase corpse reclaim delay at PvP/PvE deaths. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# CreatureFamilyFleeDelay +# Description: Time (in milliseconds) during which creature can flee if no assistance was +# found. +# Default: 7000 (7 Seconds) -Death.CorpseReclaimDelay.PvP = 1 -Death.CorpseReclaimDelay.PvE = 0 +CreatureFamilyFleeDelay = 7000 # -# Death.Bones.World -# Death.Bones.BattlegroundOrArena -# Description: Create bones instead of corpses at resurrection in normal zones, instances, -# battleground or arenas. -# Default: 1 - (Enabled, Death.Bones.World) -# 1 - (Enabled, Death.Bones.BattlegroundOrArena) -# 0 - (Disabled) +# WorldBossLevelDiff +# Description: World boss level difference. +# Default: 3 -Death.Bones.World = 1 -Death.Bones.BattlegroundOrArena = 1 +WorldBossLevelDiff = 3 # -# Die.Command.Mode -# Description: Do not trigger things like loot from .die command. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# Corpse.Decay.NORMAL +# Corpse.Decay.RARE +# Corpse.Decay.ELITE +# Corpse.Decay.RAREELITE +# Corpse.Decay.WORLDBOSS +# Description: Time (in seconds) until creature corpse will decay if not looted or skinned. +# Default: 60 - (1 Minute, Corpse.Decay.NORMAL) +# 300 - (5 Minutes, Corpse.Decay.RARE) +# 300 - (5 Minutes, Corpse.Decay.ELITE) +# 300 - (5 Minutes, Corpse.Decay.RAREELITE) +# 3600 - (1 Hour, Corpse.Decay.WORLDBOSS) -Die.Command.Mode = 1 +Corpse.Decay.NORMAL = 60 +Corpse.Decay.RARE = 300 +Corpse.Decay.ELITE = 300 +Corpse.Decay.RAREELITE = 300 +Corpse.Decay.WORLDBOSS = 3600 -# Rate.MissChanceMultiplier.Creature -# Rate.MissChanceMultiplier.Player -# Rate.MissChanceMultiplier.OnlyAffectsPlayer -# -# Description: When the target is 3 or more level higher than the player, -# the chance to hit is determined by the formula: 94 - (levelDiff - 2) * Rate.MissChanceMultiplier -# The higher the Rate.MissChanceMultiplier constant, the higher is the chance to miss. -# -# Note: this does not affect when the player is less than 3 levels different than the target, -# where this (linear) formula is used instead to calculate the hit chance: 96 - levelDiff. -# You can set Rate.MissChanceMultiplier.OnlyAffectsPlayer to 1 if you only want to affect the MissChance -# for player casters only. This way you won't be affecting creature missing chance. -# -# Example: if you want the chance to keep growing linearly, use 1. -# -# Default: Rate.MissChanceMultiplier.TargetCreature = 11 -# Rate.MissChanceMultiplier.TargetPlayer = 7 -# Rate.MissChanceMultiplier.OnlyAffectsPlayer = 0 # +# Rate.Corpse.Decay.Looted +# Description: Multiplier for Corpse.Decay.* to configure how long creature corpses stay +# after they have been looted. +# Default: 0.5 -Rate.MissChanceMultiplier.TargetCreature = 11 -Rate.MissChanceMultiplier.TargetPlayer = 7 -Rate.MissChanceMultiplier.OnlyAffectsPlayer = 0 +Rate.Corpse.Decay.Looted = 0.5 # -################################################################################################### - -################################################################################################### -# STATS LIMITS +# Rate.Creature.Normal.Damage +# Rate.Creature.Elite.Elite.Damage +# Rate.Creature.Elite.RARE.Damage +# Rate.Creature.Elite.RAREELITE.Damage +# Rate.Creature.Elite.WORLDBOSS.Damage +# Description: Multiplier for creature melee damage. +# Default: 1 - (Rate.Creature.Normal.Damage) +# 1 - (Rate.Creature.Elite.Elite.Damage) +# 1 - (Rate.Creature.Elite.RARE.Damage) +# 1 - (Rate.Creature.Elite.RAREELITE.Damage) +# 1 - (Rate.Creature.Elite.WORLDBOSS.Damage) # -# Stats.Limits.Enable -# Description: Enable or disable stats system limitations -# Default: 0 - Disabled -# 1 - Enabled -Stats.Limits.Enable = 0 +Rate.Creature.Normal.Damage = 1 +Rate.Creature.Elite.Elite.Damage = 1 +Rate.Creature.Elite.RARE.Damage = 1 +Rate.Creature.Elite.RAREELITE.Damage = 1 +Rate.Creature.Elite.WORLDBOSS.Damage = 1 # -# Stats.Limit.[STAT] -# Description: Set percentage limit for dodge, parry, block and crit rating -# Default: 95.0 (95%) +# Rate.Creature.Normal.SpellDamage +# Rate.Creature.Elite.Elite.SpellDamage +# Rate.Creature.Elite.RARE.SpellDamage +# Rate.Creature.Elite.RAREELITE.SpellDamage +# Rate.Creature.Elite.WORLDBOSS.SpellDamage +# Description: Multiplier for creature spell damage. +# Default: 1 - (Rate.Creature.Normal.SpellDamage) +# 1 - (Rate.Creature.Elite.Elite.SpellDamage) +# 1 - (Rate.Creature.Elite.RARE.SpellDamage) +# 1 - (Rate.Creature.Elite.RAREELITE.SpellDamage) +# 1 - (Rate.Creature.Elite.WORLDBOSS.SpellDamage) -Stats.Limits.Dodge = 95.0 -Stats.Limits.Parry = 95.0 -Stats.Limits.Block = 95.0 -Stats.Limits.Crit = 95.0 +Rate.Creature.Normal.SpellDamage = 1 +Rate.Creature.Elite.Elite.SpellDamage = 1 +Rate.Creature.Elite.RARE.SpellDamage = 1 +Rate.Creature.Elite.RAREELITE.SpellDamage = 1 +Rate.Creature.Elite.WORLDBOSS.SpellDamage = 1 # -################################################################################################### +# Rate.Creature.Normal.HP +# Rate.Creature.Elite.Elite.HP +# Rate.Creature.Elite.RARE.HP +# Rate.Creature.Elite.RAREELITE.HP +# Rate.Creature.Elite.WORLDBOSS.HP +# Description: Multiplier for creature health. +# Default: 1 - (Rate.Creature.Normal.HP) +# 1 - (Rate.Creature.Elite.Elite.HP) +# 1 - (Rate.Creature.Elite.RARE.HP) +# 1 - (Rate.Creature.Elite.RAREELITE.HP) +# 1 - (Rate.Creature.Elite.WORLDBOSS.HP) + +Rate.Creature.Normal.HP = 1 +Rate.Creature.Elite.Elite.HP = 1 +Rate.Creature.Elite.RARE.HP = 1 +Rate.Creature.Elite.RAREELITE.HP = 1 +Rate.Creature.Elite.WORLDBOSS.HP = 1 -################################################################################################### -# AUTO BROADCAST # -# AutoBroadcast.On -# Description: Enable auto broadcast. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# ListenRange.Say +# Description: Distance in which players can read say messages from creatures or +# gameobjects. +# Default: 40 -AutoBroadcast.On = 0 +ListenRange.Say = 40 # -# AutoBroadcast.Center -# Description: Auto broadcasting display method. -# Default: 0 - (Announce) -# 1 - (Notify) -# 2 - (Both) +# ListenRange.TextEmote +# Description: Distance in which players can read emotes from creatures or gameobjects. +# Default: 40 -AutoBroadcast.Center = 0 +ListenRange.TextEmote = 40 # -# AutoBroadcast.Timer -# Description: Timer (in milliseconds) for auto broadcasts. -# Default: 60000 - (60 seconds) +# ListenRange.Yell +# Description: Distance in which players can read yell messages from creatures or +# gameobjects. +# Default: 300 -AutoBroadcast.Timer = 60000 +ListenRange.Yell = 300 # -# AutoBroadcast.MinDisableLevel -# Description: Minimum level required to disable autobroadcast announcements if EnablePlayerSettings option is enabled. -# Default: 0 - (Not allowed to disable it) +# Creature.MovingStopTimeForPlayer +# Description: Time (in milliseconds) during which creature will not move after +# interaction with player. +# Default: 180000 -AutoBroadcast.MinDisableLevel = 0 +Creature.MovingStopTimeForPlayer = 180000 -# -################################################################################################### +# WaypointMovementStopTimeForPlayer +# Description: Specifies the time (in seconds) that a creature with waypoint +# movement will wait after a player interacts with it. +# default: 120 -################################################################################################### -# BATTLEGROUND CONFIG +WaypointMovementStopTimeForPlayer = 120 + +# NpcEvadeIfTargetIsUnreachable +# Description: Specifies the time (in seconds) that a creature whom target +# is unreachable to end up in evade mode. +# Default: 5 + +NpcEvadeIfTargetIsUnreachable = 5 + +# NpcRegenHPIfTargetIsUnreachable +# Description: Regenerates HP for Creatures in Raids if they cannot reach the target. +# Keep disabled if you are experiencing mmaps/pathing issues. # -# Battleground.CastDeserter -# Description: Cast Deserter spell at players who leave battlegrounds in progress. # Default: 1 - (Enabled) # 0 - (Disabled) -Battleground.CastDeserter = 1 +NpcRegenHPIfTargetIsUnreachable = 1 -# -# Battleground.QueueAnnouncer.Enable -# Description: Announce battleground queue status to chat. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# NpcRegenHPTimeIfTargetIsUnreachable +# Description: Specifies the time (in seconds) that a creature whom target +# is unreachable in raid to end up regenerate health. +# Default: 10 + +NpcRegenHPTimeIfTargetIsUnreachable = 10 + +# Creatures.CustomIDs +# Description: The list of custom creatures with gossip dialogues hardcoded in core, +# divided by "," without spaces. +# It is implied that you do not use for these NPC dialogs data from "gossip_menu" table. +# Server will skip these IDs during the definitions validation process. +# Example: Creatures.CustomIDs = "190010,55005,999991,25462,98888,601014" - Npcs for Transmog, Guild-zone, 1v1-arena, Skip Dk, +# Racial Trait Swap, NPC - All Mounts Modules +# Default: "" -Battleground.QueueAnnouncer.Enable = 0 +Creatures.CustomIDs = "190010,55005,999991,25462,98888,601014,34567,34568" # -# Battleground.QueueAnnouncer.Limit.MinLevel -# Description: Limit the QueueAnnouncer starting from a certain level. -# When limited, it announces only if there are at least MinPlayers queued (see below) -# At 80 it only limits RBG, at lower level only limits Warsong Gulch. -# Default: 0 - (Disabled, no limits) -# 10 - (Enabled for all, because BGs start at 10) -# 20 - (Enabled for 20 and higher) -# 80 - (Enabled only for 80) - -Battleground.QueueAnnouncer.Limit.MinLevel = 0 +################################################################################################### +################################################################################################### +# VENDOR # -# Battleground.QueueAnnouncer.Limit.MinPlayers -# Description: When the Battleground.QueueAnnouncer.Limit.MinLevel limit is enabled (not 0) -# only show when at least MinPlayers are queued. -# Default: 3 - (Show only when 3 or more players are queued) +# Rate.SellValue.Item.Poor +# Rate.SellValue.Item.Normal +# Rate.SellValue.Item.Uncommon +# Rate.SellValue.Item.Rare +# Rate.SellValue.Item.Epic +# Rate.SellValue.Item.Legendary +# Rate.SellValue.Item.Artifact +# Rate.SellValue.Item.Heirloom +# Description: Item Sale Value rates based on quality. +# Default: 1 - (Rate.SellValue.Item.Poor) +# 1 - (Rate.SellValue.Item.Normal) +# 1 - (Rate.SellValue.Item.Uncommon) +# 1 - (Rate.SellValue.Item.Rare) +# 1 - (Rate.SellValue.Item.Epic) +# 1 - (Rate.SellValue.Item.Legendary) +# 1 - (Rate.SellValue.Item.Artifact) +# 1 - (Rate.SellValue.Item.Heirloom) -Battleground.QueueAnnouncer.Limit.MinPlayers = 3 +Rate.SellValue.Item.Poor = 1 +Rate.SellValue.Item.Normal = 1 +Rate.SellValue.Item.Uncommon = 1 +Rate.SellValue.Item.Rare = 1 +Rate.SellValue.Item.Epic = 1 +Rate.SellValue.Item.Legendary = 1 +Rate.SellValue.Item.Artifact = 1 +Rate.SellValue.Item.Heirloom = 1 # -# Battleground.QueueAnnouncer.SpamProtection.Delay -# Description: Show announce if player rejoined in queue after sec -# Default: 30 -# +# Rate.BuyValue.Item.Poor +# Rate.BuyValue.Item.Normal +# Rate.BuyValue.Item.Uncommon +# Rate.BuyValue.Item.Rare +# Rate.BuyValue.Item.Epic +# Rate.BuyValue.Item.Legendary +# Rate.BuyValue.Item.Artifact +# Rate.BuyValue.Item.Heirloom +# Description: Item Sale Value rates based on quality. +# Default: 1 - (Rate.BuyValue.Item.Poor) +# 1 - (Rate.BuyValue.Item.Normal) +# 1 - (Rate.BuyValue.Item.Uncommon) +# 1 - (Rate.BuyValue.Item.Rare) +# 1 - (Rate.BuyValue.Item.Epic) +# 1 - (Rate.BuyValue.Item.Legendary) +# 1 - (Rate.BuyValue.Item.Artifact) +# 1 - (Rate.BuyValue.Item.Heirloom) -Battleground.QueueAnnouncer.SpamProtection.Delay = 30 +Rate.BuyValue.Item.Poor = 1 +Rate.BuyValue.Item.Normal = 1 +Rate.BuyValue.Item.Uncommon = 1 +Rate.BuyValue.Item.Rare = 1 +Rate.BuyValue.Item.Epic = 1 +Rate.BuyValue.Item.Legendary = 1 +Rate.BuyValue.Item.Artifact = 1 +Rate.BuyValue.Item.Heirloom = 1 # -# Battleground.QueueAnnouncer.PlayerOnly -# Description: Battleground queue announcement type. -# Default: 0 - (System message, Anyone can see it) -# 1 - (Private, Only queued players can see it) +# Rate.RepairCost +# Description: Repair cost rate. +# Default: 1 -Battleground.QueueAnnouncer.PlayerOnly = 0 +Rate.RepairCost = 1 # -# Battleground.QueueAnnouncer.Timed -# Description: Enabled battleground queue announcements based on timer -# Default: 0 - (Disabled) -# 1 - (Enabled - Set Arena.QueueAnnouncer.Timer) -# - -Battleground.QueueAnnouncer.Timed = 0 +################################################################################################### +################################################################################################### +# GROUP # -# Battleground.QueueAnnouncer.Timer -# Description: Set timer for queue announcements -# Default: 30000 (30 sec) +# LeaveGroupOnLogout.Enabled +# Description: Should the player leave their group when they log out? +# (It does not affect raids or dungeon finder groups) # +# Default: 1 - (Enabled) -Battleground.QueueAnnouncer.Timer = 30000 +LeaveGroupOnLogout.Enabled = 1 # -# Battleground.PrematureFinishTimer -# Description: Time (in milliseconds) before battleground will end prematurely if there are -# not enough players on one team. (Values defined in battleground template) -# Default: 300000 - (Enabled, 5 minutes) -# 0 - (Disabled, Not recommended) - -Battleground.PrematureFinishTimer = 300000 - +# Group.Raid.LevelRestriction +# +# The Group members need to the same, or higher level than the specified value. +# Minimum level is 10. +# Default: 10 # -# Battleground.PremadeGroupWaitForMatch -# Description: Time (in milliseconds) a pre-made group has to wait for matching group of the -# other faction. -# Default: 1800000 - (Enabled, 30 minutes) -# 0 - (Disabled, Not recommended) -Battleground.PremadeGroupWaitForMatch = 1800000 +Group.Raid.LevelRestriction = 10 # -# Battleground.GiveXPForKills -# Description: Give experience for honorable kills in battlegrounds. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -Battleground.GiveXPForKills = 0 +################################################################################################### +################################################################################################### +# INSTANCE # -# Battleground.Random.ResetHour -# Description: Hour of the day when the global instance resets occur. -# Range: 0-23 -# Default: 6 - (06:00 AM) +# Instance.GMSummonPlayer +# Description: Allow GM to summon players or only other GM accounts inside instances. +# Default: 0 - (Disabled, Only GM accounts can be summoned by GM) +# 1 - (Enabled, GM and Player accounts can be summoned by GM) -Battleground.Random.ResetHour = 6 +Instance.GMSummonPlayer = 0 -# Battleground.StoreStatistics.Enable -# Description: Store Battleground scores in the database. +# +# Instance.IgnoreLevel +# Description: Ignore level requirement when entering instances. # Default: 0 - (Disabled) # 1 - (Enabled) -Battleground.StoreStatistics.Enable = 1 +Instance.IgnoreLevel = 0 -# Battleground.TrackDeserters.Enable -# Description: Track deserters of Battlegrounds. +# +# Instance.IgnoreRaid +# Description: Ignore raid group requirement when entering instances. # Default: 0 - (Disabled) # 1 - (Enabled) -Battleground.TrackDeserters.Enable = 1 +Instance.IgnoreRaid = 0 # -# Battleground.InvitationType -# Description: Set Battleground invitation type. -# Default: 0 - (Normal, Invite as much players to battlegrounds as queued, -# Don't bother with balance) -# 1 - (Experimental, Don't allow to invite much more players -# of one faction) -# 2 - (Experimental, Try to have even teams) +# Instance.ResetTimeHour +# Description: Hour of the day when the global instance reset occurs. +# Range: 0-23 +# Default: 4 - (04:00 AM) -Battleground.InvitationType = 0 +Instance.ResetTimeHour = 4 # -# Battleground.ReportAFK.Timer -# Description: After a few minutes that battle started you can report the player. -# Default: 4 +# Instance.ResetTimeRelativeTimestamp +# Description: Needed for displaying valid instance reset times in ingame calendar. +# This timestamp should be set to a date in the past (midnight) on which +# both 3-day and 7-day raids were reset. +# Default: 1135814400 - (Thu, 29 Dec 2005 00:00:00 GMT - meaning that 7-day raid reset falls on Thursdays, +# while 3-day reset falls on "Thu 29 Dec 2005", "Sun 01 Jan 2006", "Wed 04 Jan 2006", and so on) -Battleground.ReportAFK.Timer = 4 +Instance.ResetTimeRelativeTimestamp = 1135814400 # -# Battleground.ReportAFK -# Description: Number of reports needed to kick someone AFK from Battleground. -# Range: 1-9 -# Default: 3 +# Rate.InstanceResetTime +# Description: Multiplier for the rate between global raid/heroic instance resets +# (dbc value). Higher value increases the time between resets, +# lower value lowers the time, you need clean instance_reset in +# characters db in order to let new values work. +# Default: 1 -Battleground.ReportAFK = 3 +Rate.InstanceResetTime = 1 -# Battleground.DisableQuestShareInBG -# Description: Disables the ability to share quests while in a Battleground. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# +# Instance.UnloadDelay +# Description: Time (in milliseconds) before instance maps are unloaded from memory if no +# characters are inside. +# Default: 1800000 - (Enabled, 30 minutes) +# 0 - (Disabled, Instance maps are kept in memory until the instance +# resets) -Battleground.DisableQuestShareInBG = 0 +Instance.UnloadDelay = 1800000 # -# Battleground.DisableReadyCheckInBG -# Description: Disables the ability to send a Ready Check survey while in a Battleground. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# AccountInstancesPerHour +# Description: Controls the max amount of different instances player can enter within hour +# Default: 5 -Battleground.DisableReadyCheckInBG = 0 +AccountInstancesPerHour = 5 # -# Battleground.RewardWinnerHonorFirst -# Battleground.RewardWinnerArenaFirst -# Battleground.RewardWinnerHonorLast -# Battleground.RewardWinnerArenaLast -# Battleground.RewardLoserHonorFirst -# Battleground.RewardLoserHonorLast -# Description: Random Battlegrounds / call to the arms rewards -# Default: 30 - Battleground.RewardWinnerHonorFirst -# 25 - Battleground.RewardWinnerArenaFirst -# 15 - Battleground.RewardWinnerHonorLast -# 0 - Battleground.RewardWinnerArenaLast -# 5 - Battleground.RewardLoserHonorFirst -# 5 - Battleground.RewardLoserHonorLast +# Instance.SharedNormalHeroicId +# Description: Forces ICC and RS Normal and Heroic to share lockouts. ToC is uneffected and Normal and Heroic will be separate. +# Default: 1 - Enable +# 0 - Disable # -Battleground.RewardWinnerHonorFirst = 30 -Battleground.RewardWinnerArenaFirst = 25 -Battleground.RewardWinnerHonorLast = 15 -Battleground.RewardWinnerArenaLast = 0 -Battleground.RewardLoserHonorFirst = 5 -Battleground.RewardLoserHonorLast = 5 +Instance.SharedNormalHeroicId = 1 # -# Battleground.PlayerRespawn -# Description: Battleground player resurrection interval (in seconds). -# Default: 30 - -Battleground.PlayerRespawn = 30 - +# DungeonAccessRequirements.PrintMode +# +# Description: Select the preferred format to display information to the player who cannot enter a portal dungeon because when has not met the access requirements: +# Default: 1 - (Display only one requirement at a time (BlizzLike, like in the LFG interface)) +# 0 - (Display no extra information, only "Requirements not met") +# 2 - (Display detailed requirements, all at once, with clickable links) # -# Battleground.RestorationBuffRespawn -# Description: Battleground restoration buff respawn time (in seconds). -# Default: 20 (Recommended 10+) -Battleground.RestorationBuffRespawn = 20 +DungeonAccessRequirements.PrintMode = 1 # -# Battleground.BerserkingBuffRespawn -# Description: Battleground berserking buff respawn time (in seconds). -# Default: 120 (Recommended 10+) +# DungeonAccessRequirements.PortalAvgIlevelCheck +# +# Description: Enable average item level requirement when entering a dungeon/raid's portal (= deny the entry if player has too low average ilevel, like in LFG). +# Default: 0 - (Disabled -> Blizzlike) +# 1 - (Enabled) -Battleground.BerserkingBuffRespawn = 120 +DungeonAccessRequirements.PortalAvgIlevelCheck = 0 # -# Battleground.SpeedBuffRespawn -# Description: Battleground speed buff respawn time (in seconds). -# Default: 150 (Recommended 10+) +# DungeonAccessRequirements.OptionalStringID +# +# Description: Display an extra message from acore_strings in the chat after printing the dungeon access requirements. +# To enable it set the ID of your desired string from the table acore_strings +# Default: 0 - (Disabled) +# 1+ - (Enabled) -Battleground.SpeedBuffRespawn = 150 +DungeonAccessRequirements.OptionalStringID = 0 # ################################################################################################### ################################################################################################### -# BATTLEFIELD CONFIG +# DUNGEON AND BATTLEGROUND FINDER # -# Wintergrasp.Enable -# Description: Enable the Wintergrasp battlefield. -# Default: 1 - (Enabled, Experimental as of still being in development) -# 0 - (Battleground disabled, Wintergrasp world processing still occurs) -# 2 - (Disable all Wintergrasp processing) +# JoinBGAndLFG.Enable +# Description: Allow queueing for BG and LFG at the same time. +# Default: 0 - Disabled +# 1 - Enabled -Wintergrasp.Enable = 1 +JoinBGAndLFG.Enable = 0 # -# Wintergrasp.PlayerMax -# Description: Maximum number of players allowed in Wintergrasp. -# Default: 100 +# DungeonFinder.OptionsMask +# Description: Dungeon and raid finder system. +# Value is a bitmask consisting of: +# LFG_OPTION_ENABLE_DUNGEON_FINDER = 1, Enable the dungeon finder browser +# LFG_OPTION_ENABLE_RAID_BROWSER = 2, Enable the raid browser +# LFG_OPTION_ENABLE_SEASONAL_BOSSES = 4, Enable seasonal bosses +# Default: 5 -Wintergrasp.PlayerMax = 120 +DungeonFinder.OptionsMask = 5 # -# Wintergrasp.PlayerMin -# Description: Minimum number of players required for Wintergrasp. -# Default: 0 - -Wintergrasp.PlayerMin = 0 - +# LFG.Location.All # -# Wintergrasp.PlayerMinLvl -# Description: Required character level for the Wintergrasp battle. -# Default: 77 - -Wintergrasp.PlayerMinLvl = 77 - +# Includes satellite to search for work elsewhere LFG +# Default: 0 - Disable +# 1 - Enable # -# Wintergrasp.BattleTimer -# Description: Time (in minutes) for the Wintergrasp battle to last. -# Default: 30 -Wintergrasp.BattleTimer = 30 +LFG.Location.All = 0 # -# Wintergrasp.NoBattleTimer -# Description: Time (in minutes) between Wintergrasp battles. -# Default: 150 +# LFG.MaxKickCount +# Description: Specify the maximum number of kicks allowed in LFG groups (max 3 kicks) +# Default: 2 +# 0 - Disabled (kicks are never allowed) -Wintergrasp.NoBattleTimer = 150 +LFG.MaxKickCount = 2 # -# Wintergrasp.CrashRestartTimer -# Description: Time (in minutes) to delay the restart of Wintergrasp if the world server -# crashed during a running battle. -# Default: 10 +# LFG.KickPreventionTimer +# Description: Specify for how long players are prevented from being kicked after just joining LFG groups +# Default: 900 secs (15 minutes) +# 0 - Disabled -Wintergrasp.CrashRestartTimer = 10 +LFG.KickPreventionTimer = 900 # -################################################################################################### - -################################################################################################### -# ARENA CONFIG +# DungeonAccessRequirements.LFGLevelDBCOverride # -# Arena.MaxRatingDifference -# Description: Maximum rating difference between two teams in rated matches. -# Default: 150 - (Enabled) -# 0 - (Disabled) +# Description: If enabled, use `min_level` and `max_level` values from table `dungeon_access_requirements` to list or to hide a dungeon from the LFG window. +# Default: 0 - (Disabled) +# 1 - (Enabled) -Arena.MaxRatingDifference = 150 +DungeonAccessRequirements.LFGLevelDBCOverride = 0 # -# Arena.RatingDiscardTimer -# Description: Time (in milliseconds) after which rating differences are ignored when -# setting up matches. -# Default: 600000 - (Enabled, 10 minutes) -# 0 - (Disabled) - -Arena.RatingDiscardTimer = 600000 +################################################################################################### +################################################################################################### +# CHARTER # -# Arena.PreviousOpponentsDiscardTimer -# Description: Time (in milliseconds) after which the previous opponents will be ignored. -# Default: 120000 - (Enabled, 2 minutes - Blizzlike) -# 0 - (Disabled) +# MinCharterName +# Description: Minimal charter name length. +# Range: 1-24 +# Default: 2 -Arena.PreviousOpponentsDiscardTimer = 120000 +MinCharterName = 2 # -# Arena.AutoDistributePoints -# Description: Automatically distribute arena points. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# StrictCharterNames +# Description: Limit guild/arena team charter names to language specific symbol set. +# Prevents charter creation if not allowed symbols are used. +# Default: 0 - (Disable, Limited server timezone dependent client check) +# 1 - (Enabled, Strictly basic Latin characters) +# 2 - (Enabled, Strictly realm zone specific, See RealmZone setting, +# Note: Client needs to have the appropriate fonts installed which support +# the charset. For non-official localization, custom fonts need to be +# placed in clientdir/Fonts. +# 3 - (Enabled, Basic Latin characters + server timezone specific) -Arena.AutoDistributePoints = 0 +StrictCharterNames = 0 # -# Arena.AutoDistributeInterval -# Description: Time (in days) how often arena points should be distributed if automatic -# distribution is enabled. -# Default: 7 - (Weekly) - -Arena.AutoDistributeInterval = 7 +################################################################################################### +################################################################################################### +# GUILD # -# Arena.GamesRequired -# Description: Number of arena matches teams must participate in to be eligible for arena point distribution. -# Default: 10 +# Guild.EventLogRecordsCount +# Description: Number of log entries for guild events that are stored per guild. Old entries +# will be overwritten if the number of log entries exceed the configured value. +# High numbers prevent this behavior but may have performance impacts. +# Default: 100 -Arena.GamesRequired = 10 +Guild.EventLogRecordsCount = 100 # -# Arena.QueueAnnouncer.Enable -# Description: Announce arena queue status to chat. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Guild.ResetHour +# Description: Hour of the day when the daily cap resets occur. +# Range: 0-23 +# Default: 6 - (06:00 AM) -Arena.QueueAnnouncer.Enable = 0 +Guild.ResetHour = 6 # -# Arena.QueueAnnouncer.PlayerOnly -# Description: Arena queue announcement type. -# Default: 0 - (System message, Anyone can see it) -# 1 - (Private, Only queued players can see it) -# +# Guild.BankEventLogRecordsCount +# Description: Number of log entries for guild bank events that are stored per guild. Old +# entries will be overwritten if the number of log entries exceed the +# configured value. High numbers prevent this behavior but may have performance +# impacts. +# Default: 25 - (Minimum) -Arena.QueueAnnouncer.PlayerOnly = 0 +Guild.BankEventLogRecordsCount = 25 # -# Arena.QueueAnnouncer.Detail -# Description: The amount of detail to announce on teams queued for arenas. -# Default: 3 - (Announce the team's name and rating) -# 2 - (Announce only the team's name) -# 1 - (Announce only the team's rating) -# 0 - (Do not announce any information about the teams) -# +# MinPetitionSigns +# Description: Number of required signatures on charters to create a guild. +# Range: 0-9 +# Default: 9 -Arena.QueueAnnouncer.Detail = 3 +MinPetitionSigns = 9 # -# Arena.ArenaSeason.ID -# Description: Current arena season id shown in clients. -# Default: 8 +# Guild.CharterCost +# Description: Amount of money (in Copper) the petitions costs. +# Default: 1000 - (10 Silver) -Arena.ArenaSeason.ID = 8 +Guild.CharterCost = 1000 # -# Arena.ArenaSeason.InProgress -# Description: State of current arena season. -# Default: 1 - (Active) -# 0 - (Finished) +# Guild.AllowMultipleGuildMaster +# Description: Allow more than one guild master. Additional Guild Masters must be set using +# the ".guild rank" command. +# Default: 0 - (Disabled) +# 1 - (Enabled) -Arena.ArenaSeason.InProgress = 1 +Guild.AllowMultipleGuildMaster = 0 # -# Arena.ArenaStartRating -# Description: Start rating for new arena teams. -# Default: 0 +# Guild.BankInitialTabs +# Description: Changes the amounts of available tabs of the guild bank on guild creation +# Default: 0 (no tabs given for free) +# 1-6 (amount of tabs of the guild bank at guild creation) -Arena.ArenaStartRating = 0 +Guild.BankInitialTabs = 0 # -# Arena.ArenaStartPersonalRating -# Description: Start personal rating when joining a team. -# Default: 0 +# Guild.BankTabCost0-5 +# Description: Changes the price of the guild tabs. Note that the client will still show the default values. +# Default: 1000000 - (100 Gold) +# 2500000 - (250 Gold) +# 5000000 - (500 Gold) +# 10000000 - (1000 Gold) +# 25000000 - (2500 Gold) +# 50000000 - (5000 Gold) -Arena.ArenaStartPersonalRating = 0 +Guild.BankTabCost0 = 1000000 +Guild.BankTabCost1 = 2500000 +Guild.BankTabCost2 = 5000000 +Guild.BankTabCost3 = 10000000 +Guild.BankTabCost4 = 25000000 +Guild.BankTabCost5 = 50000000# # -# Arena.ArenaStartMatchmakerRating -# Description: Start matchmaker rating for players. -# Default: 1500 - -Arena.ArenaStartMatchmakerRating = 1500 +################################################################################################### +################################################################################################### +# FFAPVP # -# Arena.ArenaWinRatingModifier1 -# Description: Modifier of rating addition when winner team rating is less than 1300 -# be aware that from 1000 to 1300 it gradually decreases automatically down to the half of it -# (increasing this value will give more rating) -# Default: 48 +# FFAPvPTimer +# Description: Specify time offset when player unset FFAPvP flag when leaving FFAPvP area. (e.g. Gurubashi Arena) +# Default: 30 sec -Arena.ArenaWinRatingModifier1 = 48 +FFAPvPTimer = 30 # -# Arena.ArenaWinRatingModifier2 -# Description: Modifier of rating addition when winner team rating is equal or more than 1300 -# (increasing this value will give more rating) -# Default: 24 - -Arena.ArenaWinRatingModifier2 = 24 +################################################################################################### +################################################################################################### +# WINTERGRASP # -# Arena.ArenaLoseRatingModifier -# Description: Modifier of rating subtraction for loser team -# (increasing this value will subtract more rating) -# Default: 24 +# Wintergrasp.Enable +# Description: Enable the Wintergrasp battlefield. +# Default: 1 - (Enabled, Experimental as of still being in development) +# 0 - (Battleground disabled, Wintergrasp world processing still occurs) +# 2 - (Disable all Wintergrasp processing) -Arena.ArenaLoseRatingModifier = 24 +Wintergrasp.Enable = 1 # -# Arena.ArenaMatchmakerRatingModifier -# Description: Modifier of matchmaker rating -# Default: 24 +# Wintergrasp.PlayerMax +# Description: Maximum number of players allowed in Wintergrasp. +# Default: 100 -Arena.ArenaMatchmakerRatingModifier = 24 +Wintergrasp.PlayerMax = 120 # -################################################################################################### +# Wintergrasp.PlayerMin +# Description: Minimum number of players required for Wintergrasp. +# Default: 0 + +Wintergrasp.PlayerMin = 0 -################################################################################################### -# NETWORK CONFIG # -# Network.Threads -# Description: Number of threads for network. -# Default: 1 - (Recommended 1 thread per 1000 connections) +# Wintergrasp.PlayerMinLvl +# Description: Required character level for the Wintergrasp battle. +# Default: 77 -Network.Threads = 1 +Wintergrasp.PlayerMinLvl = 77 # -# Network.OutKBuff -# Description: Amount of memory (in bytes) used for the output kernel buffer (see SO_SNDBUF -# socket option, TCP manual). -# Default: -1 - (Use system default setting) +# Wintergrasp.BattleTimer +# Description: Time (in minutes) for the Wintergrasp battle to last. +# Default: 30 -Network.OutKBuff = -1 +Wintergrasp.BattleTimer = 30 # -# Network.OutUBuff -# Description: Amount of memory (in bytes) reserved in the user space per connection for -# output buffering. -# Default: 65536 +# Wintergrasp.NoBattleTimer +# Description: Time (in minutes) between Wintergrasp battles. +# Default: 150 -Network.OutUBuff = 65536 +Wintergrasp.NoBattleTimer = 150 # -# Network.TcpNoDelay: -# Description: TCP Nagle algorithm setting. -# Default: 0 - (Enabled, Less traffic, More latency) -# 1 - (Disabled, More traffic, Less latency, TCP_NO_DELAY) +# Wintergrasp.CrashRestartTimer +# Description: Time (in minutes) to delay the restart of Wintergrasp if the world server +# crashed during a running battle. +# Default: 10 -Network.TcpNodelay = 1 +Wintergrasp.CrashRestartTimer = 10 # ################################################################################################### ################################################################################################### -# CONSOLE AND REMOTE ACCESS +# BATTLEGROUND # -# Console.Enable -# Description: Enable console. +# Battleground.CastDeserter +# Description: Cast Deserter spell at players who leave battlegrounds in progress. # Default: 1 - (Enabled) # 0 - (Disabled) -Console.Enable = 1 +Battleground.CastDeserter = 1 # -# Ra.Enable -# Description: Enable remote console (telnet). +# Battleground.QueueAnnouncer.Enable +# Description: Announce battleground queue status to chat. # Default: 0 - (Disabled) # 1 - (Enabled) -Ra.Enable = 0 +Battleground.QueueAnnouncer.Enable = 0 # -# Ra.IP -# Description: Bind remote access to IP/hostname. -# Default: "0.0.0.0" - (Bind to all IPs on the system) +# Battleground.QueueAnnouncer.Limit.MinLevel +# Description: Limit the QueueAnnouncer starting from a certain level. +# When limited, it announces only if there are at least MinPlayers queued (see below) +# At 80 it only limits RBG, at lower level only limits Warsong Gulch. +# Default: 0 - (Disabled, no limits) +# 10 - (Enabled for all, because BGs start at 10) +# 20 - (Enabled for 20 and higher) +# 80 - (Enabled only for 80) -Ra.IP = "0.0.0.0" +Battleground.QueueAnnouncer.Limit.MinLevel = 0 # -# Ra.Port -# Description: TCP port to reach the remote console. -# Default: 3443 +# Battleground.QueueAnnouncer.Limit.MinPlayers +# Description: When the Battleground.QueueAnnouncer.Limit.MinLevel limit is enabled (not 0) +# only show when at least MinPlayers are queued. +# Default: 3 - (Show only when 3 or more players are queued) -Ra.Port = 3443 +Battleground.QueueAnnouncer.Limit.MinPlayers = 3 # -# Ra.MinLevel -# Description: Required security level to use the remote console. -# Default: 3 +# Battleground.QueueAnnouncer.SpamProtection.Delay +# Description: Show announce if player rejoined in queue after sec +# Default: 30 +# -Ra.MinLevel = 3 +Battleground.QueueAnnouncer.SpamProtection.Delay = 30 # -# SOAP.Enable -# Description: Enable soap service -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Battleground.QueueAnnouncer.PlayerOnly +# Description: Battleground queue announcement type. +# Default: 0 - (System message, Anyone can see it) +# 1 - (Private, Only queued players can see it) -SOAP.Enabled = 0 +Battleground.QueueAnnouncer.PlayerOnly = 0 # -# SOAP.IP -# Description: Bind SOAP service to IP/hostname -# Default: "127.0.0.1" - (Bind to localhost) +# Battleground.QueueAnnouncer.Timed +# Description: Enabled battleground queue announcements based on timer +# Default: 0 - (Disabled) +# 1 - (Enabled - Set Arena.QueueAnnouncer.Timer) +# -SOAP.IP = "127.0.0.1" +Battleground.QueueAnnouncer.Timed = 0 # -# SOAP.Port -# Description: TCP port to reach the SOAP service. -# Default: 7878 +# Battleground.QueueAnnouncer.Timer +# Description: Set timer for queue announcements +# Default: 30000 (30 sec) +# -SOAP.Port = 7878 +Battleground.QueueAnnouncer.Timer = 30000 # -################################################################################################### +# Battleground.PrematureFinishTimer +# Description: Time (in milliseconds) before battleground will end prematurely if there are +# not enough players on one team. (Values defined in battleground template) +# Default: 300000 - (Enabled, 5 minutes) +# 0 - (Disabled, Not recommended) + +Battleground.PrematureFinishTimer = 300000 -################################################################################################### -# CHARACTER DELETE OPTIONS # -# CharDelete.Method -# Description: Character deletion behavior. -# Default: 0 - (Completely remove character from the database) -# 1 - (Unlink the character from account and free up the name, Appears as -# deleted ingame) +# Battleground.PremadeGroupWaitForMatch +# Description: Time (in milliseconds) a pre-made group has to wait for matching group of the +# other faction. +# Default: 1800000 - (Enabled, 30 minutes) +# 0 - (Disabled, Not recommended) -CharDelete.Method = 0 +Battleground.PremadeGroupWaitForMatch = 1800000 # -# CharDelete.MinLevel -# Description: Required level to use the unlinking method if enabled. -# Default: 0 - (Same method for every level) -# 1+ - (Only characters with the specified level will use the unlinking method) +# Battleground.GiveXPForKills +# Description: Give experience for honorable kills in battlegrounds. +# Default: 0 - (Disabled) +# 1 - (Enabled) -CharDelete.MinLevel = 0 +Battleground.GiveXPForKills = 0 # -# CharDelete.KeepDays -# Description: Time (in days) before unlinked characters will be removed from the database. -# Default: 30 - (Enabled) -# 0 - (Disabled, Don't delete any characters) +# Battleground.Random.ResetHour +# Description: Hour of the day when the global instance resets occur. +# Range: 0-23 +# Default: 6 - (06:00 AM) -CharDelete.KeepDays = 30 +Battleground.Random.ResetHour = 6 -# -################################################################################################### +# Battleground.StoreStatistics.Enable +# Description: Store Battleground scores in the database. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Battleground.StoreStatistics.Enable = 1 + +# Battleground.TrackDeserters.Enable +# Description: Track deserters of Battlegrounds. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Battleground.TrackDeserters.Enable = 1 -################################################################################################### -# ITEM DELETE OPTIONS # -# ItemDelete.Method -# Description: Item deletion behavior. -# Default: 0 - (Completely remove item from the database) -# 1 - (Save Item to database) +# Battleground.InvitationType +# Description: Set Battleground invitation type. +# Default: 0 - (Normal, Invite as much players to battlegrounds as queued, +# Don't bother with balance) +# 1 - (Experimental, Don't allow to invite much more players +# of one faction) +# 2 - (Experimental, Try to have even teams) -ItemDelete.Method = 0 +Battleground.InvitationType = 0 # -# ItemDelete.Vendor -# Description: Saving items into database when the player sells items to vendor -# Default: 0 (disabled) -# 1 (enabled) +# Battleground.ReportAFK.Timer +# Description: After a few minutes that battle started you can report the player. +# Default: 4 + +Battleground.ReportAFK.Timer = 4 + # +# Battleground.ReportAFK +# Description: Number of reports needed to kick someone AFK from Battleground. +# Range: 1-9 +# Default: 3 -ItemDelete.Vendor = 0 +Battleground.ReportAFK = 3 + +# Battleground.DisableQuestShareInBG +# Description: Disables the ability to share quests while in a Battleground. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Battleground.DisableQuestShareInBG = 0 # -# ItemDelete.Quality -# Description: Saving items into database that have quality greater or equal to ItemDelete.Quality +# Battleground.DisableReadyCheckInBG +# Description: Disables the ability to send a Ready Check survey while in a Battleground. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Battleground.DisableReadyCheckInBG = 0 + # -# ID | Color | Quality -# 0 | Grey | Poor -# 1 | White | Common -# 2 | Green | Uncommon -# 3 | Blue | Rare -# 4 | Purple| Epic -# 5 | Orange| Legendary -# 6 | Red | Artifact -# 7 | Gold | Bind to Account +# Battleground.RewardWinnerHonorFirst +# Battleground.RewardWinnerArenaFirst +# Battleground.RewardWinnerHonorLast +# Battleground.RewardWinnerArenaLast +# Battleground.RewardLoserHonorFirst +# Battleground.RewardLoserHonorLast +# Description: Random Battlegrounds / call to the arms rewards +# Default: 30 - Battleground.RewardWinnerHonorFirst +# 25 - Battleground.RewardWinnerArenaFirst +# 15 - Battleground.RewardWinnerHonorLast +# 0 - Battleground.RewardWinnerArenaLast +# 5 - Battleground.RewardLoserHonorFirst +# 5 - Battleground.RewardLoserHonorLast # -# Default: 3 + +Battleground.RewardWinnerHonorFirst = 30 +Battleground.RewardWinnerArenaFirst = 25 +Battleground.RewardWinnerHonorLast = 15 +Battleground.RewardWinnerArenaLast = 0 +Battleground.RewardLoserHonorFirst = 5 +Battleground.RewardLoserHonorLast = 5 + # +# Battleground.PlayerRespawn +# Description: Battleground player resurrection interval (in seconds). +# Default: 30 -ItemDelete.Quality = 3 +Battleground.PlayerRespawn = 30 # -# ItemDelete.ItemLevel -# Description: Saving items into database that are Item Levels greater or equal to ItemDelete.ItemLevel -# Default: 80 -# +# Battleground.RestorationBuffRespawn +# Description: Battleground restoration buff respawn time (in seconds). +# Default: 20 (Recommended 10+) -ItemDelete.ItemLevel = 80 +Battleground.RestorationBuffRespawn = 20 # -################################################################################################### +# Battleground.BerserkingBuffRespawn +# Description: Battleground berserking buff respawn time (in seconds). +# Default: 120 (Recommended 10+) + +Battleground.BerserkingBuffRespawn = 120 -################################################################################################### -# CUSTOM SERVER OPTIONS # -# PlayerStart.AllReputation -# Description: Players will start with most of the high level reputations that are needed -# for items, mounts etc. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Battleground.SpeedBuffRespawn +# Description: Battleground speed buff respawn time (in seconds). +# Default: 150 (Recommended 10+) -PlayerStart.AllReputation = 0 +Battleground.SpeedBuffRespawn = 150 # -# PlayerStart.CustomSpells -# Description: If enabled, players will start with custom spells defined in -# playercreateinfo_spell_custom table. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -PlayerStart.CustomSpells = 0 +################################################################################################### +################################################################################################### +# ARENA # -# PlayerStart.MapsExplored -# Description: Characters start with all maps explored. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.MaxRatingDifference +# Description: Maximum rating difference between two teams in rated matches. +# Default: 150 - (Enabled) +# 0 - (Disabled) -PlayerStart.MapsExplored = 0 +Arena.MaxRatingDifference = 150 # -# HonorPointsAfterDuel -# Description: Amount of honor points the duel winner will get after a duel. -# Default: 0 - (Disabled) -# 1+ - (Enabled) +# Arena.RatingDiscardTimer +# Description: Time (in milliseconds) after which rating differences are ignored when +# setting up matches. +# Default: 600000 - (Enabled, 10 minutes) +# 0 - (Disabled) -HonorPointsAfterDuel = 0 +Arena.RatingDiscardTimer = 600000 # -# AlwaysMaxWeaponSkill -# Description: Players will automatically gain max weapon/defense skill when logging in, -# or leveling. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.PreviousOpponentsDiscardTimer +# Description: Time (in milliseconds) after which the previous opponents will be ignored. +# Default: 120000 - (Enabled, 2 minutes - Blizzlike) +# 0 - (Disabled) -AlwaysMaxWeaponSkill = 0 +Arena.PreviousOpponentsDiscardTimer = 120000 # -# PvPToken.Enable -# Description: Character will receive a token after defeating another character that yields -# honor. +# Arena.AutoDistributePoints +# Description: Automatically distribute arena points. # Default: 0 - (Disabled) # 1 - (Enabled) -PvPToken.Enable = 0 +Arena.AutoDistributePoints = 0 # -# PvPToken.MapAllowType -# Description: Define where characters can receive tokens. -# Default: 4 - (All maps) -# 3 - (Battlegrounds) -# 2 - (FFA areas only like Gurubashi arena) -# 1 - (Battlegrounds and FFA areas) +# Arena.AutoDistributeInterval +# Description: Time (in days) how often arena points should be distributed if automatic +# distribution is enabled. +# Default: 7 - (Weekly) -PvPToken.MapAllowType = 4 +Arena.AutoDistributeInterval = 7 # -# PvPToken.ItemID -# Description: Item characters will receive after defeating another character if PvP Token -# system is enabled. -# Default: 29434 - (Badge of justice) +# Arena.GamesRequired +# Description: Number of arena matches teams must participate in to be eligible for arena point distribution. +# Default: 10 -PvPToken.ItemID = 29434 +Arena.GamesRequired = 10 # -# PvPToken.ItemCount -# Description: Number of tokens a character will receive. -# Default: 1 +# Arena.QueueAnnouncer.Enable +# Description: Announce arena queue status to chat. +# Default: 0 - (Disabled) +# 1 - (Enabled) -PvPToken.ItemCount = 1 +Arena.QueueAnnouncer.Enable = 0 # -# NoResetTalentsCost -# Description: Resetting talents doesn't cost anything. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.QueueAnnouncer.PlayerOnly +# Description: Arena queue announcement type. +# Default: 0 - (System message, Anyone can see it) +# 1 - (Private, Only queued players can see it) +# -NoResetTalentsCost = 0 +Arena.QueueAnnouncer.PlayerOnly = 0 # -# ToggleXP.Cost -# Description: Cost of locking/unlocking XP -# Default: 100000 - (10 Gold) +# Arena.QueueAnnouncer.Detail +# Description: The amount of detail to announce on teams queued for arenas. +# Default: 3 - (Announce the team's name and rating) +# 2 - (Announce only the team's name) +# 1 - (Announce only the team's rating) +# 0 - (Do not announce any information about the teams) # -ToggleXP.Cost = 100000 +Arena.QueueAnnouncer.Detail = 3 # -# Guild.AllowMultipleGuildMaster -# Description: Allow more than one guild master. Additional Guild Masters must be set using -# the ".guild rank" command. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.ArenaSeason.ID +# Description: Current arena season id shown in clients. +# Default: 8 -Guild.AllowMultipleGuildMaster = 0 +Arena.ArenaSeason.ID = 8 # -# Guild.BankInitialTabs -# Description: Changes the amounts of available tabs of the guild bank on guild creation -# Default: 0 (no tabs given for free) -# 1-6 (amount of tabs of the guild bank at guild creation) +# Arena.ArenaSeason.InProgress +# Description: State of current arena season. +# Default: 1 - (Active) +# 0 - (Finished) -Guild.BankInitialTabs = 0 +Arena.ArenaSeason.InProgress = 1 # -# Guild.BankTabCost0-5 -# Description: Changes the price of the guild tabs. Note that the client will still show the default values. -# Default: 1000000 - (100 Gold) -# 2500000 - (250 Gold) -# 5000000 - (500 Gold) -# 10000000 - (1000 Gold) -# 25000000 - (2500 Gold) -# 50000000 - (5000 Gold) +# Arena.ArenaStartRating +# Description: Start rating for new arena teams. +# Default: 0 -Guild.BankTabCost0 = 1000000 -Guild.BankTabCost1 = 2500000 -Guild.BankTabCost2 = 5000000 -Guild.BankTabCost3 = 10000000 -Guild.BankTabCost4 = 25000000 -Guild.BankTabCost5 = 50000000 +Arena.ArenaStartRating = 0 # -# ShowKickInWorld -# Description: Determines whether a message is broadcast to the entire server when a -# player gets kicked -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.ArenaStartPersonalRating +# Description: Start personal rating when joining a team. +# Default: 0 -ShowKickInWorld = 0 +Arena.ArenaStartPersonalRating = 0 # -# ShowMuteInWorld -# Description: Determines whether a message is broadcast to the entire server when a -# player gets muted. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.ArenaStartMatchmakerRating +# Description: Start matchmaker rating for players. +# Default: 1500 -ShowMuteInWorld = 0 +Arena.ArenaStartMatchmakerRating = 1500 # -# ShowBanInWorld -# Description: Determines whether a message is broadcast to the entire server when a -# player gets banned. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Arena.ArenaWinRatingModifier1 +# Description: Modifier of rating addition when winner team rating is less than 1300 +# be aware that from 1000 to 1300 it gradually decreases automatically down to the half of it +# (increasing this value will give more rating) +# Default: 48 -ShowBanInWorld = 0 +Arena.ArenaWinRatingModifier1 = 48 # -# RecordUpdateTimeDiffInterval -# Description: Time (in milliseconds) update time diff is written to the log file. -# Update diff can be used as a performance indicator. Diff < 300: good -# performance. Diff > 600 bad performance, may be caused by high CPU usage. -# Default: 300000 - (Enabled, 5 minutes) -# 0 - (Disabled) +# Arena.ArenaWinRatingModifier2 +# Description: Modifier of rating addition when winner team rating is equal or more than 1300 +# (increasing this value will give more rating) +# Default: 24 -RecordUpdateTimeDiffInterval = 300000 +Arena.ArenaWinRatingModifier2 = 24 # -# MinRecordUpdateTimeDiff -# Description: Only record update time diff which is greater than this value. -# Default: 100 +# Arena.ArenaLoseRatingModifier +# Description: Modifier of rating subtraction for loser team +# (increasing this value will subtract more rating) +# Default: 24 -MinRecordUpdateTimeDiff = 100 +Arena.ArenaLoseRatingModifier = 24 # -# PlayerStart.String -# Description: String to be displayed at first login of newly created characters. -# Default: "" - (Disabled) +# Arena.ArenaMatchmakerRatingModifier +# Description: Modifier of matchmaker rating +# Default: 24 -PlayerStart.String = "" +Arena.ArenaMatchmakerRatingModifier = 24 # -# LevelReq.Trade -# Description: Level requirement for characters to be able to trade. -# Default: 1 +# ArenaTeam.CharterCost.2v2 +# ArenaTeam.CharterCost.3v3 +# ArenaTeam.CharterCost.5v5 +# Description: Amount of money (in Copper) the petitions costs. +# Default: 800000 - (80 Gold) +# 1200000 - (120 Gold) +# 2000000 - (200 Gold) -LevelReq.Trade = 1 +ArenaTeam.CharterCost.2v2 = 800000 +ArenaTeam.CharterCost.3v3 = 1200000 +ArenaTeam.CharterCost.5v5 = 2000000 # -# LevelReq.Ticket -# Description: Level requirement for characters to be able to write tickets. -# Default: 1 +# MaxAllowedMMRDrop +# Description: Some players continuously lose arena matches to lower their MMR and then fight with weaker opponents. +# This setting prevents lowering MMR too much from max achieved MMR. +# Eg. if max achieved MMR for a character was 2400, with default setting (MaxAllowedMMRDrop = 500) the character can't get below 1900 MMR no matter what. +# Default: 500 + +MaxAllowedMMRDrop = 500 -LevelReq.Ticket = 1 +# +################################################################################################### +################################################################################################### +# MAIL # -# LevelReq.Auction -# Description: Level requirement for characters to be able to use the auction house. -# Default: 1 +# MailDeliveryDelay +# Description: Time (in seconds) mail delivery is delayed when sending items. +# Default: 3600 - (1 hour) -LevelReq.Auction = 1 +MailDeliveryDelay = 3600 # # LevelReq.Mail @@ -3537,35 +3832,36 @@ LevelReq.Auction = 1 LevelReq.Mail = 1 # -# PlayerDump.DisallowPaths -# Description: Disallow using paths in PlayerDump output files -# Default: 1 - -PlayerDump.DisallowPaths = 1 +################################################################################################### +################################################################################################### +# TRANSPORT +# +# IsContinentTransport.Enabled +# Description: Controls the continent transport (ships, zeppelins etc..) +# Default: 1 - (Enabled) +# # -# PlayerDump.DisallowOverwrite -# Description: Disallow overwriting existing files with PlayerDump -# Default: 1 -PlayerDump.DisallowOverwrite = 1 +IsContinentTransport.Enabled = 1 # -# DisconnectToleranceInterval -# Description: Allows to skip queue after being disconnected for a given number of seconds. -# Default: 0 +# IsPreloadedContinentTransport.Enabled +# Description: Should we preload the transport? +# (Not recommended on low-end servers as it consumes 100% more ram) +# and it's not really necessary to be enabled. +# +# Default: 0 - (Disabled) +# +# -DisconnectToleranceInterval = 0 +IsPreloadedContinentTransport.Enabled = 0 # -# MonsterSight -# Description: The maximum distance in yards that a "monster" creature can see -# regardless of level difference (through CreatureAI::IsVisible). -# Increases CONFIG_SIGHT_MONSTER to 50 yards. Used to be 20 yards. -# Default: 50.000000 - -MonsterSight = 50.000000 +################################################################################################### +################################################################################################### +# CHAT CHANNEL # # StrictChannelNames # Description: Limit channel names to language specific symbol set. @@ -3581,277 +3877,296 @@ MonsterSight = 50.000000 StrictChannelNames = 0 # -# Instance.SharedNormalHeroicId -# Description: Forces ICC and RS Normal and Heroic to share lockouts. ToC is uneffected and Normal and Heroic will be separate. -# Default: 1 - Enable -# 0 - Disable -# +# AddonChannel +# Description: Configure the use of the addon channel through the server (some client side +# addons will not work correctly with disabled addon channel) +# Default: 1 - (Enabled) +# 0 - (Disabled) -Instance.SharedNormalHeroicId = 1 +AddonChannel = 1 # -# Instance.ResetTimeRelativeTimestamp -# Description: Needed for displaying valid instance reset times in ingame calendar. -# This timestamp should be set to a date in the past (midnight) on which -# both 3-day and 7-day raids were reset. -# Default: 1135814400 - (Thu, 29 Dec 2005 00:00:00 GMT - meaning that 7-day raid reset falls on Thursdays, -# while 3-day reset falls on "Thu 29 Dec 2005", "Sun 01 Jan 2006", "Wed 04 Jan 2006", and so on) +# ChatFakeMessagePreventing +# Description: Additional protection from creating fake chat messages using spaces. +# Collapses multiple subsequent whitespaces into a single whitespace. +# Not applied to the addon language, but may break old addons that use +# "normal" chat messages for sending data to other clients. +# Default: 1 - (Enabled, Blizzlike) +# 0 - (Disabled) +# -Instance.ResetTimeRelativeTimestamp = 1135814400 +ChatFakeMessagePreventing = 1 # -# TeleportTimeoutNear -# Description: No description -# Default: 25 +# ChatStrictLinkChecking.Severity +# Description: Check chat messages for in-game links to spells, items, quests, etc. +# -1 - (Only verify validity of link data, but permit use of custom colors) +# Default: 0 - (Only verify that link data and color are valid without checking text) +# 1 - (Additionally verifies that the link text matches the provided data) +# +# Note: If this is set to '1', you must additionally provide .dbc files for all +# client locales that are in use on your server. +# If any files are missing, messages with links from clients using those +# locales will likely be blocked by the server. # -TeleportTimeoutNear = 25 +ChatStrictLinkChecking.Severity = 0 # -# TeleportTimeoutFar -# Description: No description -# Default: 45 +# ChatStrictLinkChecking.Kick +# Description: Defines what should be done if a message containing invalid control characters +# is received. +# Default: 0 - (Silently ignore message) +# 1 - (Ignore message and kick player) # -TeleportTimeoutFar = 45 +ChatStrictLinkChecking.Kick = 0 # -# MaxAllowedMMRDrop -# Description: Some players continuously lose arena matches to lower their MMR and then fight with weaker opponents. -# This setting prevents lowering MMR too much from max achieved MMR. -# Eg. if max achieved MMR for a character was 2400, with default setting (MaxAllowedMMRDrop = 500) the character can't get below 1900 MMR no matter what. -# Default: 500 +# ChatFlood.MessageCount +# Description: Chat flood protection, number of messages before player gets muted. +# Default: 10 - (Enabled) +# 0 - (Disabled) -MaxAllowedMMRDrop = 500 +ChatFlood.MessageCount = 10 # -# EnableLoginAfterDC -# Description: After not logging out properly (clicking Logout and waiting 20 seconds), -# characters stay in game world for a full minute, even if the client connection was closed. -# Such behaviour prevents for example exploiting boss encounters by alt+f4 -# and skipping crucial boss abilities, or escaping opponents in PvP. -# This setting is used to allow/disallow players to log back into characters that are left in world. -# Default: 1 - (by clicking "Enter World" player will log back into a character that is already in world) -# 0 - (by clicking "Enter World" player will get an error message when trying to log into a character -# that is left in world, and has to wait a minute for the character to be removed from world) +# ChatFlood.MessageDelay +# Description: Time (in seconds) between messages to be counted into ChatFlood.MessageCount. +# Default: 1 -EnableLoginAfterDC = 1 +ChatFlood.MessageDelay = 1 # -# DontCacheRandomMovementPaths -# Description: Random movement paths (calculated using MoveMaps) can be cached to save cpu time, -# but this may use up considerable amount of memory and can be prevented by setting this option to 1. -# Recommended setting for populated servers is having enough RAM and setting this to 0. -# Default: 0 - (cache paths, uses more memory) -# 1 - (don't cache, uses more cpu) +# ChatFlood.AddonMessageCount +# Description: Chat flood protection, number of addon messages before player gets muted. +# Default: 100 - (Enabled) +# 0 - (Disabled) -DontCacheRandomMovementPaths = 0 +ChatFlood.AddonMessageCount = 100 # -# MoveMaps.Enable -# Description: Enable/Disable pathfinding using mmaps - recommended. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# ChatFlood.AddonMessageDelay +# Description: Time (in seconds) between addon messages to be counted into ChatFlood.AddonMessageCount. +# Default: 1 -MoveMaps.Enable = 1 +ChatFlood.AddonMessageDelay = 1 # -# Minigob.Manabonk.Enable -# Description: Enable/ Disable Minigob Manabonk -# Default: 1 +# ChatFlood.MuteTime +# Description: Time (in seconds) characters get muted for violating ChatFlood.MessageCount / ChatFlood.AddonMessageCount. +# Default: 10 -Minigob.Manabonk.Enable = 1 +ChatFlood.MuteTime = 10 # -# Allow.IP.Based.Action.Logging -# Description: Logs actions, e.g. account login and logout to name a few, based on IP of current session. +# Chat.MuteFirstLogin +# Description: Speaking is allowed after playing for Chat.MuteTimeFirstLogin minutes. You may use party and guild chat. # Default: 0 - (Disabled) # 1 - (Enabled) -# -Allow.IP.Based.Action.Logging = 0 +Chat.MuteFirstLogin = 0 # -# Calculate.Creature.Zone.Area.Data -# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP) -# Default: 0 - (Do not show) -# +# Chat.MuteTimeFirstLogin +# Description: The time after which the player will be able to speak. +# Default: 120 - (Minutes) -Calculate.Creature.Zone.Area.Data = 0 +Chat.MuteTimeFirstLogin = 120 # -# Calculate.Gameoject.Zone.Area.Data -# Description: Calculate at loading gameobject zoneId / areaId and save in gameobject table (WARNING: SLOW WORLD SERVER STARTUP) -# Default: 0 - (Do not show) -# +# Channel.RestrictedLfg +# Description: Restrict LookupForGroup channel to characters registered in the LFG tool. +# Default: 1 - (Enabled, Allow join to channel only if registered in LFG) +# 0 - (Disabled, Allow join to channel in any time) -Calculate.Gameoject.Zone.Area.Data = 0 +Channel.RestrictedLfg = 1 # -# Group.Raid.LevelRestriction -# -# The Group members need to the same, or higher level than the specified value. -# Minimum level is 10. -# Default: 10 +# Channel.SilentlyGMJoin +# Description: Silently join GM characters to channels. If set to 1, channel kick and ban +# commands issued by a GM will not be broadcasted. +# Default: 0 - (Disabled, Join with announcement) +# 1 - (Enabled, Join without announcement) + +Channel.SilentlyGMJoin = 0 + +# Channel.ModerationGMLevel +# Min GM account security level required for executing moderator in-game commands in the channels +# This also bypasses password prompts on joining channels which require password +# 0 (in-game channel moderator privileges only) +# Default: 1 (enabled for moderators and above) + +Channel.ModerationGMLevel = 1 + # +# ChatLevelReq.Channel +# Description: Level requirement for characters to be able to write in chat channels. +# Default: 1 -Group.Raid.LevelRestriction = 10 +ChatLevelReq.Channel = 1 # -# DungeonFinder.OptionsMask -# Description: Dungeon and raid finder system. -# Value is a bitmask consisting of: -# LFG_OPTION_ENABLE_DUNGEON_FINDER = 1, Enable the dungeon finder browser -# LFG_OPTION_ENABLE_RAID_BROWSER = 2, Enable the raid browser -# LFG_OPTION_ENABLE_SEASONAL_BOSSES = 4, Enable seasonal bosses -# Default: 5 +# ChatLevelReq.Whisper +# Description: Level requirement for characters to be able to whisper other characters. +# Default: 1 -DungeonFinder.OptionsMask = 5 +ChatLevelReq.Whisper = 1 # -# LFG.Location.All +# ChatLevelReq.Say +# Description: Level requirement for characters to be able to use say/yell/emote. +# Default: 1 + +ChatLevelReq.Say = 1 + # -# Includes satellite to search for work elsewhere LFG -# Default: 0 - Disable -# 1 - Enable +# PartyLevelReq +# Description: Minimum level at which players can invite to group, even if they aren't on +# the invite friends list. (Players who are on that friend list can always +# invite despite having lower level) +# Default: 1 + +PartyLevelReq = 1 + # +# PreserveCustomChannels +# Description: Store custom chat channel settings like password, automatic ownership handout +# or ban list in the database. Needs to be enabled to save custom +# world/trade/etc. channels that have automatic ownership handout disabled. +# (.channel set ownership $channel off) +# Default: 0 - (Disabled, Blizzlike, Channel settings are lost if last person left) +# 1 - (Enabled) -LFG.Location.All = 0 +PreserveCustomChannels = 1 # -# DungeonAccessRequirements.PrintMode +# PreserveCustomChannelDuration +# Description: Time (in days) that needs to pass before the customs chat channels get +# cleaned up from the database. Only channels with ownership handout enabled +# (default behavior) will be cleaned. +# Default: 14 - (Enabled, Clean channels that haven't been used for 14 days) +# 0 - (Disabled, Infinite channel storage) + +PreserveCustomChannelDuration = 14 + # -# Description: Select the preferred format to display information to the player who cannot enter a portal dungeon because when has not met the access requirements: -# Default: 1 - (Display only one requirement at a time (BlizzLike, like in the LFG interface)) -# 0 - (Display no extra information, only "Requirements not met") -# 2 - (Display detailed requirements, all at once, with clickable links) +################################################################################################### + +################################################################################################### +# FACTION INTERACTION # +# AllowTwoSide.Accounts +# Description: Allow creating characters of both factions on the same account. +# Default: 1 - (Enabled) +# 0 - (Disabled) -DungeonAccessRequirements.PrintMode = 1 +AllowTwoSide.Accounts = 1 # -# DungeonAccessRequirements.PortalAvgIlevelCheck -# -# Description: Enable average item level requirement when entering a dungeon/raid's portal (= deny the entry if player has too low average ilevel, like in LFG). -# Default: 0 - (Disabled -> Blizzlike) +# AllowTwoSide.Interaction.Calendar +# Description: Allow calendar invites between factions. +# Default: 0 - (Disabled) # 1 - (Enabled) -DungeonAccessRequirements.PortalAvgIlevelCheck = 0 +AllowTwoSide.Interaction.Calendar = 0 # -# DungeonAccessRequirements.LFGLevelDBCOverride -# -# Description: If enabled, use `min_level` and `max_level` values from table `dungeon_access_requirements` to list or to hide a dungeon from the LFG window. +# AllowTwoSide.Interaction.Chat +# Description: Allow say chat between factions. # Default: 0 - (Disabled) # 1 - (Enabled) -DungeonAccessRequirements.LFGLevelDBCOverride = 0 +AllowTwoSide.Interaction.Chat = 0 # -# DungeonAccessRequirements.OptionalStringID -# -# Description: Display an extra message from acore_strings in the chat after printing the dungeon access requirements. -# To enable it set the ID of your desired string from the table acore_strings +# AllowTwoSide.Interaction.Emote +# Description: Allow emote messages between factions (e.g. "/e looks into the sky") # Default: 0 - (Disabled) -# 1+ - (Enabled) +# 1 - (Enabled) -DungeonAccessRequirements.OptionalStringID = 0 +AllowTwoSide.Interaction.Emote = 0 # -# ICC Buff -# Description: Specify ICC buff -# (It is necessary to restart the server after changing the values!) -# Default: ICC.Buff.Horde = 73822 -# ICC.Buff.Alliance = 73828 -# -# Spell IDs for the auras: -# 73816 - 5% buff Horde -# 73818 - 10% buff Horde -# 73819 - 15% buff Horde -# 73820 - 20% buff Horde -# 73821 - 25% buff Horde -# 73822 - 30% buff Horde -# 73762 - 5% buff Alliance -# 73824 - 10% buff Alliance -# 73825 - 15% buff Alliance -# 73826 - 20% buff Alliance -# 73827 - 25% buff Alliance -# 73828 - 30% buff Alliance +# AllowTwoSide.Interaction.Channel +# Description: Allow channel chat between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -ICC.Buff.Horde = 73822 -ICC.Buff.Alliance = 73828 +AllowTwoSide.Interaction.Channel = 0 # -# Item.SetItemTradeable -# Description: Enabled/Disabled trading BoP items among raid members. -# Default: 1 - (Set BoP items tradeable timer to 2 hours) -# 0 - (Disable trading BoP items among raid members) +# AllowTwoSide.Interaction.Group +# Description: Allow group joining between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -Item.SetItemTradeable = 1 +AllowTwoSide.Interaction.Group = 0 # -# FFAPvPTimer -# Description: Specify time offset when player unset FFAPvP flag when leaving FFAPvP area. (e.g. Gurubashi Arena) -# Default: 30 sec +# AllowTwoSide.Interaction.Guild +# Description: Allow guild joining between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -FFAPvPTimer = 30 +AllowTwoSide.Interaction.Guild = 0 # -# LootNeedBeforeGreedILvlRestriction -# Description: Specify level restriction for items below player's subclass in Need Before Greed loot mode in DF groups -# Default: 70 -# 0 - Disabled +# AllowTwoSide.Interaction.Arena +# Description: Allow joining arena teams between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -LootNeedBeforeGreedILvlRestriction = 70 +AllowTwoSide.Interaction.Arena = 0 # -# LFG.MaxKickCount -# Description: Specify the maximum number of kicks allowed in LFG groups (max 3 kicks) -# Default: 2 -# 0 - Disabled (kicks are never allowed) +# AllowTwoSide.Interaction.Auction +# Description: Allow auctions between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -LFG.MaxKickCount = 2 +AllowTwoSide.Interaction.Auction = 0 # -# LFG.KickPreventionTimer -# Description: Specify for how long players are prevented from being kicked after just joining LFG groups -# Default: 900 secs (15 minutes) -# 0 - Disabled +# AllowTwoSide.Interaction.Mail +# Description: Allow sending mails between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -LFG.KickPreventionTimer = 900 +AllowTwoSide.Interaction.Mail = 0 # -# EnablePlayerSettings -# Description: Enables the usage of character specific settings. -# Default: 0 - Disabled -# 1 - Enabled +# AllowTwoSide.WhoList +# Description: Show characters from both factions in the /who list. +# Default: 0 - (Disabled) +# 1 - (Enabled) -EnablePlayerSettings = 0 +AllowTwoSide.WhoList = 0 # -# JoinBGAndLFG.Enable -# Description: Allow queueing for BG and LFG at the same time. -# Default: 0 - Disabled -# 1 - Enabled +# AllowTwoSide.AddFriend +# Description: Allow adding friends from other faction the friends list. +# Default: 0 - (Disabled) +# 1 - (Enabled) -JoinBGAndLFG.Enable = 0 +AllowTwoSide.AddFriend = 0 # -# LeaveGroupOnLogout.Enabled -# Description: Should the player leave their group when they log out? -# (It does not affect raids or dungeon finder groups) -# -# Default: 1 - (Enabled) +# AllowTwoSide.Trade +# Description: Allow trading between factions. +# Default: 0 - (Disabled) +# 1 - (Enabled) -LeaveGroupOnLogout.Enabled = 1 +AllowTwoSide.Trade = 0 # -# QuestPOI.Enabled -# Description: Show points of interest on the map -# Default: 1 - Enabled -# 0 - Disabled +# TalentsInspecting +# Description: Allow inspecting characters from the opposing faction. +# Doesn't affect characters in gamemaster mode. +# Default: 1 - (Enabled) +# 0 - (Disabled) -QuestPOI.Enabled = 1 +TalentsInspecting = 1 # # ChangeFaction.MaxMoney @@ -3862,340 +4177,205 @@ QuestPOI.Enabled = 1 ChangeFaction.MaxMoney = 0 -# -# Pet.RankMod.Health -# Description: Allows pet health to be modified by rank health rates (set in config) -# Default: 1 - Enabled -# 0 - Disabled - -Pet.RankMod.Health = 1 - -# -# AuctionHouse.SearchTimeout -# Description: Time (in milliseconds) after which an auction house search is discarded. -# Default: 1000 - (1 second) - -AuctionHouse.SearchTimeout = 1000 - # ################################################################################################### ################################################################################################### -# LOGGING SYSTEM SETTINGS -# -# Appender config values: Given an appender "name" -# Appender.name -# Description: Defines 'where to log'. -# Format: Type,LogLevel,Flags,optional1,optional2,optional3 -# -# Type -# 0 - (None) -# 1 - (Console) -# 2 - (File) -# 3 - (DB) -# -# LogLevel -# 0 - (Disabled) -# 1 - (Fatal) -# 2 - (Error) -# 3 - (Warning) -# 4 - (Info) -# 5 - (Debug) -# 6 - (Trace) -# -# Flags: -# 0 - None -# 1 - Prefix Timestamp to the text -# 2 - Prefix Log Level to the text -# 4 - Prefix Log Filter type to the text -# 8 - Append timestamp to the log file name. Format: YYYY-MM-DD_HH-MM-SS -# (Only used with Type = 2) -# 16 - Make a backup of existing file before overwrite -# (Only used with Mode = w) -# -# Colors (read as optional1 if Type = Console) -# Format: "fatal error warn info debug trace" -# 0 - BLACK -# 1 - RED -# 2 - GREEN -# 3 - BROWN -# 4 - BLUE -# 5 - MAGENTA -# 6 - CYAN -# 7 - GREY -# 8 - YELLOW -# 9 - LRED -# 10 - LGREEN -# 11 - LBLUE -# 12 - LMAGENTA -# 13 - LCYAN -# 14 - WHITE -# Example: "1 9 3 6 5 8" -# -# File: Name of the file (read as optional1 if Type = File) -# Allows to use one "%s" to create dynamic files -# -# Mode: Mode to open the file (read as optional2 if Type = File) -# a - (Append) -# w - (Overwrite) -# -# MaxFileSize: Maximum file size of the log file before creating a new log file -# (read as optional3 if Type = File) -# Size is measured in bytes expressed in a 64-bit unsigned integer. -# Maximum value is 4294967295 (4 GB). Leave blank for no limit. -# NOTE: Does not work with dynamic filenames. -# Example: 536870912 (512 MB) +# RECRUIT A FRIEND # +# RecruitAFriend.MaxLevel +# Description: Highest level up to which a character can benefit from the Recruit-A-Friend +# experience multiplier. +# Default: 60 -Appender.Console=1,4,0,"1 9 3 6 5 8" -Appender.Server=2,5,0,Server.log,w -# Appender.Chat=2,4,15,chat_%s.log -# Appender.GM=2,5,15,gm_%s.log -Appender.Errors=2,5,0,Errors.log -# Appender.DB=3,5,0 +RecruitAFriend.MaxLevel = 60 -# Logger config values: Given a logger "name" -# Logger.name -# Description: Defines 'What to log' -# Format: LogLevel,AppenderList # -# LogLevel -# 0 - (Disabled) -# 1 - (Fatal) -# 2 - (Error) -# 3 - (Warning) -# 4 - (Info) -# 5 - (Debug) -# 6 - (Trace) +# RecruitAFriend.MaxDifference +# Description: Highest level difference between linked Recruiter and Friend benefit from +# the Recruit-A-Friend experience multiplier. +# Default: 4 + +RecruitAFriend.MaxDifference = 4 + # -# AppenderList: List of appenders linked to logger -# (Using spaces as separator). +# MaxRecruitAFriendBonusDistance +# Description: Max distance between character and and group to gain the Recruit-A-Friend +# XP multiplier. +# Default: 100 + +MaxRecruitAFriendBonusDistance = 100 + # +################################################################################################### -Logger.root=2,Console Server -Logger.commands.gm=4,Console GM -Logger.diff=3,Console Server -Logger.mmaps=4,Server -Logger.scripts.hotswap=4,Console Server -Logger.server=4,Console Server -Logger.sql.sql=2,Console Errors -Logger.sql=4,Console Server -Logger.time.update=4,Console Server -Logger.module=4,Console Server -Logger.spells.scripts=2,Console Errors +################################################################################################### +# CALENDAR +# +# Calendar.DeleteOldEventsHour +# Description: Hour of the day when the daily deletion of old calendar events occurs. +# Range: 0-23 +# Default: 6 - (06:00 AM) -#Logger.achievement=4,Console Server -#Logger.addon=4,Console Server -#Logger.ahbot=4,Console Server -#Logger.auctionHouse=4,Console Server -#Logger.autobroadcast=4, Console Server -#Logger.bg.arena=4,Console Server -#Logger.bg.battlefield=4,Console Server -#Logger.bg.battleground=4,Console Server -#Logger.bg.reportpvpafk=4,Console Server -#Logger.calendar=4,Console Server -#Logger.chat.say=4,Console Chat -#Logger.chat.emote=4,Console Chat -#Logger.chat.yell=4,Console Chat -#Logger.chat.whisper=4,Console Chat -#Logger.chat.party=4,Console Chat -#Logger.chat.raid=4,Console Chat -#Logger.chat.bg=4,Console Chat -#Logger.chat.guild=4,Console Chat -#Logger.chat.guild.officer=4,Console Chat -#Logger.chat.channel=4,Console Chat -#Logger.chat.addon.msg=4,Console Chat -#Logger.chat.addon.emote=4,Console Chat -#Logger.chat.addon.yell=4,Console Chat -#Logger.chat.addon.whisper=4,Console Chat -#Logger.chat.addon.party=4,Console Chat -#Logger.chat.addon.raid=4,Console Chat -#Logger.chat.addon.bg=4,Console Chat -#Logger.chat.addon.guild=4,Console Chat -#Logger.chat.addon.guild.officer=4,Console Chat -#Logger.chat.addon.channel=4,Console Chat -#Logger.cheat=4,Console Server -#Logger.commands.ra=4,Console Server -#Logger.condition=4,Console Server -#Logger.dbc=4,Console Server -#Logger.disable=4,Console Server -#Logger.entities.dyobject=4,Console Server -#Logger.entities.faction=4,Console Server -#Logger.entities.gameobject=4,Console Server -#Logger.entities.object=4,Console Server -#Logger.entities.pet=4,Console Server -#Logger.entities.player.character=4,Console Server -#Logger.entities.player.dump=4,Console Server -#Logger.entities.player.items=4,Console Server -#Logger.entities.player.loading=4,Console Server -#Logger.entities.player.skills=4,Console Server -#Logger.entities.player=4,Console Server -#Logger.entities.transport=4,Console Server -#Logger.entities.unit.ai=4,Console Server -#Logger.entities.unit=4,Console Server -#Logger.entities.vehicle=4,Console Server -#Logger.gameevent=4,Console Server -#Logger.group=4,Console Server -#Logger.guild=4,Console Server -#Logger.instance.save=4,Console Server -#Logger.instance.script=4,Console Server -#Logger.lfg=4,Console Server -#Logger.loot=4,Console Server -#Logger.mail=4,Console Server -#Logger.maps.script=4,Console Server -#Logger.maps=4,Console Server -#Logger.misc=4,Console Server -#Logger.mmaps.tiles=4,Console Server -#Logger.movement.flightpath=4,Console Server -#Logger.movement.motionmaster=4,Console Server -#Logger.movement.splinechain=4,Console Server -#Logger.movement=4,Console Server -#Logger.network.kick=4,Console Server -#Logger.network.opcode=4,Console Server -#Logger.network.soap=4,Console Server -#Logger.network=4,Console Server -#Logger.outdoorpvp=4,Console Server -#Logger.pool=4,Console Server -#Logger.rbac=4,Console Server -#Logger.reputation=4,Console Server -#Logger.scripts.ai.escortai=4,Console Server -#Logger.scripts.ai.followerai=4,Console Server -#Logger.scripts.ai.petai=4,Console Server -#Logger.scripts.ai.sai=4,Console Server -#Logger.scripts.ai=4,Console Server -#Logger.scripts.cos=4,Console Server -#Logger.scripts=4,Console Server -#Logger.server.authserver=4,Console Server -#Logger.spells.aura.effect.nospell=4,Console Server -#Logger.spells.aura.effect=4,Console Server -#Logger.spells.effect.nospell=4,Console Server -#Logger.spells.effect=4,Console Server -#Logger.spells.scripts=4,Console Server -#Logger.spells=4,Console Server -#Logger.sql.dev=4,Console Server -#Logger.sql.driver=4,Console Server -#Logger.vehicles=4,Console Server -#Logger.warden=4,Console Server -#Logger.weather=4,Console Server +Calendar.DeleteOldEventsHour = 6 # -# Log.Async.Enable -# Description: Enables asynchronous message logging. +################################################################################################### + +################################################################################################### +# GAME EVENT +# +# Event.Announce +# Description: Announce events. # Default: 0 - (Disabled) # 1 - (Enabled) -Log.Async.Enable = 0 +Event.Announce = 0 # ################################################################################################### ################################################################################################### -# PACKET SPOOF PROTECTION SETTINGS +# AUCTION HOUSE # -# These settings determine which action to take when harmful packet spoofing is detected. -# -# PacketSpoof.Policy -# Description: Determines the course of action when packet spoofing is detected. -# Values: 0 - Log only -# 1 - Log + kick -# 2 - Log + kick + ban +# AuctionHouse.SearchTimeout +# Description: Time (in milliseconds) after which an auction house search is discarded. +# Default: 1000 - (1 second) -PacketSpoof.Policy = 1 +AuctionHouse.SearchTimeout = 1000 # -# PacketSpoof.BanMode -# Description: If PacketSpoof.Policy equals 2, this will determine the ban mode. -# Values: 0 - Ban Account -# 1 - Ban IP -# Note: Banning by character not supported for logical reasons. -# +# LevelReq.Auction +# Description: Level requirement for characters to be able to use the auction house. +# Default: 1 -PacketSpoof.BanMode = 0 +LevelReq.Auction = 1 # -# PacketSpoof.BanDuration -# Description: Duration of the ban in seconds. Only valid if PacketSpoof.Policy is set to 2. -# Set to 0 for permanent ban. -# Default: 86400 seconds (1 day) -# +# Rate.Auction.Time +# Rate.Auction.Deposit +# Rate.Auction.Cut +# Description: Auction rates (auction time, deposit get at auction start, +# auction cut from price at auction end) +# Default: 1 - (Rate.Auction.Time) +# 1 - (Rate.Auction.Deposit) +# 1 - (Rate.Auction.Cut) -PacketSpoof.BanDuration = 86400 +Rate.Auction.Time = 1 +Rate.Auction.Deposit = 1 +Rate.Auction.Cut = 1 # ################################################################################################### ################################################################################################### -# DEBUG +# PLAYER DUMP # -# Debug.Battleground -# Description: Enable or disable Battleground 1v0 mode. (If enabled, the in-game command is disabled.) -# Default: 0 - (Disabled) -# 1 - (Enabled) +# PlayerDump.DisallowPaths +# Description: Disallow using paths in PlayerDump output files +# Default: 1 -Debug.Battleground = 0 +PlayerDump.DisallowPaths = 1 # -# Debug.Arena -# Description: Enable or disable Arena 1v1 mode. (If enabled, the in-game command is disabled.) -# Default: 0 - (Disabled) -# 1 - (Enabled) +# PlayerDump.DisallowOverwrite +# Description: Disallow overwriting existing files with PlayerDump +# Default: 1 -Debug.Arena = 0 +PlayerDump.DisallowOverwrite = 1 # ################################################################################################### ################################################################################################### -# METRIC SETTINGS +# CUSTOM # -# These settings control the statistics sent to the metric database (currently InfluxDB) +# ICC Buff +# Description: Specify ICC buff +# (It is necessary to restart the server after changing the values!) +# Default: ICC.Buff.Horde = 73822 +# ICC.Buff.Alliance = 73828 # -# Metric.Enable -# Description: Enables statistics sent to the metric database. -# Default: 0 - (Disabled) -# 1 - (Enabled) +# Spell IDs for the auras: +# 73816 - 5% buff Horde +# 73818 - 10% buff Horde +# 73819 - 15% buff Horde +# 73820 - 20% buff Horde +# 73821 - 25% buff Horde +# 73822 - 30% buff Horde +# 73762 - 5% buff Alliance +# 73824 - 10% buff Alliance +# 73825 - 15% buff Alliance +# 73826 - 20% buff Alliance +# 73827 - 25% buff Alliance +# 73828 - 30% buff Alliance + +ICC.Buff.Horde = 73822 +ICC.Buff.Alliance = 73828 + # +# Minigob.Manabonk.Enable +# Description: Enable/ Disable Minigob Manabonk +# Default: 1 -Metric.Enable = 0 +Minigob.Manabonk.Enable = 1 # -# Metric.Interval -# Description: Interval between every batch of data sent in seconds -# Default: 10 seconds +# Calculate.Creature.Zone.Area.Data +# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP) +# Default: 0 - (Do not show) # -Metric.Interval = 10 +Calculate.Creature.Zone.Area.Data = 0 # -# Metric.ConnectionInfo -# Description: Connection settings for metric database (currently InfluxDB). -# Example: "hostname;port;database" -# Default: "127.0.0.1;8086;worldserver" +# Calculate.Gameoject.Zone.Area.Data +# Description: Calculate at loading gameobject zoneId / areaId and save in gameobject table (WARNING: SLOW WORLD SERVER STARTUP) +# Default: 0 - (Do not show) # -Metric.ConnectionInfo = "127.0.0.1;8086;worldserver" +Calculate.Gameoject.Zone.Area.Data = 0 # -# Metric.OverallStatusInterval -# Description: Interval between every gathering of overall worldserver status data in seconds -# Default: 1 second +# TeleportTimeoutNear +# Description: No description +# Default: 25 + +TeleportTimeoutNear = 25 + # +# TeleportTimeoutFar +# Description: No description +# Default: 45 -Metric.OverallStatusInterval = 1 +TeleportTimeoutFar = 45 # -# Metric threshold values: Given a metric "name" -# Metric.Threshold.name -# Description: Skips sending statistics with a value lower than the config value. -# If the threshold is commented out, the metric will be ignored. -# Only metrics logged with METRIC_DETAILED_TIMER in the sources are affected. -# Disabled by default. Requires WITH_DETAILED_METRICS CMake flag. +################################################################################################### + +################################################################################################### +# DEBUG # -# Format: Value as integer +# Debug.Battleground +# Description: Enable or disable Battleground 1v0 mode. (If enabled, the in-game command is disabled.) +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Debug.Battleground = 0 + # +# Debug.Arena +# Description: Enable or disable Arena 1v1 mode. (If enabled, the in-game command is disabled.) +# Default: 0 - (Disabled) +# 1 - (Enabled) -#Metric.Threshold.world_update_sessions_time = 100 -#Metric.Threshold.worldsession_update_opcode_time = 50 +Debug.Arena = 0 # ################################################################################################### + +################################################################################################### +# # +# GAME SETTINGS END # +# # +################################################################################################### From 764611eaf64a4514dc27311660653332c6bd9813 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 17 Sep 2023 10:25:54 -0300 Subject: [PATCH 026/340] fix(DB/SAI): Rework Sethekk Halls SAI (#17257) * Create rev_1694744446848459200.sql * Update rev_1694744446848459200.sql Co-Authored-By: offl <11556157+offl@users.noreply.github.com> * Update rev_1694744446848459200.sql Co-Authored-By: offl <11556157+offl@users.noreply.github.com> * Update rev_1694744446848459200.sql Co-Authored-By: offl <11556157+offl@users.noreply.github.com> --------- Co-authored-by: offl <11556157+offl@users.noreply.github.com> --- .../rev_1694744446848459200.sql | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694744446848459200.sql diff --git a/data/sql/updates/pending_db_world/rev_1694744446848459200.sql b/data/sql/updates/pending_db_world/rev_1694744446848459200.sql new file mode 100644 index 00000000000000..ef6ea9422964d0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694744446848459200.sql @@ -0,0 +1,165 @@ +-- https://github.com/TrinityCore/TrinityCore/commit/dbcbfaa6c7834507b0eba291b45b3927d73ac6d0 +DELETE FROM `creature_text` WHERE `CreatureID` IN (18318,18319,18320,18321,18322,18323,18325,18326,18327,18328) AND `GroupID` = 0; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(18318,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18318,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18318,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18318,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18318,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18319,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18319,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18319,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18319,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18319,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18320,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18320,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18320,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18320,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18320,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18321,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18321,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18321,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18321,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18321,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18322,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18322,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18322,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18322,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18322,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18323,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18323,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18323,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18323,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18323,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18325,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18325,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18325,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18325,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18325,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18326,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18326,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18326,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18326,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18326,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18327,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18327,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18327,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18327,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18327,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'), + +(18328,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'), +(18328,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'), +(18328,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'), +(18328,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'), +(18328,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18318,18319,18320,18321,18322,18323,18325,18326,18327,18328,18701,18703,19203,19204,19205,19206,19428,19429,21891,21904) 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`, `event_param6`, `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 +(18318, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - On Aggro - Say Line 0'), +(18318, 0, 1, 0, 0, 0, 100, 0, 5300, 7100, 10800, 18100, 0, 0, 11, 16145, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - In Combat - Cast \'Sunder Armor\''), +(18318, 0, 2, 0, 0, 0, 100, 0, 7400, 15700, 27300, 47100, 0, 0, 11, 33961, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - In Combat - Cast \'Spell Reflection\''), + +(18319, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 30000, 30000, 0, 0, 11, 32689, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - Out of Combat - Cast \'Arcane Destruction\''), +(18319, 0, 1, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Aggro - Say Line 0'), +(18319, 0, 2, 0, 0, 0, 100, 0, 3100, 5300, 3100, 5300, 0, 0, 11, 32689, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Destruction\''), +(18319, 0, 3, 0, 0, 0, 100, 2, 7800, 13300, 10400, 17700, 0, 0, 11, 22272, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Missiles\' (Normal Dungeon)'), +(18319, 0, 4, 0, 0, 0, 100, 4, 7800, 13300, 10400, 17700, 0, 0, 11, 33988, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Missiles\' (Heroic Dungeon)'), +(18319, 0, 5, 0, 74, 0, 100, 2, 9600, 15700, 9600, 15700, 75, 40, 11, 17843, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-75% Health - Cast \'Flash Heal\' (Normal Dungeon)'), +(18319, 0, 6, 0, 74, 0, 100, 4, 9600, 15700, 9600, 15700, 75, 40, 11, 17138, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-75% Health - Cast \'Flash Heal\' (Heroic Dungeon)'), +(18319, 0, 7, 0, 74, 0, 100, 2, 13200, 21700, 13200, 21700, 40, 40, 11, 12160, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-40% Health - Cast \'Rejuvenation\' (Normal Dungeon)'), +(18319, 0, 8, 0, 74, 0, 100, 4, 13200, 21700, 13200, 21700, 40, 40, 11, 15981, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-40% Health - Cast \'Rejuvenation\' (Heroic Dungeon)'), + +(18320, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - On Aggro - Say Line 0'), +(18320, 0, 1, 0, 0, 0, 100, 2, 6600, 18600, 9300, 21800, 0, 0, 11, 32675, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Shadow Missiles\' (Normal Dungeon)'), +(18320, 0, 2, 0, 0, 0, 100, 4, 6600, 18600, 9300, 21800, 0, 0, 11, 38148, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Shadow Missiles\' (Heroic Dungeon)'), +(18320, 0, 3, 0, 0, 0, 100, 2, 4800, 9600, 21700, 33800, 0, 0, 11, 32682, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Curse of the Dark Talon\' (Normal Dungeon)'), +(18320, 0, 4, 0, 0, 0, 100, 4, 4800, 9600, 21700, 33800, 0, 0, 11, 38149, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Curse of the Dark Talon\' (Heroic Dungeon)'), + +(18321, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - On Aggro - Say Line 0'), +(18321, 0, 2, 0, 0, 0, 100, 0, 0, 0, 16300, 24300, 0, 0, 11, 32674, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - In Combat - Cast \'Avenger\'s Shield\''), +(18321, 0, 3, 0, 0, 0, 100, 0, 9300, 16700, 14300, 25400, 0, 0, 11, 32654, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - In Combat - Cast \'Talon of Justice\''), + +(18322, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Aggro - Say Line 0'), +(18322, 0, 1, 0, 0, 0, 100, 2, 7200, 20500, 10800, 21700, 0, 0, 11, 33964, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Bloodthirst\' (Normal Dungeon)'), +(18322, 0, 2, 0, 0, 0, 100, 4, 7200, 20500, 10800, 21700, 0, 0, 11, 40423, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Bloodthirst\' (Heroic Dungeon)'), +(18322, 0, 3, 0, 0, 0, 100, 0, 6100, 17400, 16800, 21700, 0, 0, 11, 32651, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Howling Screech\''), +(18322, 0, 4, 0, 38, 0, 100, 0, 0, 1, 0, 0, 0, 0, 11, 34970, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Data Set 0 1 - Cast \'Frenzy\''), +(18322, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 19, 18322, 30, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Death - Set Data 0 1'), + +(18323, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Guard - On Aggro - Say Line 0'), +(18323, 0, 1, 0, 0, 0, 100, 0, 3600, 15700, 10900, 22100, 0, 0, 11, 33967, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Guard - In Combat - Cast \'Thunderclap\''), + +(18325, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - On Aggro - Say Line 0'), +(18325, 0, 1, 0, 0, 0, 100, 0, 8700, 17700, 13200, 24100, 0, 0, 11, 27641, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - In Combat - Cast \'Fear\''), +(18325, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 32692, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - On Death - Cast \'Summon Arakkoa Spirit\''), + +(18326, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - On Aggro - Say Line 0'), +(18326, 0, 1, 0, 0, 0, 100, 2, 4300, 9100, 7200, 14500, 0, 0, 11, 15501, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Earth Shock\' (Normal Dungeon)'), +(18326, 0, 2, 0, 0, 0, 100, 4, 4300, 9100, 7200, 14500, 0, 0, 11, 22885, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Earth Shock\' (Heroic Dungeon)'), +(18326, 0, 3, 0, 0, 0, 100, 0, 7900, 14500, 90000, 90000, 0, 0, 11, 32663, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Summon Dark Vortex\''), + +(18327, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - On Aggro - Say Line 0'), +(18327, 0, 1, 0, 0, 0, 100, 0, 9100, 24100, 27800, 48300, 0, 0, 11, 32764, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - In Combat - Cast \'Summon Charming Totem\''), +(18327, 0, 2, 0, 0, 0, 100, 0, 8400, 23200, 9700, 32600, 0, 0, 11, 35013, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - In Combat - Cast \'Shrink\''), + +(18328, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - On Aggro - Say Line 0'), +(18328, 0, 1, 0, 0, 0, 100, 2, 6100, 12100, 18500, 27700, 0, 0, 11, 32690, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Arcane Lightning\' (Normal Dungeon)'), +(18328, 0, 2, 0, 0, 0, 100, 4, 1200, 12100, 7200, 13300, 0, 0, 11, 38146, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Arcane Lightning\' (Heroic Dungeon)'), +(18328, 0, 3, 0, 0, 0, 100, 0, 2400, 8700, 8400, 19300, 0, 0, 11, 32129, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Faerie Fire\''), + +(18701, 0, 0, 0, 0, 0, 100, 0, 3600, 7200, 8400, 19300, 0, 0, 11, 12471, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Vortex - In Combat - Cast \'Shadow Bolt\''), + +(18703, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Just Summoned - Set In Combat With Zone'), +(18703, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 17321, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Cast \'Spirit Spawn-in\''), +(18703, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 24051, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Cast \'Spirit Burst\''), +(18703, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 116, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Set Corpse Delay'), +(18703, 0, 4, 0, 60, 0, 100, 1, 10000, 10000, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Update - Kill Self (No Repeat)'), + +(19203, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33610, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - On Just Summoned - Cast \'Syth A Dummy\''), +(19203, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33526, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - In Combat - Cast \'Flame Buffet\' (Normal Dungeon)'), +(19203, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38141, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - In Combat - Cast \'Flame Buffet\' (Heroic Dungeon)'), +(19203, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - On Death - Cast \'Syth Dummy\''), + +(19204, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33611, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - On Just Summoned - Cast \'Syth B Dummy\''), +(19204, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33528, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - In Combat - Cast \'Frost Buffet\' (Normal Dungeon)'), +(19204, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38142, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - In Combat - Cast \'Frost Buffet\' (Heroic Dungeon)'), +(19204, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - On Death - Cast \'Syth Dummy\''), + +(19205, 0, 0, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33527, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - In Combat - Cast \'Arcane Buffet\' (Normal Dungeon)'), +(19205, 0, 1, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38138, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - In Combat - Cast \'Arcane Buffet\' (Heroic Dungeon)'), +(19205, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - On Death - Cast \'Syth Dummy\''), + +(19206, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - On Just Summoned - Cast \'Syth C Dummy\''), +(19206, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33529, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - In Combat - Cast \'Shadow Buffet\' (Normal Dungeon)'), +(19206, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38143, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - In Combat - Cast \'Shadow Buffet\' (Heroic Dungeon)'), +(19206, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - On Death - Cast \'Syth Dummy\''), + +(19428, 0, 0, 0, 0, 0, 100, 2, 4800, 14500, 13300, 22900, 0, 0, 11, 17503, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Frostbolt\' (Normal Dungeon)'), +(19428, 0, 1, 0, 0, 0, 100, 4, 4800, 14500, 13300, 22900, 0, 0, 11, 38238, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Frostbolt\' (Heroic Dungeon)'), +(19428, 0, 2, 0, 0, 0, 100, 2, 5600, 22100, 8400, 25400, 0, 0, 11, 38193, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Lightning Breath\' (Normal Dungeon)'), +(19428, 0, 3, 0, 0, 0, 100, 4, 3600, 22100, 7200, 14400, 0, 0, 11, 38133, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Lightning Breath\' (Heroic Dungeon)'), +(19428, 0, 4, 0, 0, 0, 100, 0, 6200, 21700, 12100, 22800, 0, 0, 11, 38110, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Wing Buffet\''), + +(19429, 0, 0, 0, 9, 0, 100, 3, 0, 0, 0, 0, 8, 25, 11, 38059, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Normal Dungeon) (No Repeat)'), +(19429, 0, 1, 0, 9, 0, 100, 5, 0, 0, 0, 0, 8, 25, 11, 39197, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Heroic Dungeon) (No Repeat)'), +(19429, 0, 2, 0, 0, 0, 100, 2, 4800, 13600, 10900, 24100, 0, 0, 11, 32901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - In Combat - Cast \'Carnivorous Bite\' (Normal Dungeon)'), +(19429, 0, 3, 0, 0, 0, 100, 4, 4800, 13600, 10900, 24100, 0, 0, 11, 39198, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - In Combat - Cast \'Carnivorous Bite\' (Heroic Dungeon)'), + +(21891, 0, 0, 0, 0, 0, 100, 0, 4300, 12100, 15600, 19300, 0, 0, 11, 38056, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Ripper - In Combat - Cast \'Flesh Rip\''), + +(21904, 0, 0, 0, 9, 0, 100, 3, 0, 0, 0, 0, 8, 25, 11, 38059, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Normal Dungeon) (No Repeat)'), +(21904, 0, 1, 0, 9, 0, 100, 5, 0, 0, 0, 0, 8, 25, 11, 39197, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Heroic Dungeon) (No Repeat)'), +(21904, 0, 2, 0, 0, 0, 100, 2, 3800, 11100, 10900, 21700, 0, 0, 11, 32901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Carnivorous Bite\' (Normal Dungeon)'), +(21904, 0, 3, 0, 0, 0, 100, 4, 3800, 11100, 10900, 21700, 0, 0, 11, 39198, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Carnivorous Bite\' (Heroic Dungeon)'), +(21904, 0, 4, 0, 0, 0, 100, 0, 6200, 25500, 12100, 24100, 0, 0, 11, 18144, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Swoop\''); + +-- Ravenguard ImmuneMask +UPDATE `creature_template` SET `mechanic_immune_mask` = 71698 WHERE (`entry` IN (18322, 20696)); From 1eb573be1c893e7cabf683ec582420079f2e1e6b Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sun, 17 Sep 2023 13:26:26 +0000 Subject: [PATCH 027/340] fix(Scripts/Karazhan): Curator fixes (#17270) * stop channeling on enrage * Create rev_1694861198470600600.sql * Update boss_curator.cpp * Update src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --------- Co-authored-by: Angelo Venturini Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../updates/pending_db_world/rev_1694861198470600600.sql | 2 ++ .../scripts/EasternKingdoms/Karazhan/boss_curator.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1694861198470600600.sql diff --git a/data/sql/updates/pending_db_world/rev_1694861198470600600.sql b/data/sql/updates/pending_db_world/rev_1694861198470600600.sql new file mode 100644 index 00000000000000..3c14c5109bdf29 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694861198470600600.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `unit_flags2` = 0 WHERE (`entry` = 15691); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index dfc07e01282962..880a5e37f6dbd4 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -54,8 +54,9 @@ struct boss_curator : public BossAI me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_POWER_BURN, true); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_POWER_BURN, true); ScheduleHealthCheckEvent(15, [&] { - DoCastSelf(SPELL_ARCANE_INFUSION, true); - Talk(SAY_ENRAGE); + me->InterruptNonMeleeSpells(true); + DoCastSelf(SPELL_ARCANE_INFUSION, true); + Talk(SAY_ENRAGE); }); } @@ -85,7 +86,7 @@ struct boss_curator : public BossAI DoCastSelf(SPELL_ASTRAL_DECONSTRUCTION, true); }).Schedule(10s, [this](TaskContext context) { - if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 45.0f, true, false)) + if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 45.0f, true, false)) { DoCast(target, SPELL_HATEFUL_BOLT); } From 655f2bb15b614f67d6ff3406ee2b45fcaccd9748 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 13:27:00 +0000 Subject: [PATCH 028/340] chore(DB): import pending files Referenced commit(s): c709e2e7d3ba426178c2eebce30f6d30da71ff7c --- .../rev_1694744446848459200.sql => db_world/2023_09_17_07.sql} | 1 + .../rev_1694861198470600600.sql => db_world/2023_09_17_08.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1694744446848459200.sql => db_world/2023_09_17_07.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1694861198470600600.sql => db_world/2023_09_17_08.sql} (63%) diff --git a/data/sql/updates/pending_db_world/rev_1694744446848459200.sql b/data/sql/updates/db_world/2023_09_17_07.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1694744446848459200.sql rename to data/sql/updates/db_world/2023_09_17_07.sql index ef6ea9422964d0..ac2d924da6a77a 100644 --- a/data/sql/updates/pending_db_world/rev_1694744446848459200.sql +++ b/data/sql/updates/db_world/2023_09_17_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_06 -> 2023_09_17_07 -- https://github.com/TrinityCore/TrinityCore/commit/dbcbfaa6c7834507b0eba291b45b3927d73ac6d0 DELETE FROM `creature_text` WHERE `CreatureID` IN (18318,18319,18320,18321,18322,18323,18325,18326,18327,18328) AND `GroupID` = 0; INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1694861198470600600.sql b/data/sql/updates/db_world/2023_09_17_08.sql similarity index 63% rename from data/sql/updates/pending_db_world/rev_1694861198470600600.sql rename to data/sql/updates/db_world/2023_09_17_08.sql index 3c14c5109bdf29..fba22485e8bbb6 100644 --- a/data/sql/updates/pending_db_world/rev_1694861198470600600.sql +++ b/data/sql/updates/db_world/2023_09_17_08.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_17_07 -> 2023_09_17_08 -- UPDATE `creature_template` SET `unit_flags2` = 0 WHERE (`entry` = 15691); From 0bf559f9755942b14859fe49944a5758fe22b621 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 17 Sep 2023 10:56:02 -0300 Subject: [PATCH 029/340] feat(Core/Instance): Add TaskScheduler to the InstanceScript class (#17284) feat(Core/Instance): Add TaskScheduler to the instancescript class --- src/server/game/Instances/InstanceScript.cpp | 5 +++++ src/server/game/Instances/InstanceScript.h | 5 ++++- .../instance_ruins_of_ahnqiraj.cpp | 16 +++++----------- .../instance_temple_of_ahnqiraj.cpp | 6 ------ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 600edae4a2534c..5bc15b6702bb5f 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -218,6 +218,11 @@ void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state) } } +void InstanceScript::Update(uint32 diff) +{ + scheduler.Update(diff); +} + void InstanceScript::UpdateDoorState(GameObject* door) { DoorInfoMapBounds range = doors.equal_range(door->GetEntry()); diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 4f3a2d8c9bd8d2..da82f1fdcaaf1d 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -20,6 +20,7 @@ #include "CreatureAI.h" #include "ObjectMgr.h" +#include "TaskScheduler.h" #include "World.h" #include "ZoneScript.h" #include @@ -159,7 +160,7 @@ class InstanceScript : public ZoneScript void SaveToDB(); - virtual void Update(uint32 /*diff*/) {} + virtual void Update(uint32 /*diff*/); //Used by the map's CanEnter function. //This is to prevent players from entering during boss encounters. @@ -263,6 +264,8 @@ class InstanceScript : public ZoneScript // Allows executing code using all creatures registered in the instance script as minions void DoForAllMinions(uint32 id, std::function exec); + + TaskScheduler scheduler; protected: void SetHeaders(std::string const& dataHeaders); void SetBossNumber(uint32 number) { bosses.resize(number); } diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index b575abeb33275e..bd6ce0bf797ae5 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -154,8 +154,8 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript switch (type) { case DATA_RAJAXX_WAVE_ENGAGED: - _scheduler.CancelGroup(GROUP_RAJAXX_WAVE_TIMER); - _scheduler.Schedule(2min, [this](TaskContext context) + scheduler.CancelGroup(GROUP_RAJAXX_WAVE_TIMER); + scheduler.Schedule(2min, [this](TaskContext context) { CallNextRajaxxLeader(); context.SetGroup(GROUP_RAJAXX_WAVE_TIMER); @@ -195,8 +195,8 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript case NPC_YEGGETH: case NPC_PAKKON: case NPC_ZERRAN: - _scheduler.CancelAll(); - _scheduler.Schedule(1s, [this, formation](TaskContext /*context*/) + scheduler.CancelAll(); + scheduler.Schedule(1s, [this, formation](TaskContext /*context*/) { if (!formation->IsAnyMemberAlive()) { @@ -212,11 +212,6 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript } } - void Update(uint32 diff) override - { - _scheduler.Update(diff); - } - void SetGuidData(uint32 type, ObjectGuid data) override { if (type == DATA_PARALYZED) @@ -285,7 +280,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript void ResetRajaxxWaves() { _rajaxWaveCounter = 0; - _scheduler.CancelAll(); + scheduler.CancelAll(); for (auto const& data : RajaxxWavesData) { if (Creature* creature = GetCreature(data.at(0))) @@ -308,7 +303,6 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript ObjectGuid _andorovGUID; uint32 _rajaxWaveCounter; uint8 _buruPhase; - TaskScheduler _scheduler; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 1909fe48acce80..daa2c2e4ef7140 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -210,15 +210,9 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript return true; } - void Update(uint32 diff) override - { - scheduler.Update(diff); - } - private: GuidVector CThunGraspGUIDs; uint32 BugTrioDeathCount; - TaskScheduler scheduler; }; }; From 52744e60320ce95e3d168d9639245c118739b00f Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 17 Sep 2023 16:50:21 +0200 Subject: [PATCH 030/340] fix(Scripts/Karazhan): Shade of Aran now no longer casts spells whilst he should be drinking (#17282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * initial * remove redundancy * remove method * space gone * indentación --- .../Karazhan/boss_shade_of_aran.cpp | 241 +++++++++--------- 1 file changed, 118 insertions(+), 123 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 5a0869bf96b9aa..ec824e59b9c0f7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -103,8 +103,6 @@ struct boss_shade_of_aran : public BossAI uint32 CurrentNormalSpell; - bool Drinking; - void Reset() override { BossAI::Reset(); @@ -120,7 +118,7 @@ struct boss_shade_of_aran : public BossAI _fireCooledDown = true; _frostCooledDown = true; - Drinking = false; + _drinking = false; // Not in progress instance->SetData(DATA_ARAN, NOT_STARTED); @@ -209,7 +207,7 @@ struct boss_shade_of_aran : public BossAI } }).Schedule(1ms, [this](TaskContext context) { - if (!me->IsNonMeleeSpellCast(false)) + if (!me->IsNonMeleeSpellCast(false) && !_drinking) { Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true); if (!target) @@ -245,90 +243,141 @@ struct boss_shade_of_aran : public BossAI context.Repeat(2s); }).Schedule(5s, [this](TaskContext context) { - switch (urand(0, 1)) + if (!_drinking) { - case 0: - DoCastSelf(SPELL_AOE_CS); - break; - case 1: - DoCastRandomTarget(SPELL_CHAINSOFICE); - break; + switch (urand(0, 1)) + { + case 0: + DoCastSelf(SPELL_AOE_CS); + break; + case 1: + DoCastRandomTarget(SPELL_CHAINSOFICE); + break; + } } context.Repeat(5s, 20s); }).Schedule(35s, [this](TaskContext context) { - uint8 Available[2]; - - switch (LastSuperSpell) + if (!_drinking) { - case SUPER_AE: - Available[0] = SUPER_FLAME; - Available[1] = SUPER_BLIZZARD; - break; - case SUPER_FLAME: - Available[0] = SUPER_AE; - Available[1] = SUPER_BLIZZARD; - break; - case SUPER_BLIZZARD: - Available[0] = SUPER_FLAME; - Available[1] = SUPER_AE; - break; - } + uint8 Available[2]; + + switch (LastSuperSpell) + { + case SUPER_AE: + Available[0] = SUPER_FLAME; + Available[1] = SUPER_BLIZZARD; + break; + case SUPER_FLAME: + Available[0] = SUPER_AE; + Available[1] = SUPER_BLIZZARD; + break; + case SUPER_BLIZZARD: + Available[0] = SUPER_FLAME; + Available[1] = SUPER_AE; + break; + } - LastSuperSpell = Available[urand(0, 1)]; + LastSuperSpell = Available[urand(0, 1)]; - switch (LastSuperSpell) - { - case SUPER_AE: - Talk(SAY_EXPLOSION); + switch (LastSuperSpell) + { + case SUPER_AE: + Talk(SAY_EXPLOSION); - DoCastSelf(SPELL_BLINK_CENTER, true); - DoCastSelf(SPELL_PLAYERPULL, true); - DoCastSelf(SPELL_MASSSLOW, true); - DoCastSelf(SPELL_AEXPLOSION, false); - break; + DoCastSelf(SPELL_BLINK_CENTER, true); + DoCastSelf(SPELL_PLAYERPULL, true); + DoCastSelf(SPELL_MASSSLOW, true); + DoCastSelf(SPELL_AEXPLOSION, false); + break; - case SUPER_FLAME: - Talk(SAY_FLAMEWREATH); + case SUPER_FLAME: + Talk(SAY_FLAMEWREATH); - scheduler.Schedule(20s, GROUP_FLAMEWREATH, [this](TaskContext) - { - scheduler.CancelGroup(GROUP_FLAMEWREATH); - }).Schedule(500ms, GROUP_FLAMEWREATH, [this](TaskContext context) - { - for (uint8 i = 0; i < 3; ++i) + scheduler.Schedule(20s, GROUP_FLAMEWREATH, [this](TaskContext) { - if (!FlameWreathTarget[i]) - continue; - - Unit* unit = ObjectAccessor::GetUnit(*me, FlameWreathTarget[i]); - if (unit && !unit->IsWithinDist2d(FWTargPosX[i], FWTargPosY[i], 3)) + scheduler.CancelGroup(GROUP_FLAMEWREATH); + }).Schedule(500ms, GROUP_FLAMEWREATH, [this](TaskContext context) + { + for (uint8 i = 0; i < 3; ++i) { - unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID()); - FlameWreathTarget[i].Clear(); + if (!FlameWreathTarget[i]) + continue; + + Unit* unit = ObjectAccessor::GetUnit(*me, FlameWreathTarget[i]); + if (unit && !unit->IsWithinDist2d(FWTargPosX[i], FWTargPosY[i], 3)) + { + unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID()); + FlameWreathTarget[i].Clear(); + } } - } - context.Repeat(500ms); - }); + context.Repeat(500ms); + }); - FlameWreathTarget[0].Clear(); - FlameWreathTarget[1].Clear(); - FlameWreathTarget[2].Clear(); + FlameWreathTarget[0].Clear(); + FlameWreathTarget[1].Clear(); + FlameWreathTarget[2].Clear(); - FlameWreathEffect(); - break; + FlameWreathEffect(); + break; - case SUPER_BLIZZARD: - Talk(SAY_BLIZZARD); + case SUPER_BLIZZARD: + Talk(SAY_BLIZZARD); - if (Creature* pSpawn = me->SummonCreature(NPC_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000)) + if (Creature* pSpawn = me->SummonCreature(NPC_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000)) + { + pSpawn->SetFaction(me->GetFaction()); + pSpawn->CastSpell(me, SPELL_CIRCULAR_BLIZZARD, false); + } + break; + } + } + context.Repeat(35s, 40s); + }).Schedule(1s, [this](TaskContext context){ + if (me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 20) + { + _drinking = true; + me->InterruptNonMeleeSpells(true); + Talk(SAY_DRINK); + DoCastSelf(SPELL_MASS_POLY, true); + DoCastSelf(SPELL_CONJURE, false); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SIT); + DoCastSelf(SPELL_DRINK, true); + _currentHealth = me->GetHealth(); + drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) + { + //check for damage to interrupt + if (me->GetHealth() < _currentHealth) + { + me->RemoveAurasDueToSpell(SPELL_DRINK); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + DoCastSelf(SPELL_POTION, false); + DoCastSelf(SPELL_AOE_PYROBLAST, false); + drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinking = false; + } else { - pSpawn->SetFaction(me->GetFaction()); - pSpawn->CastSpell(me, SPELL_CIRCULAR_BLIZZARD, false); + context.Repeat(500ms); } - break; + }).Schedule(10s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + DoCastSelf(SPELL_POTION, true); + DoCastSelf(SPELL_AOE_PYROBLAST, false); + drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinking = false; + }); + context.Repeat(12s); //semi-arbitrary duration to envelop drinking duration + } + else + { + context.Repeat(1s); } - context.Repeat(35s, 40s); }).Schedule(12min, [this](TaskContext context) { for (uint32 i = 0; i < 5; ++i) @@ -389,65 +438,10 @@ struct boss_shade_of_aran : public BossAI if (!UpdateVictim()) return; - if (!Drinking && me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 20) - { - Drinking = true; - me->InterruptNonMeleeSpells(false); - - Talk(SAY_DRINK); - - scheduler.DelayAll(10s); - DoCastSelf(SPELL_MASS_POLY, true); - DoCastSelf(SPELL_CONJURE, false); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SIT); - DoCastSelf(SPELL_DRINK, true); - _currentHealth = me->GetHealth(); - drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) - { - //check for damage to interrupt - if(CheckDamageDuringDrinking(_currentHealth)) - { - Drinking = false; - me->RemoveAurasDueToSpell(SPELL_DRINK); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, false); - DoCastSelf(SPELL_AOE_PYROBLAST, false); - drinkScheduler.CancelGroup(GROUP_DRINKING); - } else { - context.Repeat(500ms); - } - }).Schedule(10s, GROUP_DRINKING, [this](TaskContext) - { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, true); - DoCastSelf(SPELL_AOE_PYROBLAST, false); - - Drinking = false; - drinkScheduler.CancelGroup(GROUP_DRINKING); - }); - } - - if (_arcaneCooledDown && _fireCooledDown && _frostCooledDown && !Drinking) + if (_arcaneCooledDown && _fireCooledDown && _frostCooledDown) DoMeleeAttackIfReady(); } - bool CheckDamageDuringDrinking(uint32 oldHealth) - { - if (Drinking) - { - if (me->GetHealth() < oldHealth) - { - return true; - } - } - return false; - } - void SpellHit(Unit* /*pAttacker*/, SpellInfo const* Spell) override { //We only care about interrupt effects and only if they are durring a spell currently being cast @@ -481,6 +475,7 @@ struct boss_shade_of_aran : public BossAI bool _arcaneCooledDown; bool _fireCooledDown; bool _frostCooledDown; + bool _drinking; uint32 _currentHealth; }; From 1621da00dac4c320d46c05ff4e3abb72831234d4 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 17:00:53 +0200 Subject: [PATCH 031/340] chore(misc): Mordenize maths (#17273) --- src/common/Common.h | 7 ------- src/server/game/Server/WorldSocket.cpp | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index 1811d65e6a737b..5f1267199de158 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -41,13 +41,6 @@ #include #endif -#if AC_COMPILER == AC_COMPILER_MICROSOFT -#define atoll _atoi64 -#define llabs _abs64 -#else -#define stricmp strcasecmp -#endif - #define STRINGIZE(a) #a #define MAX_NETCLIENT_PACKET_SIZE (32767 - 1) // Client hardcap: int16 with trailing zero space otherwise crash on memory free diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index f2ce1d91b88796..f6317b5049f95a 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -564,7 +564,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr authSes //! Negative mutetime indicates amount of minutes to be muted effective on next login - which is now. if (account.MuteTime < 0) { - account.MuteTime = GameTime::GetGameTime().count() + llabs(account.MuteTime); + account.MuteTime = GameTime::GetGameTime().count() + std::llabs(account.MuteTime); auto* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME_LOGIN); stmt->SetData(0, account.MuteTime); From bc6a7445381cd7dedfda23e09f7ed7ccd48940df Mon Sep 17 00:00:00 2001 From: Matthew M Dean Date: Sun, 17 Sep 2023 12:00:37 -0700 Subject: [PATCH 032/340] fix(Core/Item): Reduce amount of excessive logging for enforeDBCAttributes (#16508) bypass code block if enforceDBCAttributes is set to false --- src/server/game/Globals/ObjectMgr.cpp | 62 +++++++++++++-------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 4f48a34af49fed..80804e9b5aa712 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2863,47 +2863,43 @@ void ObjectMgr::LoadItemTemplates() if (dbcitem) { - if (itemTemplate.Class != dbcitem->ClassID) + if (enforceDBCAttributes) { - LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Class value ({}), must be ({}).", entry, itemTemplate.Class, dbcitem->ClassID); - if (enforceDBCAttributes) + if (itemTemplate.Class != dbcitem->ClassID) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Class value ({}), must be ({}).", entry, itemTemplate.Class, dbcitem->ClassID); itemTemplate.Class = dbcitem->ClassID; - } - if (itemTemplate.SubClass != dbcitem->SubclassID) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Subclass value ({}) for class {}, must be ({}).", entry, itemTemplate.SubClass, itemTemplate.Class, dbcitem->SubclassID); - if (enforceDBCAttributes) + } + if (itemTemplate.SubClass != dbcitem->SubclassID) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Subclass value ({}) for class {}, must be ({}).", entry, itemTemplate.SubClass, itemTemplate.Class, dbcitem->SubclassID); itemTemplate.SubClass = dbcitem->SubclassID; - } - if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclassID) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct SoundOverrideSubclass ({}), must be {}.", entry, itemTemplate.SoundOverrideSubclass); - if (enforceDBCAttributes) + } + if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclassID) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct SoundOverrideSubclass ({}), must be {}.", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclassID); itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclassID; - } - if (itemTemplate.Material != dbcitem->Material) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct material ({}), must be {}.", entry, itemTemplate.Material, dbcitem->Material); - if (enforceDBCAttributes) + } + if (itemTemplate.Material != dbcitem->Material) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct material ({}), must be {}.", entry, itemTemplate.Material, dbcitem->Material); itemTemplate.Material = dbcitem->Material; - } - if (itemTemplate.InventoryType != dbcitem->InventoryType) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong InventoryType value ({}), must be {}.", entry, itemTemplate.InventoryType, dbcitem->InventoryType); - if (enforceDBCAttributes) + } + if (itemTemplate.InventoryType != dbcitem->InventoryType) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong InventoryType value ({}), must be {}.", entry, itemTemplate.InventoryType, dbcitem->InventoryType); itemTemplate.InventoryType = dbcitem->InventoryType; - } - if (itemTemplate.DisplayInfoID != dbcitem->DisplayInfoID) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct display id ({}), must be {}.", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayInfoID); - if (enforceDBCAttributes) + } + if (itemTemplate.DisplayInfoID != dbcitem->DisplayInfoID) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct display id ({}), must be {}.", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayInfoID); itemTemplate.DisplayInfoID = dbcitem->DisplayInfoID; - } - if (itemTemplate.Sheath != dbcitem->SheatheType) - { - LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Sheath ({}), must be {}.", entry, itemTemplate.Sheath, dbcitem->SheatheType); - if (enforceDBCAttributes) + } + if (itemTemplate.Sheath != dbcitem->SheatheType) + { + LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Sheath ({}), must be {}.", entry, itemTemplate.Sheath, dbcitem->SheatheType); itemTemplate.Sheath = dbcitem->SheatheType; + } } } else From 24c97c5f2f932ac7f851a31500ebaa5f46b61b67 Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Sun, 17 Sep 2023 16:16:43 -0300 Subject: [PATCH 033/340] fix(Scrpits/Quest): Improve Recharging the Batteries (#16597) * fix(Scrpits/Quest): Improve Recharging the Batteries * Update zone_netherstorm.cpp * update --- .../rev_1687359733617622800.sql | 4 ++ .../scripts/Outland/zone_netherstorm.cpp | 46 +++++++++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1687359733617622800.sql diff --git a/data/sql/updates/pending_db_world/rev_1687359733617622800.sql b/data/sql/updates/pending_db_world/rev_1687359733617622800.sql new file mode 100644 index 00000000000000..3f0f9db260303d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1687359733617622800.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q10190_battery_recharging_blaster'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(34219, 'spell_q10190_battery_recharging_blaster'); diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 2f615ec5019859..cee8cf3398f190 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -22,6 +22,8 @@ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellInfo.h" +#include "SpellAuras.h" +#include "SpellScript.h" // Ours enum saeed @@ -697,9 +699,6 @@ class npc_phase_hunter : public CreatureScript { Drained = true; int32 uHpPct = int32(me->GetHealthPct()); - - me->UpdateEntry(NPC_DRAINED_PHASE_HUNTER_ENTRY); - me->SetHealth(me->CountPctFromMaxHealth(uHpPct)); me->LowerPlayerDamageReq(me->GetMaxHealth() - me->GetHealth()); me->SetInCombatWith(player); @@ -911,6 +910,45 @@ class npc_maxx_a_million_escort : public CreatureScript } }; +class spell_q10190_battery_recharging_blaster : public SpellScript +{ + PrepareSpellScript(spell_q10190_battery_recharging_blaster); + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if (target->GetHealthPct() <= 25.0f) + return SPELL_CAST_OK; + + return SPELL_FAILED_BAD_TARGETS; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_q10190_battery_recharging_blaster::CheckCast); + } + }; + +class spell_q10190_battery_recharging_blaster_aura : public AuraScript +{ + PrepareAuraScript(spell_q10190_battery_recharging_blaster_aura); + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Creature* phasehunter = GetTarget()->ToCreature()) + if (phasehunter->GetEntry() == NPC_PHASE_HUNTER_ENTRY) + phasehunter->UpdateEntry(NPC_DRAINED_PHASE_HUNTER_ENTRY); + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_q10190_battery_recharging_blaster_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_netherstorm() { // Ours @@ -922,5 +960,5 @@ void AddSC_netherstorm() new npc_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); - + RegisterSpellAndAuraScriptPair(spell_q10190_battery_recharging_blaster, spell_q10190_battery_recharging_blaster_aura); } From 6a7a516e630d93c8986d2bf1678065099c361277 Mon Sep 17 00:00:00 2001 From: LJFP Date: Sun, 17 Sep 2023 16:19:22 -0300 Subject: [PATCH 034/340] fix(DB/Creature): Removed duplicated fire festival Flame Wardens (#16671) * fix(DB/GameEventCreature): Removed duplicated fire festival Flame Guards. * Also removed the NPCs from the creatures table * Removed reference to old table. --- data/sql/updates/pending_db_world/rev_1688549401806530816.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1688549401806530816.sql diff --git a/data/sql/updates/pending_db_world/rev_1688549401806530816.sql b/data/sql/updates/pending_db_world/rev_1688549401806530816.sql new file mode 100644 index 00000000000000..369a18e2793f92 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1688549401806530816.sql @@ -0,0 +1,2 @@ +DELETE FROM `game_event_creature` WHERE `guid` IN (245648,245645,245649); +DELETE FROM `creature` WHERE `guid` IN (245648,245645,245649); From ca95b4a12965c25f74712d9e9f50ea83bc0e2106 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 17 Sep 2023 16:32:06 -0300 Subject: [PATCH 035/340] fix(Scripts/Karazhan): Fix Enfeeble hitting more than 5 targets (#17290) * fix(Scripts/Karazhan): Fix Enfeeble hitting more than 5 targets * reorder so there are no cases where only 4 players are hit * missing override --- .../rev_1694976478402282600.sql | 4 ++ .../Karazhan/boss_prince_malchezaar.cpp | 56 +++++++++++++------ 2 files changed, 44 insertions(+), 16 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1694976478402282600.sql diff --git a/data/sql/updates/pending_db_world/rev_1694976478402282600.sql b/data/sql/updates/pending_db_world/rev_1694976478402282600.sql new file mode 100644 index 00000000000000..0bca46390a2973 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694976478402282600.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_malchezaar_enfeeble' AND `spell_id` = 30843; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(30843, 'spell_malchezaar_enfeeble'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 31917b8a0b8b98..20cd89552e572e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScript.h" #include "karazhan.h" enum PrinceSay @@ -197,7 +198,7 @@ struct boss_malchezaar : public BossAI scheduler.Schedule(30s, [this](TaskContext context) { - EnfeebleHealthEffect(); + DoCastAOE(SPELL_ENFEEBLE); scheduler.Schedule(9s, [this](TaskContext) { @@ -246,23 +247,12 @@ struct boss_malchezaar : public BossAI }); } - void EnfeebleHealthEffect() + void SpellHitTarget(Unit* target, SpellInfo const* spell) override { - std::list targetList; - SelectTargetList(targetList, 5, SelectTargetMethod::Random, 1, [&](Unit* u) { return u->IsAlive() && u->IsPlayer(); }); - - if (targetList.empty()) - return; - - for (auto const& target : targetList) + if (spell->Id == SPELL_ENFEEBLE) { - if (target) - { - _enfeebleTargets[target->GetGUID()] = target->GetHealth(); - - me->CastSpell(target, SPELL_ENFEEBLE, true); - target->SetHealth(1); - } + _enfeebleTargets[target->GetGUID()] = target->GetHealth(); + target->SetHealth(1); } } @@ -378,9 +368,43 @@ struct npc_malchezaar_axe : public ScriptedAI TaskScheduler _scheduler; }; +// 30843 - Enfeeble +class spell_malchezaar_enfeeble : public SpellScript +{ + PrepareSpellScript(spell_malchezaar_enfeeble); + + bool Load() override + { + return GetCaster()->ToCreature(); + } + + void FilterTargets(std::list& targets) + { + uint8 maxSize = 5; + Unit* caster = GetCaster(); + + targets.remove_if([caster](WorldObject const* target) -> bool + { + // Should not target current victim. + return caster->GetVictim() == target; + }); + + if (targets.size() > maxSize) + { + Acore::Containers::RandomResize(targets, maxSize); + } + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_malchezaar_enfeeble::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY); + } +}; + void AddSC_boss_malchezaar() { RegisterKarazhanCreatureAI(boss_malchezaar); RegisterKarazhanCreatureAI(npc_malchezaar_axe); RegisterKarazhanCreatureAI(npc_netherspite_infernal); + RegisterSpellScript(spell_malchezaar_enfeeble); } From 89ba87495e59351e0fccdeb0c673617e34186fd5 Mon Sep 17 00:00:00 2001 From: TuriansNotBad <54774532+TuriansNotBad@users.noreply.github.com> Date: Mon, 18 Sep 2023 00:35:34 +0500 Subject: [PATCH 036/340] fix(Core/Position): Normalize Position.GetRelativeAngle (#16825) Normalize GetRelativeAngle Normalize angle returned by both Position.GetRelativeAngle functions. --- src/server/game/Entities/Object/Position.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h index 8b87368d15f135..e88e3ea2e6c1b9 100644 --- a/src/server/game/Entities/Object/Position.h +++ b/src/server/game/Entities/Object/Position.h @@ -196,10 +196,10 @@ struct Position float GetRelativeAngle(const Position* pos) const { - return GetAngle(pos) - m_orientation; + return NormalizeOrientation(GetAngle(pos) - m_orientation); } - [[nodiscard]] float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; } + [[nodiscard]] float GetRelativeAngle(float x, float y) const { return NormalizeOrientation(GetAngle(x, y) - m_orientation); } [[nodiscard]] float ToAbsoluteAngle(float relAngle) const { return NormalizeOrientation(relAngle + m_orientation); } void GetSinCos(float x, float y, float& vsin, float& vcos) const; From 9523081c3253b10140ce03832b0b727e8a976a5a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 19:45:47 +0000 Subject: [PATCH 037/340] chore(DB): import pending files Referenced commit(s): 24c97c5f2f932ac7f851a31500ebaa5f46b61b67 --- .../rev_1687359733617622800.sql => db_world/2023_09_17_09.sql} | 1 + .../rev_1688549401806530816.sql => db_world/2023_09_17_10.sql} | 1 + .../rev_1694976478402282600.sql => db_world/2023_09_17_11.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1687359733617622800.sql => db_world/2023_09_17_09.sql} (83%) rename data/sql/updates/{pending_db_world/rev_1688549401806530816.sql => db_world/2023_09_17_10.sql} (75%) rename data/sql/updates/{pending_db_world/rev_1694976478402282600.sql => db_world/2023_09_17_11.sql} (82%) diff --git a/data/sql/updates/pending_db_world/rev_1687359733617622800.sql b/data/sql/updates/db_world/2023_09_17_09.sql similarity index 83% rename from data/sql/updates/pending_db_world/rev_1687359733617622800.sql rename to data/sql/updates/db_world/2023_09_17_09.sql index 3f0f9db260303d..ec7b40263aaaad 100644 --- a/data/sql/updates/pending_db_world/rev_1687359733617622800.sql +++ b/data/sql/updates/db_world/2023_09_17_09.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_08 -> 2023_09_17_09 -- DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q10190_battery_recharging_blaster'; INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1688549401806530816.sql b/data/sql/updates/db_world/2023_09_17_10.sql similarity index 75% rename from data/sql/updates/pending_db_world/rev_1688549401806530816.sql rename to data/sql/updates/db_world/2023_09_17_10.sql index 369a18e2793f92..a2b8bfc16d9008 100644 --- a/data/sql/updates/pending_db_world/rev_1688549401806530816.sql +++ b/data/sql/updates/db_world/2023_09_17_10.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_17_09 -> 2023_09_17_10 DELETE FROM `game_event_creature` WHERE `guid` IN (245648,245645,245649); DELETE FROM `creature` WHERE `guid` IN (245648,245645,245649); diff --git a/data/sql/updates/pending_db_world/rev_1694976478402282600.sql b/data/sql/updates/db_world/2023_09_17_11.sql similarity index 82% rename from data/sql/updates/pending_db_world/rev_1694976478402282600.sql rename to data/sql/updates/db_world/2023_09_17_11.sql index 0bca46390a2973..ec10522abce1d0 100644 --- a/data/sql/updates/pending_db_world/rev_1694976478402282600.sql +++ b/data/sql/updates/db_world/2023_09_17_11.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_10 -> 2023_09_17_11 -- DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_malchezaar_enfeeble' AND `spell_id` = 30843; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 533b36406efa6b0c400b5943371a3dbf1ac29d20 Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Mon, 18 Sep 2023 03:48:25 +0800 Subject: [PATCH 038/340] fix(DB/Creature): move Fairbanks gossip to the database (#16974) * Add gossip_menu_id for fairbanks * npc_text ID uses the npc_text_broadcast_text Datasheet ID in CMANGOS * Some emoticons will hold the weapon in your hand when used, so use smartAI instead. * Only if there is an inventory or equipment Ashbringer will the gossip_menu_option be displayed * Remove the code from the script * Update the data * Code formatting Remove comments * Replace ## with -- Replace npc_text_broadcast_text with npc_text_broa*dcast_text * Replace npc_text_broadcast_text with npc_text_broa*dcast_text * Modify the comment --- .../rev_1691673730300871200.sql | 183 ++++++++++++++++++ .../instance_scarlet_monastery.cpp | 101 ---------- 2 files changed, 183 insertions(+), 101 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1691673730300871200.sql diff --git a/data/sql/updates/pending_db_world/rev_1691673730300871200.sql b/data/sql/updates/pending_db_world/rev_1691673730300871200.sql new file mode 100644 index 00000000000000..ef3e7a7082bec1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1691673730300871200.sql @@ -0,0 +1,183 @@ +-- ---------------------creature_template ------------------- +-- fairbanks Use gossip_menu_id 7283 +-- add gossip menu flag Prevent red errors when the server starts +UPDATE `creature_template` SET `gossip_menu_id` = 7283, `npcflag` = 1 +WHERE (`entry` = 4542); + +-- ----gossip_menu----- +-- cmangos and vmangos gossip_menuID-- +DELETE +FROM `gossip_menu` +WHERE `MenuID` BETWEEN 7268 AND 7284; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(7268, 8610), +(7269, 8609), +(7270, 8608), +(7271, 8607), +(7272, 8606), +(7273, 8605), +(7274, 8604), +(7275, 8603), +(7276, 8602), +(7277, 8601), +(7278, 8600), +(7279, 8599), +(7280, 8598), +(7281, 8597), +(7282, 8596), +(7283, 8595), +(7284, 8612); + +-- -----gossip_menu_option----- +-- Using the MenuID in vmangos and cmangos +DELETE +FROM `gossip_menu_option` +WHERE `MenuID` BETWEEN 7268 AND 7283; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(7268, 0, 0, 'But his son is dead.', 12511, 1, 1, 7284, 0, 0, 0, '', 0, 0), +(7269, 0, 0, 'You tell an incredible tale, Fairbanks. What of the blade? Is it beyond redemption?', 12509, 1, 1, 7268, 0, 0, 0, '', 0, 0), +(7270, 0, 0, 'And you did...', 12507, 1, 1, 7269, 0, 0, 0, '', 0, 0), +(7271, 0, 0, 'You were right, Fairbanks. That is tragic.', 12505, 1, 1, 7270, 0, 0, 0, '', 0, 0), +(7272, 0, 0, 'You mean...', 12503, 1, 1, 7271, 0, 0, 0, '', 0, 0), +(7273, 0, 0, 'Continue please, Fairbanks.', 12501, 1, 1, 7272, 0, 0, 0, '', 0, 0), +(7274, 0, 0, 'And did he?', 12499, 1, 1, 7273, 0, 0, 0, '', 0, 0), +(7275, 0, 0, 'Yet? Yet what??', 12497, 1, 1, 7274, 0, 0, 0, '', 0, 0), +(7276, 0, 0, 'A thousand? For one man?', 12495, 1, 1, 7275, 0, 0, 0, '', 0, 0), +(7277, 0, 0, 'How do you know all of this?', 12493, 1, 1, 7276, 0, 0, 0, '', 0, 0), +(7278, 0, 0, 'You mean...', 12491, 1, 1, 7277, 0, 0, 0, '', 0, 0), +(7279, 0, 0, 'Incredible story. So how did he die?', 12489, 1, 1, 7278, 0, 0, 0, '', 0, 0), +(7280, 0, 0, 'I still do not fully understand.', 12487, 1, 1, 7279, 0, 0, 0, '', 0, 0), +(7281, 0, 0, 'What do you mean?', 12485, 1, 1, 7280, 0, 0, 0, '', 0, 0), +(7282, 0, 0, 'Mograine?', 12483, 1, 1, 7281, 0, 0, 0, '', 0, 0), +(7283, 0, 0, 'Curse? What\'s going ON here, Fairbanks?', 12481, 1, 1, 7282, 0, 0, 0, '', 0, 0); + +-- ---------npc_text----------- +-- cmangos npc_text_broa*dcast_text +DELETE FROM `npc_text` WHERE `ID` BETWEEN 8595 AND 8610; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES +(8595, '\r\nAT LAST, the curse IS lifted. Thank you, hero.', NULL, 12480, 0, 1, 0, 1, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8596, 'You mean, you don\'t know? The sword that you carry on your back - it is known as Ashbringer; named after its original owner.', NULL, 12482, 0, 1, 0, 6, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), + +-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan +(8597, 'Aye, the Highlord Mograine: A founder of the original order of the Scarlet Crusade. A knight of unwavering faith and purity; Mograine would be betrayed by his own son and slain by Kel\'Thuzad\'s forces inside Stratholme. It is how I ended up here...', NULL, 12484, 0, 1, 0, 273, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), + +(8598, 'It was High General Abbendis, High Inquisitor Isillien, and Highlord Mograine that formed the Crusade. In its infancy, the Crusade was a noble order. The madness and insane zealotry that you see now did not exist. It was not until the one known as the Grand Crusader appeared that the wheels of corruption were set in motion.', NULL, 12486, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), + +-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan +(8599, 'The Highlord was the lynchpin of the Crusade. Aye, Mograine was called the Ashbringer because of his exploits versus the armies of the Lich King. With only blade and faith, Mograine would walk into whole battalions of undead and emerge unscathed - the ashes of his foes being the only indication that he had been there at all. Do you not understand? The very face of death feared him! It trembled in his presence!', NULL, 12488, 0, 1, 0, 1, 0, 273, 0, 5, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), + +(8600, 'The only way a hero can die, $r: Through tragedy. The Grand Crusader struck a deal with Kel\'Thuzad himself! An ambush would be staged that would result in the death of Mograine. The TYPE of betrayal that could only be a result of the actions of one\'s most trusted and loved companions.', NULL, 12490, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan +(8601, '$B$BAye, the lesser Mograine, the one known as the Scarlet Commander, through - what I suspect - the dealings of the Grand Crusader. He led his father to the ambush like a lamb to the slaughter.', NULL, 12492, 0, 1, 0, 273, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8602, '$B$BBecause I was there... I was the Highlord\'s most trusted advisor. I should have known... I felt that something was amiss yet I allowed it TO happen. Would you believe that there were a thousand OR more Scourge?', NULL, 12494, 0, 1, 0, 1, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8603, 'This was the Ashbringer, fool! AS the Scourge began TO materialize around us, Mograine\'s blade began to glow... to hum... the younger Mograine would take that as a sign to make his escape. They descended upon us with a hunger the likes of which I had never seen. Yet...', NULL, 12496, 0, 1, 0, 5, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8604, 'It was not enough.$B$B$B$BA thousand came and a thousand died. By the Light! By the might of Mograine! He would smite them down as fast as they could come. Through the chaos, I noticed that the lesser Mograine was still there, off in the distance. I called to him, " HELP us, Renault! HELP your father, boy!"', NULL, 12498, 0, 1, 0, 1, 0, 22, 0, 22, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +-- Emoji 274 Holding a weapon in your hand is different from the Blizzard plan +(8605, '$B$BNo... He stood in the background, watching as the legion of undead descended upon us. Soon after, my powers were exhausted. I was the first to fall... Surely they would tear me limb from limb as I lay there unconscious; but they ignored me completely, focusing all of their attention on the Highlord. ', NULL, 12500, 0, 1, 0, 274, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8606, 'It was all I could do to feign death as the corpses of the Scourge piled upon me. There was darkness and only the muffled sounds of the battle above me. The clashing of iron, the gnashing and grinding... gruesome, terrible sounds. And then there was silence. He called to me! "Fairbanks! Fairbanks\r\nWHERE are you? Talk TO me Fairbanks!" And then came the sound of incredulousness. The bite of betrayal, $r...', NULL, 12502, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8607, 'The boy had picked up the Ashbringer and driven it through his father\'s heart AS his back was turned. His LAST words will haunt me forever: "What have you done, Renault? Why would you do this?"', NULL, 12504, 0, 1, 0, 1, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8608, 'The blade AND Mograine were a singular entity. DO you understand? This act corrupted the blade AND LEAD TO Mograine\'s own corruption as a death knight of Kel\'Thuzad. I swore that if I lived, I would expose the perpetrators of this heinous crime. FOR two days I remained under the rot AND contagion of Scourge - gathering AS much strength AS possible TO ESCAPE the razed city.\n', NULL, 12506, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 100, 1, 1, 1, 0, 0, 0, NULL, NULL, 0, 0, 100, 1, 1, 1, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8609, 'Aye, I did. Much TO the dismay of the lesser Mograine, I made my way back TO the Scarlet Monastery. I shouted AND screamed. I told the tale TO ANY that would listen. AND I would be murdered in cold blood FOR my actions, dragged TO this chamber - the dark secret of the order. But SOME did listen... SOME heard my words. Thus was born the Argent Dawn...', NULL, 12508, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL), +(8610, 'I\'m afraid that the blade which you hold in your hands is beyond saving. The hatred runs too deep. But do not lose hope, $c. Where one chapter has ended, a new one begins.$B$BFind his son - a more devout and pious man you may never meet. It is rumored that he is able to build the Ashbringer anew, without requiring the old, tainted blade.', NULL, 12510, 0, 1, 0, 1, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL); + +-- Emoji 274 and 397 Holding a weapon in your hand is different from the Blizzard plan +DELETE FROM `npc_text` WHERE `ID`=8612; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES +(8612, '$B$BNo, $r; only one of his sons is dead. The other lives...$B$B$B$BThe Outland... Find him there... ', NULL, 12512, 0, 1, 0, 271, 0, 1, 0, 397, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL); + +-- ---------npc_text----------- +-- Get ready to trigger emoticons with SmartAI +-- use smart_ai emto 8597 8599 8601 8605 8612 +UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0 +WHERE `ID`=8597; +UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0 +WHERE `ID`=8599; +UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0 +WHERE `ID`=8601; +UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0 +WHERE `ID`=8605; +UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0 +WHERE `ID`=8612; + +-- -------------------SMARTSCRIPT START--------------- +-- --------------------------------------------------- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4542; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4542); +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 +(4542, 0, 0, 0, 0, 0, 100, 0, 7000, 11000, 30000, 40000, 0, 11, 8282, 0, 0, 0, 0, 0, 5, 20, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Curse of Blood'), +(4542, 0, 1, 0, 0, 0, 100, 0, 6000, 11000, 15000, 20000, 0, 11, 15090, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Dispel Magic'), +(4542, 0, 2, 0, 0, 0, 100, 0, 0, 3000, 20000, 20000, 0, 11, 11647, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Power Word: Shield'), +(4542, 0, 3, 0, 0, 0, 100, 0, 10000, 15000, 20000, 20000, 0, 11, 12039, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Heal'), +(4542, 0, 4, 5, 37, 0, 100, 1, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - initializes -Remove UNIT_NPC_FLAG_GOSSIP'), +(4542, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - initializes - set_sheath ‘SHEATH_STATE_MELEE’'), + +-- Do not hold a weapon in your hand when making expressions +(4542, 0, 6, 0, 62, 0, 100, 0, 7282, 0, 0, 0, 0, 80, 454200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks- Gossip_Select 7282 - emto (273 ,1,1)'), +(4542, 0, 7, 0, 62, 0, 100, 0, 7280, 0, 0, 0, 0, 80, 454201, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7280 -emto (1,273,5)'), +(4542, 0, 8, 0, 62, 0, 100, 0, 7278, 0, 0, 0, 0, 80, 454202, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7278 - emto (273,1,1)'), +(4542, 0, 9, 0, 62, 0, 100, 0, 7274, 0, 0, 0, 0, 80, 454203, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7274 - emto (274,1,1)'), +(4542, 0, 10, 0, 62, 0, 100, 0, 7268, 0, 0, 0, 0, 80, 454204, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7268 - emto (274,1,397)'); + +-- -------- TIMED_ACTIONLIST EMOTE +-- fairbanks - Menuid - 7282 emto(273, 1, 1) +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454200); +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 +(454200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 273'), +(454200, 9, 3, 0, 0, 0, 100, 0, 2200, 2200, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'), +(454200, 9, 4, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 1'), +(454200, 9, 6, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 1'); + +-- fairbanks - Menuid - 7280 emto(1, 273, 5) +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454201); +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 +(454201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'), +(454201, 9, 1, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454201, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 273'), +(454201, 9, 3, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'), +(454201, 9, 5, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454201, 9, 6, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 5'), +(454201, 9, 7, 0, 0, 0, 100, 0, 2200, 2200, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'); + +-- fairbanks - Menuid - 7278 emto(273, 1, 1) +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454202); +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 +(454202, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath‘SHEATH_STATE_UNARMED’'), +(454202, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 273'), +(454202, 9, 2, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'), +(454202, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'), +(454202, 9, 4, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'); + +-- fairbanks - Menuid - 7274 emto(274, 1, 1) +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454203); +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 +(454203, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454203, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 274'), +(454203, 9, 2, 0, 0, 0, 100, 0, 3500, 3500, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'), +(454203, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'), +(454203, 9, 4, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'); + +-- fairbanks - Menuid - 7268(END) emto(274, 1, 397) +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454204); +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 +(454204, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454204, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 274'), +(454204, 9, 2, 0, 0, 0, 100, 0, 3500, 3500, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'), +(454204, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'), +(454204, 9, 4, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_UNARMED’'), +(454204, 9, 5, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 5, 397, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 397'), +(454204, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath ‘SHEATH_STATE_MELEE’'); + + +-- ----------conditions------------ +-- cmangos and vmangos conditions +DELETE +FROM `conditions` +WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 7283) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 2) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 22691) AND (`ConditionValue2` = 1) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7283, 0, 0, 0, 2, 0, 22691, 1, 0, 0, 0, 0, '', 'the gossip menu is only displayed if the player inventory "ASHBRINGER"--ASHBRINGER'); + +-- Clean up 100100 - 100116 data +DELETE +FROM `npc_text` +WHERE `ID` BETWEEN 100100 AND 100116; \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index d0024de85ee426..65b8c64f16cb81 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -695,106 +695,6 @@ class npc_fairbanks : public CreatureScript public: npc_fairbanks() : CreatureScript("npc_fairbanks") { } - bool OnGossipHello(Player* player, Creature* creature) override - { - AddGossipItemFor(player, 0, "Curse? What's going on here, Fairbanks?", GOSSIP_SENDER_MAIN, 1); - SendGossipMenuFor(player, 100100, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 uiAction) override - { - ClearGossipMenuFor(player); - - switch (uiAction) - { - case 1: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "Mograine?", GOSSIP_SENDER_MAIN, 2); - SendGossipMenuFor(player, 100101, creature->GetGUID()); - return true; - case 2: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "What do you mean?", GOSSIP_SENDER_MAIN, 3); - SendGossipMenuFor(player, 100102, creature->GetGUID()); - return true; - case 3: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "I still do not fully understand.", GOSSIP_SENDER_MAIN, 4); - SendGossipMenuFor(player, 100103, creature->GetGUID()); - return true; - case 4: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "Incredible story. So how did he die?", GOSSIP_SENDER_MAIN, 5); - SendGossipMenuFor(player, 100104, creature->GetGUID()); - return true; - case 5: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "You mean...", GOSSIP_SENDER_MAIN, 6); - SendGossipMenuFor(player, 100105, creature->GetGUID()); - return true; - case 6: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "How do you know all of this?", GOSSIP_SENDER_MAIN, 7); - SendGossipMenuFor(player, 100106, creature->GetGUID()); - return true; - case 7: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "A thousand? For one man?", GOSSIP_SENDER_MAIN, 8); - SendGossipMenuFor(player, 100107, creature->GetGUID()); - return true; - case 8: - creature->HandleEmoteCommand(5); - AddGossipItemFor(player, 0, "Yet? Yet what?", GOSSIP_SENDER_MAIN, 9); - SendGossipMenuFor(player, 100108, creature->GetGUID()); - return true; - case 9: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "And did he?", GOSSIP_SENDER_MAIN, 10); - SendGossipMenuFor(player, 100109, creature->GetGUID()); - return true; - case 10: - creature->HandleEmoteCommand(274); - AddGossipItemFor(player, 0, "Continue please, Fairbanks.", GOSSIP_SENDER_MAIN, 11); - SendGossipMenuFor(player, 100110, creature->GetGUID()); - return true; - case 11: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "You mean...", GOSSIP_SENDER_MAIN, 12); - SendGossipMenuFor(player, 100111, creature->GetGUID()); - return true; - case 12: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "You were right, Fairbanks. That is tragic.", GOSSIP_SENDER_MAIN, 13); - SendGossipMenuFor(player, 100112, creature->GetGUID()); - return true; - case 13: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "And you did...", GOSSIP_SENDER_MAIN, 14); - SendGossipMenuFor(player, 100113, creature->GetGUID()); - return true; - case 14: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "You tell an incredible tale, Fairbanks. What of the blade? Is it beyond redemption?", GOSSIP_SENDER_MAIN, 15); - SendGossipMenuFor(player, 100114, creature->GetGUID()); - return true; - case 15: - creature->HandleEmoteCommand(1); - AddGossipItemFor(player, 0, "But his son is dead.", GOSSIP_SENDER_MAIN, 16); - SendGossipMenuFor(player, 100115, creature->GetGUID()); - return true; - case 16: - SendGossipMenuFor(player, 100116, creature->GetGUID()); - /// @todo: we need to play these 3 emote in sequence, we play only the last one right now. - creature->HandleEmoteCommand(274); - creature->HandleEmoteCommand(1); - creature->HandleEmoteCommand(397); - return true; - } - - return true; - } - struct npc_fairbanksAI : public SmartAI { npc_fairbanksAI(Creature* creature) : SmartAI(creature) { } @@ -812,7 +712,6 @@ class npc_fairbanks : public CreatureScript { me->SetFaction(FACTION_FRIENDLY); me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); - me->SetSheath(SHEATH_STATE_UNARMED); me->CastSpell(me, 57767, true); me->SetDisplayId(16179); me->SetFacingToObject(player); From 18f20edbfa6b172e69aac4cd5cc0f1fe9da110c9 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 20:05:22 +0000 Subject: [PATCH 039/340] chore(DB): import pending files Referenced commit(s): ca95b4a12965c25f74712d9e9f50ea83bc0e2106 --- .../rev_1691673730300871200.sql => db_world/2023_09_17_12.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1691673730300871200.sql => db_world/2023_09_17_12.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1691673730300871200.sql b/data/sql/updates/db_world/2023_09_17_12.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1691673730300871200.sql rename to data/sql/updates/db_world/2023_09_17_12.sql index ef3e7a7082bec1..7d82cc77294966 100644 --- a/data/sql/updates/pending_db_world/rev_1691673730300871200.sql +++ b/data/sql/updates/db_world/2023_09_17_12.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_11 -> 2023_09_17_12 -- ---------------------creature_template ------------------- -- fairbanks Use gossip_menu_id 7283 -- add gossip menu flag Prevent red errors when the server starts From 63b10f34a6e3abb90dad00e1ca1292d5cdaa275f Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 17 Sep 2023 22:14:04 +0200 Subject: [PATCH 040/340] chore(CI): Hello Github Bot and Update actions version (#17285) --- .github/workflows/build_dbimport.yml | 2 +- .github/workflows/check_pending_sql.yml | 3 ++- .github/workflows/codestyle.yml | 3 ++- .github/workflows/core_build.yml | 2 +- .github/workflows/core_matrix_build.yml | 2 +- .github/workflows/core_modules_build.yml | 2 +- .github/workflows/cpp-check.yml | 2 +- .github/workflows/docker_build.yml | 4 ++-- .github/workflows/import_pending.yml | 10 ++++++---- .github/workflows/macos_build.yml | 2 +- .github/workflows/pr_labeler.yml | 9 +++++++-- .github/workflows/tools_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 13 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_dbimport.yml b/.github/workflows/build_dbimport.yml index 34b8f4988792ec..ecc4068d158f9a 100644 --- a/.github/workflows/build_dbimport.yml +++ b/.github/workflows/build_dbimport.yml @@ -23,7 +23,7 @@ jobs: COMPILER: ${{ matrix.compiler }} if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v3 env: diff --git a/.github/workflows/check_pending_sql.yml b/.github/workflows/check_pending_sql.yml index f75913bb043e62..52ea18acb2a457 100644 --- a/.github/workflows/check_pending_sql.yml +++ b/.github/workflows/check_pending_sql.yml @@ -5,7 +5,8 @@ on: jobs: check-pending-sql: runs-on: ubuntu-latest + if: github.repository == 'azerothcore/azerothcore-wotlk' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check pending SQL run: source ./apps/ci/ci-pending.sh diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 910cd6e490825d..acce90c0dd03cb 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -9,8 +9,9 @@ jobs: matrix: os: [ubuntu-20.04] runs-on: ${{ matrix.os }} + if: github.repository == 'azerothcore/azerothcore-wotlk' name: check codestyle steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check core codestyle run: source ./apps/ci/ci-codestyle.sh diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index b068a80ba5839f..c64f7178dcee28 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -23,7 +23,7 @@ jobs: COMPILER: ${{ matrix.compiler }} if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v3 with: diff --git a/.github/workflows/core_matrix_build.yml b/.github/workflows/core_matrix_build.yml index 9dc0595af85131..76ae747e31dffe 100644 --- a/.github/workflows/core_matrix_build.yml +++ b/.github/workflows/core_matrix_build.yml @@ -40,7 +40,7 @@ jobs: || github.event.label.name == 'run-build') ) steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v3 with: diff --git a/.github/workflows/core_modules_build.yml b/.github/workflows/core_modules_build.yml index 0997b0b53e52d2..586edcfa478cae 100644 --- a/.github/workflows/core_modules_build.yml +++ b/.github/workflows/core_modules_build.yml @@ -34,7 +34,7 @@ jobs: || github.event.label.name == 'run-build') ) steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout modules run: ./apps/ci/ci-install-modules.sh if: matrix.modules == 'with' diff --git a/.github/workflows/cpp-check.yml b/.github/workflows/cpp-check.yml index 7a2cac94d17874..a4305fac544958 100644 --- a/.github/workflows/cpp-check.yml +++ b/.github/workflows/cpp-check.yml @@ -21,7 +21,7 @@ jobs: if: github.repository == 'azerothcore/azerothcore-wotlk' name: cpp check steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: cpp check run: | sudo apt update -y diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 70e658685fc30b..2dfc535eba3d4e 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -40,7 +40,7 @@ jobs: docker --version docker compose version - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # we need the entire history for the ac-dev-server # with: # fetch-depth: 2 @@ -108,7 +108,7 @@ jobs: docker --version docker compose version - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # we need the entire history for the ac-dev-server # with: # fetch-depth: 2 diff --git a/.github/workflows/import_pending.yml b/.github/workflows/import_pending.yml index d4eb1322f8614c..012b0a281f2094 100644 --- a/.github/workflows/import_pending.yml +++ b/.github/workflows/import_pending.yml @@ -9,9 +9,10 @@ jobs: strategy: fail-fast: false runs-on: ubuntu-20.04 + permissions: write-all if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false # If we're fetching all the history in a later step it makes sense to @@ -26,7 +27,8 @@ jobs: - name: Import and commit pending sql run: | - git config user.email "azerothcorebot@gmail.com" && git config user.name "AzerothCoreBot" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" # Get the latest changes from git git pull --rebase origin "${{ github.ref_name }}" bash bin/acore-db-pendings @@ -39,9 +41,9 @@ jobs: BRANCH: ${{ github.ref_name }} - name: Push changes - uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365 + uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.AC_GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} # Noting that the branch name can only be master, as per the event # triggering this action branch: ${{ github.ref_name }} diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 63ac5f9833226b..46e3a961812cc9 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -25,7 +25,7 @@ jobs: && !github.event.pull_request.draft && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v3 with: diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 0c76a2520f02cb..4e231bb0be168d 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -5,9 +5,14 @@ on: jobs: triage: runs-on: ubuntu-20.04 + permissions: write-all + if: github.repository == 'azerothcore/azerothcore-wotlk' steps: - - uses: actions/labeler@v3 + - uses: actions/checkout@v4 with: - repo-token: ${{ secrets.AC_GITHUB_TOKEN }} + persist-credentials: true + - uses: actions/labeler@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} configuration-path: .github/labeler.yml sync-labels: true diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml index 944e2a38e97454..6044cc03626db8 100644 --- a/.github/workflows/tools_build.yml +++ b/.github/workflows/tools_build.yml @@ -23,7 +23,7 @@ jobs: COMPILER: ${{ matrix.compiler }} if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v3 env: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 082155b432eaaf..76d78e7e0a6849 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -25,7 +25,7 @@ jobs: && !github.event.pull_request.draft && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: ccache uses: hendrikmuhs/ccache-action@v1.2.9 - name: Configure OS From 7d59378b6bb8547b0756632ce00af095e8ff446c Mon Sep 17 00:00:00 2001 From: "Julio A. Leyva Osorio" Date: Sun, 17 Sep 2023 16:14:50 -0400 Subject: [PATCH 041/340] fix(DB/Quest) Know Thine Enemy RP event (#16258) * Create 62896.sql Co-Authored-By: Rushor * Update 62896.sql --------- Co-authored-by: Rushor Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- data/sql/updates/pending_db_world/62896.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 data/sql/updates/pending_db_world/62896.sql diff --git a/data/sql/updates/pending_db_world/62896.sql b/data/sql/updates/pending_db_world/62896.sql new file mode 100644 index 00000000000000..0bd9174a5c0fda --- /dev/null +++ b/data/sql/updates/pending_db_world/62896.sql @@ -0,0 +1,19 @@ +SET @ENTRY := 17433; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`,`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,1,20,0,100,0,9567,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Quest \'Know Thine Enemy\' Finished - Run Script'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Vindicator Aalesia - On Quest \'Know Thine Enemy\' Finished - Store Targetlist'); + +-- Actionlist SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Remove Npc Flag Questgiver'), +(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Set Emote State 69'), +(@ENTRY*100,9,2,0,0,0,100,0,4000,4000,0,0,17,26,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Set Emote State 26'), +(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 0'), +(@ENTRY*100,9,4,0,0,0,100,0,4000,4000,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 1'), +(@ENTRY*100,9,5,0,0,0,100,0,4000,4000,0,0,1,2,2000,0,0,0,0,12,1,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 2'), +(@ENTRY*100,9,6,0,0,0,100,0,2000,2000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Add Npc Flag Questgiver'); + +UPDATE `creature_text` SET `Text`='No, this can\'t be... It says this creature willingly became a servant of the Legion. He transforms into a satyr and receives the Legion\'s "blessing."' WHERE `CreatureID`=@ENTRY AND `GroupID` = 2; From 3d29ccad70e7c00d59f861794b2697d4e3389f10 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 17 Sep 2023 20:39:17 +0000 Subject: [PATCH 042/340] chore(DB): import pending files Referenced commit(s): 9523081c3253b10140ce03832b0b727e8a976a5a --- .../{pending_db_world/62896.sql => db_world/2023_09_17_13.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/62896.sql => db_world/2023_09_17_13.sql} (98%) diff --git a/data/sql/updates/pending_db_world/62896.sql b/data/sql/updates/db_world/2023_09_17_13.sql similarity index 98% rename from data/sql/updates/pending_db_world/62896.sql rename to data/sql/updates/db_world/2023_09_17_13.sql index 0bd9174a5c0fda..e7398b6d9fbd9e 100644 --- a/data/sql/updates/pending_db_world/62896.sql +++ b/data/sql/updates/db_world/2023_09_17_13.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_12 -> 2023_09_17_13 SET @ENTRY := 17433; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; From 9b4f8b02402722d615bc2f6e2c3c1e8f6044d5a9 Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Mon, 18 Sep 2023 05:36:20 +0800 Subject: [PATCH 043/340] fix(DB/Creature): Godrick Farsan event (#16607) * Added emoticons and dialogue events to Warlock Quest NPC Godrick Farsan (ID 5693). * Update UnitFlags * Modify the delay * Fix syntax errors * Try the fix again * The delay of task emoticons is increased by 200ms, preventing the loss of missing emoticons when preparing tasks after cache clearing * Update unit_flags in smatscript * Update the comment * quest_offer_reward emote ported to SmartAI * Remove Directional Coordinate Update and wait for sniffing set_unit_flag Update to use SMATAI * Update rev_1687513981074967100.sql --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../rev_1687513981074967100.sql | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1687513981074967100.sql diff --git a/data/sql/updates/pending_db_world/rev_1687513981074967100.sql b/data/sql/updates/pending_db_world/rev_1687513981074967100.sql new file mode 100644 index 00000000000000..14fdbdac0ea6cd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1687513981074967100.sql @@ -0,0 +1,50 @@ +-- Hearts of the Pure Rp ------------- + +-- The orientation of the initial NPC This is roughly towards the coordinates that need to be sniffed +-- UPDATE `creature` SET `orientation`=4.41048 WHERE `guid`=41833; + +-- Use SmatAI +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5693; + +-- Update emoticons +UPDATE `creature_text` SET `Emote`=25 WHERE `CreatureID`=5693 AND `GroupID`=0 AND `ID`=0;-- EMOTE_ONESHOT_POINT +UPDATE `creature_text` SET `Emote`=1 WHERE `CreatureID`=5693 AND `GroupID`=1 AND `ID`=0;-- EMOTE_ONESHOT_TALK +UPDATE `creature_text` SET `Emote`=25 WHERE `CreatureID`=5693 AND `GroupID`=2 AND `ID`=0;-- EMOTE_ONESHOT_POINT +UPDATE `creature_text` SET `Emote`=1 WHERE `CreatureID`=5693 AND `GroupID`=3 AND `ID`=0;-- EMOTE_ONESHOT_TALK +UPDATE `creature_text` SET `Emote`=11 WHERE `CreatureID`=5693 AND `GroupID`=4 AND `ID`=0;-- EMOTE_ONESHOT_LAUGH + +-- Update unit_flags Make summoned NPCs unattackable and unselectable +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5692; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5692); +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 +(5692, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256|512|33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Comar Villard Projection - Just_Summoned - set_unit_flag'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5691; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5691); +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 +(5691, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256|512|33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Comar Villard Projection - Just_Summoned - set_unit_flag'); + +-- SmatAI Start------------------------------------- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5693; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5693); +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 +(5693, 0, 0, 0, 19, 0, 100, 0, 1476, 0, 0, 0, 0, 80, 569300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Godrick Farsan - On Quest \'Hearts of the Pure\' Taken - Run Script'), +(5693, 0, 1, 0, 20, 0, 100, 0, 1472, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Godrick Farsan - reward quest emote'); + +-- Timed events +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 569300); +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 +(569300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Set Active'), +(569300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Remove Quest Giver npc flags from self.'), +(569300, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 12, 5691, 3, 28000, 0, 0, 0, 8, 0, 0, 0, 0, 1781.16, 61.13, -61.4065, 4.869, 'Hearts of the Pure - Godrick Farsan - Spawn NPC'), +(569300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 12, 5692, 3, 28000, 0, 0, 0, 8, 0, 0, 0, 0, 1785.77, 60.27, -61.4065, 3.961, 'Hearts of the Pure - Godrick Farsan - Spawn NPC'), +(569300, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 5691, 10, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face NPC'), +(569300, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'), +(569300, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'), +(569300, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 5692, 5, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face NPC'), +(569300, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'), +(569300, 9, 9, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'), +(569300, 9, 10, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face Player'), +(569300, 9, 11, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'), +(569300, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Remove Active'), +(569300, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Add NPC Flags'); From 9ac71a4e2a8c9252eed683a111922fc67890837d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 17 Sep 2023 19:00:09 -0300 Subject: [PATCH 044/340] =?UTF-8?q?fix(Scripts/MagistersTerrace):=20Script?= =?UTF-8?q?=20Kalecgos'=20appearance=20after=20usin=E2=80=A6=20(#17286)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rev_1694958987022484200.sql | 21 +++++ .../instance_magisters_terrace.cpp | 76 +++++++++++++++++++ .../MagistersTerrace/magisters_terrace.h | 25 +++++- 3 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1694958987022484200.sql diff --git a/data/sql/updates/pending_db_world/rev_1694958987022484200.sql b/data/sql/updates/pending_db_world/rev_1694958987022484200.sql new file mode 100644 index 00000000000000..cbcbfd7b9bc1cf --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694958987022484200.sql @@ -0,0 +1,21 @@ +-- +-- Pathing for Kalecgos Entry: 24844 'TDB FORMAT' +SET @NPC := 24844; +SET @PATH := @NPC * 10; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,163.9735,-398.0906,2.083333,0,0,0,0,100,0), -- 16:16:43 +(@PATH,2,164.3802,-397.1771,2.083333,0,0,0,0,100,0), -- 16:16:43 +(@PATH,3,162.7923,-386.1964,15.67094,0,0,0,0,100,0), -- 16:16:43 +(@PATH,4,151.5555,-345.349,5.92646,0,0,0,0,100,0), -- 16:16:43 +(@PATH,5,162.2416,-299.8032,-5.436685,0,0,0,0,100,0), -- 16:16:43 +(@PATH,6,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43 +(@PATH,7,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43 +(@PATH,8,199.7482,-272.3315,-7.186677,0.06981317,0,0,0,100,0); -- 16:16:54 +-- 0x1C2F2C4920184300001F1D000038BF6E .go 163.9735 -398.0906 2.083333 + +DELETE FROM `event_scripts` WHERE `id` = 16547; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 24844; + +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kalecgos' WHERE `entry` = 24844; +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 24848; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 7f812f34ccfb5b..315a7df1863002 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -16,9 +16,18 @@ */ #include "InstanceScript.h" +#include "ScriptedCreature.h" #include "ScriptMgr.h" #include "magisters_terrace.h" +ObjectData const creatureData[] = +{ + { NPC_KALECGOS, DATA_KALECGOS }, + { 0, 0 } +}; + +Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f }; + class instance_magisters_terrace : public InstanceMapScript { public: @@ -29,6 +38,7 @@ class instance_magisters_terrace : public InstanceMapScript instance_magisters_terrace_InstanceMapScript(Map* map) : InstanceScript(map) { SetHeaders(DataHeader); + LoadObjectData(creatureData, nullptr); } uint32 Encounter[MAX_ENCOUNTER]; @@ -69,6 +79,24 @@ class instance_magisters_terrace : public InstanceMapScript return 0; } + void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) override + { + if (eventId == EVENT_SPAWN_KALECGOS) + { + if (!GetCreature(DATA_KALECGOS) && !scheduler.IsGroupScheduled(DATA_KALECGOS)) + { + scheduler.Schedule(1min, 1min, DATA_KALECGOS,[this](TaskContext) + { + if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos)) + { + kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false); + kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN); + } + }); + } + } + } + void SetData(uint32 identifier, uint32 data) override { switch (identifier) @@ -116,6 +144,8 @@ class instance_magisters_terrace : public InstanceMapScript kael->AI()->JustSummoned(creature); break; } + + InstanceScript::OnCreatureCreate(creature); } void OnGameObjectCreate(GameObject* go) override @@ -184,7 +214,53 @@ class instance_magisters_terrace : public InstanceMapScript } }; +enum Spells +{ + SPELL_KALECGOS_TRANSFORM = 44670, + SPELL_TRANSFORM_VISUAL = 24085, + SPELL_CAMERA_SHAKE = 44762, + SPELL_ORB_KILL_CREDIT = 46307 +}; + +enum MovementPoints +{ + POINT_ID_PREPARE_LANDING = 6 +}; + +struct npc_kalecgos : public ScriptedAI +{ + npc_kalecgos(Creature* creature) : ScriptedAI(creature) { } + + void MovementInform(uint32 type, uint32 pointId) override + { + if (type != WAYPOINT_MOTION_TYPE) + return; + + if (pointId == POINT_ID_PREPARE_LANDING) + { + me->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + me->SetDisableGravity(false); + me->SetHover(false); + + me->m_Events.AddEventAtOffset([this]() + { + DoCastAOE(SPELL_CAMERA_SHAKE); + me->SetObjectScale(0.6f); + + me->m_Events.AddEventAtOffset([this]() + { + DoCastSelf(SPELL_ORB_KILL_CREDIT, true); + DoCastSelf(SPELL_TRANSFORM_VISUAL); + DoCastSelf(SPELL_KALECGOS_TRANSFORM); + me->UpdateEntry(NPC_HUMAN_KALECGOS); + }, 1s); + }, 2s); + } + } +}; + void AddSC_instance_magisters_terrace() { new instance_magisters_terrace(); + RegisterMagistersTerraceCreatureAI(npc_kalecgos); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index 20bb86b22a6640..d265866cd7a0c2 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -32,7 +32,9 @@ enum MTData DATA_VEXALLUS_EVENT = 1, DATA_DELRISSA_EVENT = 2, DATA_KAELTHAS_EVENT = 3, - MAX_ENCOUNTER = 4 + MAX_ENCOUNTER = 4, + + DATA_KALECGOS = 5 }; enum MTCreatures @@ -41,7 +43,9 @@ enum MTCreatures NPC_FEL_CRYSTAL = 24722, NPC_KAEL_THAS = 24664, NPC_PHOENIX = 21362, - NPC_PHOENIX_EGG = 21364 + NPC_PHOENIX_EGG = 21364, + NPC_KALECGOS = 24844, + NPC_HUMAN_KALECGOS = 24848 }; enum MTGameObjects @@ -54,10 +58,27 @@ enum MTGameObjects GO_ESCAPE_ORB = 188173 }; +enum InstanceEventIds +{ + EVENT_SPAWN_KALECGOS = 16547 +}; + +enum InstanceText +{ + SAY_KALECGOS_SPAWN = 0 +}; + +enum MovementData +{ + PATH_KALECGOS_FLIGHT = 248440 +}; + template inline AI* GetMagistersTerraceAI(T* obj) { return GetInstanceAI(obj, MTScriptName); } +#define RegisterMagistersTerraceCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetMagistersTerraceAI) + #endif From f9b0eea0fd088dcc39b1e812201ff9aa812d6bd3 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 17 Sep 2023 22:52:52 -0300 Subject: [PATCH 045/340] fix(DB/SAI): Worldserver Error in Dalaran (#17292) Co-authored-by: daobashun <49193927+fangshun2004@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1694983857958013500.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1694983857958013500.sql diff --git a/data/sql/updates/pending_db_world/rev_1694983857958013500.sql b/data/sql/updates/pending_db_world/rev_1694983857958013500.sql new file mode 100644 index 00000000000000..ea400ec09edaab --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1694983857958013500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `event_param5` = 1, `action_param3` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (28994,29523,28989,28721,28725,28726); From 5b3c5740fb84c9fff55fe2d5f7c6e89b92f9fc9f Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:54:52 -0300 Subject: [PATCH 046/340] fix(Scripts/Karazhan): Fix Terestrian Illhoof not summoning any imps (#17297) * fix(Scripts/Karazhan): Fix Terestrian Illhoof not summoning any imps * Update rev_1695008245587651800.sql * Update boss_terestian_illhoof.cpp * make kilrek immune to enslave demon --- .../rev_1695008245587651800.sql | 14 ++ .../Karazhan/boss_terestian_illhoof.cpp | 138 ++---------------- .../Karazhan/instance_karazhan.cpp | 11 ++ .../EasternKingdoms/Karazhan/karazhan.h | 1 + 4 files changed, 36 insertions(+), 128 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695008245587651800.sql diff --git a/data/sql/updates/pending_db_world/rev_1695008245587651800.sql b/data/sql/updates/pending_db_world/rev_1695008245587651800.sql new file mode 100644 index 00000000000000..03ad0b949185b0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695008245587651800.sql @@ -0,0 +1,14 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17265; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17265) AND (`source_type` = 0) AND (`id` IN (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 +(17265, 0, 0, 0, 60, 0, 100, 0, 2400, 8000, 2400, 8000, 0, 11, 30184, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fiendish Portal - On Update - Cast \'Summon Fiendish Imp\''); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17267; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17267) AND (`source_type` = 0) AND (`id` IN (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 +(17267, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2200, 0, 11, 30050, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fiendish Imp - In Combat - Cast \'Firebolt\''); + +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1 WHERE `entry` = 17229; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index b81b7cd8b7e1c7..3092045dfeb233 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -52,7 +52,6 @@ enum Spells enum Creatures { NPC_DEMONCHAINS = 17248, - NPC_FIENDISHIMP = 17267, NPC_PORTAL = 17265 }; @@ -146,64 +145,6 @@ struct npc_demon_chain : public ScriptedAI ObjectGuid sacrificeGUID; }; -struct npc_fiendish_portal : public PassiveAI -{ - npc_fiendish_portal(Creature* creature) : PassiveAI(creature), summons(me) {} - - void Reset() override - { - DespawnAllImp(); - } - - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - DoZoneInCombat(summon); - } - - void DespawnAllImp() - { - summons.DespawnAll(); - } - -private: - SummonList summons; -}; - -struct npc_fiendish_imp : public ScriptedAI -{ - npc_fiendish_imp(Creature* creature) : ScriptedAI(creature) {} - - void Reset() override - { - _scheduler.CancelAll(); - } - - void JustEngagedWith(Unit* /*who*/) override - { - _scheduler.Schedule(2s, [this](TaskContext context) - { - DoCastVictim(SPELL_FIREBOLT); - context.Repeat(2200ms); - }); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - _scheduler.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - DoMeleeAttackIfReady(); - } - -private: - TaskScheduler _scheduler; -}; - struct boss_terestian_illhoof : public BossAI { boss_terestian_illhoof(Creature* creature) : BossAI(creature, DATA_TERESTIAN) @@ -218,20 +159,6 @@ struct boss_terestian_illhoof : public BossAI { _Reset(); SummonKilrek(); - portalsCount = 0; - berserk = false; - for (uint8 i = 0; i < 2; ++i) - { - if (portalGUID[i]) - { - if (Creature* pPortal = ObjectAccessor::GetCreature(*me, portalGUID[i])) - { - pPortal->AI()->Reset(); - pPortal->DespawnOrUnsummon(); - } - portalGUID[i].Clear(); - } - } } void SummonKilrek() @@ -267,31 +194,15 @@ struct boss_terestian_illhoof : public BossAI { DoCastVictim(SPELL_SHADOW_BOLT); context.Repeat(10s); - }).Schedule(10s, [this](TaskContext context) + }).Schedule(10s, [this](TaskContext) { - if (!portalGUID[0]) - { - DoCastVictim(SPELL_FIENDISH_PORTAL); - } - if (!portalGUID[1]) - { - DoCastVictim(SPELL_FIENDISH_PORTAL_1); - } - if (portalGUID[0] && portalGUID[1]) - { - if (Creature* pPortal = ObjectAccessor::GetCreature(*me, portalGUID[urand(0, 1)])) - { - pPortal->CastSpell(me->GetVictim(), SPELL_SUMMON_FIENDISIMP); - } - context.Repeat(5s); - } + DoCastAOE(SPELL_FIENDISH_PORTAL); + }).Schedule(11s, [this](TaskContext) + { + DoCastAOE(SPELL_FIENDISH_PORTAL_1); }).Schedule(10min, [this](TaskContext /*context*/) { - if (!berserk) - { - DoCastSelf(SPELL_BERSERK); - berserk = true; - } + DoCastSelf(SPELL_BERSERK); }); } @@ -299,13 +210,14 @@ struct boss_terestian_illhoof : public BossAI { if (summoned->GetEntry() == NPC_PORTAL) { - portalGUID[portalsCount] = summoned->GetGUID(); - ++portalsCount; + summoned->SetReactState(REACT_PASSIVE); if (summoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1) { Talk(SAY_SUMMON); } } + + summons.Summon(summoned); } void KilledUnit(Unit* victim) override @@ -318,44 +230,14 @@ struct boss_terestian_illhoof : public BossAI void JustDied(Unit* /*killer*/) override { + _JustDied(); Talk(SAY_DEATH); - for (uint8 i = 0; i < 2; ++i) - { - if (portalGUID[i]) - { - if (Creature* pPortal = ObjectAccessor::GetCreature((*me), portalGUID[i])) - { - pPortal->AI()->Reset(); - pPortal->DespawnOrUnsummon(); - } - portalGUID[i].Clear(); - } - } } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - scheduler.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - DoMeleeAttackIfReady(); - } - -private: - bool berserk; - ObjectGuid portalGUID[2]; - uint8 portalsCount; }; void AddSC_boss_terestian_illhoof() { RegisterKarazhanCreatureAI(boss_terestian_illhoof); - RegisterKarazhanCreatureAI(npc_fiendish_imp); - RegisterKarazhanCreatureAI(npc_fiendish_portal); RegisterKarazhanCreatureAI(npc_kilrek); RegisterKarazhanCreatureAI(npc_demon_chain); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 6f4a47161b5402..f8568de6cbd40b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -44,6 +44,7 @@ ObjectData const creatureData[] = { NPC_ROMULO, DATA_ROMULO }, { NPC_JULIANNE, DATA_JULIANNE }, { NPC_NIGHTBANE, DATA_NIGHTBANE }, + { NPC_TERESTIAN_ILLHOOF, DATA_TERESTIAN }, { 0, 0 } }; @@ -122,6 +123,16 @@ class instance_karazhan : public InstanceMapScript case NPC_ECHO_OF_MEDIVH: _echoOfMedivhGUID = creature->GetGUID(); break; + case NPC_FIENDISH_IMP: + if (Creature* terestrian = GetCreature(DATA_TERESTIAN)) + { + if (terestrian->AI()) + { + terestrian->AI()->JustSummoned(creature); + creature->SetInCombatWithZone(); + } + } + break; default: break; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index 25a7fec00a8a84..274a5f1f390560 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -117,6 +117,7 @@ enum KZCreatures NPC_ROAR = 17546, NPC_STRAWMAN = 17543, NPC_TINHEAD = 17547, + NPC_FIENDISH_IMP = 17267, // Chess Event NPC_ECHO_OF_MEDIVH = 16816, From 89d0db3a93f991b9ebf5cfa0f34d236da7028938 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:55:15 -0300 Subject: [PATCH 047/340] fix(Scripts/Karazhan): Fix Aran's chase distance and Blink conditions (#17296) * Revert "chore(Worldserver/Config): Clean up and reorganize config file (#17272)" This reverts commit c709e2e7d3ba426178c2eebce30f6d30da71ff7c. * fix(Scripts/Karazhan): Fix Aran's chase distance and Blink conditions * Revert "Revert "chore(Worldserver/Config): Clean up and reorganize config file (#17272)"" This reverts commit 7075437947203943872aa7606c07c82ae4c8c93c. * Update rev_1695004374973517300.sql --- .../pending_db_world/rev_1695004374973517300.sql | 4 ++++ .../EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695004374973517300.sql diff --git a/data/sql/updates/pending_db_world/rev_1695004374973517300.sql b/data/sql/updates/pending_db_world/rev_1695004374973517300.sql new file mode 100644 index 00000000000000..d0c26d213858f0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695004374973517300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 29967); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 29967, 0, 0, 31, 0, 3, 17176, 0, 0, 0, 0, '', 'Shade of Aran Blink (29967) can only target Shade of Aran Teleport Center (17176)'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index ec824e59b9c0f7..b96bd58d7519d3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -147,6 +147,18 @@ struct boss_shade_of_aran : public BossAI }); } + void AttackStart(Unit* who) override + { + if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE) + { + if (me->Attack(who, false)) + { + me->GetMotionMaster()->MoveChase(who, 45.0f, 0); + me->AddThreat(who, 0.0f); + } + } + } + void KilledUnit(Unit* /*victim*/) override { Talk(SAY_KILL); From b378b191a20b04fc5e2ff85e0632a975d3163794 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Mon, 18 Sep 2023 22:24:01 +0200 Subject: [PATCH 048/340] chore(CI): revert previous changes to import_pending.yml (#17303) * chore(CI): revert previous changes to import_pending.yml * Update import_pending.yml --- .github/workflows/import_pending.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/import_pending.yml b/.github/workflows/import_pending.yml index 012b0a281f2094..fd5bdf0776215f 100644 --- a/.github/workflows/import_pending.yml +++ b/.github/workflows/import_pending.yml @@ -43,7 +43,7 @@ jobs: - name: Push changes uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.AC_GITHUB_TOKEN }} # Noting that the branch name can only be master, as per the event # triggering this action branch: ${{ github.ref_name }} From 13c57a31c3f5a09665684d23f56e7e04d2c8450d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 18 Sep 2023 20:25:10 +0000 Subject: [PATCH 049/340] chore(DB): import pending files Referenced commit(s): b378b191a20b04fc5e2ff85e0632a975d3163794 --- .../rev_1687513981074967100.sql => db_world/2023_09_18_00.sql} | 1 + .../rev_1694958987022484200.sql => db_world/2023_09_18_01.sql} | 1 + .../rev_1694983857958013500.sql => db_world/2023_09_18_02.sql} | 1 + .../rev_1695004374973517300.sql => db_world/2023_09_18_03.sql} | 1 + .../rev_1695008245587651800.sql => db_world/2023_09_18_04.sql} | 1 + 5 files changed, 5 insertions(+) rename data/sql/updates/{pending_db_world/rev_1687513981074967100.sql => db_world/2023_09_18_00.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1694958987022484200.sql => db_world/2023_09_18_01.sql} (96%) rename data/sql/updates/{pending_db_world/rev_1694983857958013500.sql => db_world/2023_09_18_02.sql} (77%) rename data/sql/updates/{pending_db_world/rev_1695004374973517300.sql => db_world/2023_09_18_03.sql} (92%) rename data/sql/updates/{pending_db_world/rev_1695008245587651800.sql => db_world/2023_09_18_04.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1687513981074967100.sql b/data/sql/updates/db_world/2023_09_18_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1687513981074967100.sql rename to data/sql/updates/db_world/2023_09_18_00.sql index 14fdbdac0ea6cd..b3a1a99bacffc7 100644 --- a/data/sql/updates/pending_db_world/rev_1687513981074967100.sql +++ b/data/sql/updates/db_world/2023_09_18_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_17_13 -> 2023_09_18_00 -- Hearts of the Pure Rp ------------- -- The orientation of the initial NPC This is roughly towards the coordinates that need to be sniffed diff --git a/data/sql/updates/pending_db_world/rev_1694958987022484200.sql b/data/sql/updates/db_world/2023_09_18_01.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1694958987022484200.sql rename to data/sql/updates/db_world/2023_09_18_01.sql index cbcbfd7b9bc1cf..3de84f595c71e8 100644 --- a/data/sql/updates/pending_db_world/rev_1694958987022484200.sql +++ b/data/sql/updates/db_world/2023_09_18_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_18_00 -> 2023_09_18_01 -- -- Pathing for Kalecgos Entry: 24844 'TDB FORMAT' SET @NPC := 24844; diff --git a/data/sql/updates/pending_db_world/rev_1694983857958013500.sql b/data/sql/updates/db_world/2023_09_18_02.sql similarity index 77% rename from data/sql/updates/pending_db_world/rev_1694983857958013500.sql rename to data/sql/updates/db_world/2023_09_18_02.sql index ea400ec09edaab..e3a85dcbebb338 100644 --- a/data/sql/updates/pending_db_world/rev_1694983857958013500.sql +++ b/data/sql/updates/db_world/2023_09_18_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_18_01 -> 2023_09_18_02 -- UPDATE `smart_scripts` SET `event_param5` = 1, `action_param3` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (28994,29523,28989,28721,28725,28726); diff --git a/data/sql/updates/pending_db_world/rev_1695004374973517300.sql b/data/sql/updates/db_world/2023_09_18_03.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1695004374973517300.sql rename to data/sql/updates/db_world/2023_09_18_03.sql index d0c26d213858f0..f2e780a1374b18 100644 --- a/data/sql/updates/pending_db_world/rev_1695004374973517300.sql +++ b/data/sql/updates/db_world/2023_09_18_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_18_02 -> 2023_09_18_03 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 29967); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1695008245587651800.sql b/data/sql/updates/db_world/2023_09_18_04.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1695008245587651800.sql rename to data/sql/updates/db_world/2023_09_18_04.sql index 03ad0b949185b0..eed902135f5a99 100644 --- a/data/sql/updates/pending_db_world/rev_1695008245587651800.sql +++ b/data/sql/updates/db_world/2023_09_18_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_18_03 -> 2023_09_18_04 -- UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17265; From 373fdd68bfc2317c2a90e2857a81f42713950e75 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 19 Sep 2023 01:35:41 +0200 Subject: [PATCH 050/340] fix(Scripts/Karazhan): fix visual of infernals on Malchezaar (#17304) * test * remove comment --- .../scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 20cd89552e572e..0d4774a6154467 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -157,7 +157,6 @@ struct boss_malchezaar : public BossAI if (Creature* infernal = relay->SummonCreature(NPC_NETHERSPITE_INFERNAL, target->GetPosition(), TEMPSUMMON_TIMED_DESPAWN, 180000)) { infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE); - relay->CastSpell(target, SPELL_INFERNAL_RELAY_TWO); relay->CastSpell(infernal, SPELL_INFERNAL_RELAY); infernal->SetFaction(me->GetFaction()); infernal->SetControlled(true, UNIT_STATE_ROOT); From ae5b7538b1fcc0b2193b541d15ee3803a0f9267b Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:39:40 +0200 Subject: [PATCH 051/340] fix(DB/Creature): make infernal helper targets in Kara invisible to players (#17309) * initial * add bench's bunny --- data/sql/updates/pending_db_world/make-infernals-invisible.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/make-infernals-invisible.sql diff --git a/data/sql/updates/pending_db_world/make-infernals-invisible.sql b/data/sql/updates/pending_db_world/make-infernals-invisible.sql new file mode 100644 index 00000000000000..b02236b651e2cf --- /dev/null +++ b/data/sql/updates/pending_db_world/make-infernals-invisible.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` IN (17168, 17169, 17170, 17171, 17172, 17173, 17174, 17175, 17176, 17260, 17459); From 8b5869d50b317acb021fac47356e52a2810cf7cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Sep 2023 21:40:44 +0000 Subject: [PATCH 052/340] chore(DB): import pending files Referenced commit(s): ae5b7538b1fcc0b2193b541d15ee3803a0f9267b --- .../make-infernals-invisible.sql => db_world/2023_09_19_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/make-infernals-invisible.sql => db_world/2023_09_19_00.sql} (78%) diff --git a/data/sql/updates/pending_db_world/make-infernals-invisible.sql b/data/sql/updates/db_world/2023_09_19_00.sql similarity index 78% rename from data/sql/updates/pending_db_world/make-infernals-invisible.sql rename to data/sql/updates/db_world/2023_09_19_00.sql index b02236b651e2cf..b7f6347c49f5c9 100644 --- a/data/sql/updates/pending_db_world/make-infernals-invisible.sql +++ b/data/sql/updates/db_world/2023_09_19_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_18_04 -> 2023_09_19_00 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` IN (17168, 17169, 17170, 17171, 17172, 17173, 17174, 17175, 17176, 17260, 17459); From 7dd9ca01c58855156cace6f23e4fbbaeda0941f9 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 19 Sep 2023 20:30:34 -0300 Subject: [PATCH 053/340] fix(Scripts/Karazhan): Regen Curator mana on reset (#17310) --- src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 880a5e37f6dbd4..88da4576c0fb98 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -58,6 +58,7 @@ struct boss_curator : public BossAI DoCastSelf(SPELL_ARCANE_INFUSION, true); Talk(SAY_ENRAGE); }); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA)); } void KilledUnit(Unit* victim) override From 3a51249bf5afe6cd7ade7033b28ddc6137f85a39 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 19 Sep 2023 20:32:25 -0300 Subject: [PATCH 054/340] fix(Scripts/Karazhan): Fix fear immunity for Strawman (#17307) --- data/sql/updates/pending_db_world/rev_1695111326975856300.sql | 2 ++ src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695111326975856300.sql diff --git a/data/sql/updates/pending_db_world/rev_1695111326975856300.sql b/data/sql/updates/pending_db_world/rev_1695111326975856300.sql new file mode 100644 index 00000000000000..5f5a8ba5d462c6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695111326975856300.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|16 WHERE `entry` = 17543; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 3753a61bc9532a..24fb4e99166bb9 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -508,7 +508,7 @@ struct boss_strawman : public ScriptedAI void SpellHit(Unit* /*caster*/, SpellInfo const* Spell) override { - if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand() % 10))) + if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && roll_chance_i(10)) { /* if (not direct damage(aoe, dot)) From 90ba895cffc344b92e3d52d9304d0709dcce4b8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Sep 2023 23:33:31 +0000 Subject: [PATCH 055/340] chore(DB): import pending files Referenced commit(s): 3a51249bf5afe6cd7ade7033b28ddc6137f85a39 --- .../rev_1695111326975856300.sql => db_world/2023_09_19_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695111326975856300.sql => db_world/2023_09_19_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/rev_1695111326975856300.sql b/data/sql/updates/db_world/2023_09_19_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1695111326975856300.sql rename to data/sql/updates/db_world/2023_09_19_01.sql index 5f5a8ba5d462c6..35de258e16dad1 100644 --- a/data/sql/updates/pending_db_world/rev_1695111326975856300.sql +++ b/data/sql/updates/db_world/2023_09_19_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_19_00 -> 2023_09_19_01 -- UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|16 WHERE `entry` = 17543; From 3cfb1d3bf627c50208ac32bb1db60d1b8673bb3f Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 19 Sep 2023 21:38:41 -0300 Subject: [PATCH 056/340] fix(Scripts/Karazhan): Move Aran's elemental AI to SAI (#17312) --- .../rev_1695168508123583100.sql | 6 +++ .../Karazhan/boss_shade_of_aran.cpp | 38 ------------------- 2 files changed, 6 insertions(+), 38 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695168508123583100.sql diff --git a/data/sql/updates/pending_db_world/rev_1695168508123583100.sql b/data/sql/updates/pending_db_world/rev_1695168508123583100.sql new file mode 100644 index 00000000000000..500a18e7e8a258 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695168508123583100.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17167; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17167) AND (`source_type` = 0) AND (`id` IN (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 +(17167, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 2000, 11, 31012, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Conjured Elemental - In Combat - Cast \'Water Bolt\''); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index b96bd58d7519d3..8bb6de119cd478 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -55,7 +55,6 @@ enum ShadeOfAran //Creature Spells SPELL_CIRCULAR_BLIZZARD = 29951, - SPELL_WATERBOLT = 31012, SPELL_SHADOW_PYRO = 29978, //Creatures @@ -491,44 +490,7 @@ struct boss_shade_of_aran : public BossAI uint32 _currentHealth; }; -struct npc_aran_elemental : public ScriptedAI -{ - npc_aran_elemental(Creature* creature) : ScriptedAI(creature) - { - SetCombatMovement(false); - _scheduler.SetValidator([this] - { - return !me->HasUnitState(UNIT_STATE_CASTING); - }); - } - - void Reset() override - { - _scheduler.CancelAll(); - } - - void JustEngagedWith(Unit* /*who*/) override - { - _scheduler.Schedule(2s, [this](TaskContext context) - { - DoCastVictim(SPELL_WATERBOLT); - context.Repeat(2s); - }); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - _scheduler.Update(diff); - } -private: - TaskScheduler _scheduler; -}; - void AddSC_boss_shade_of_aran() { RegisterKarazhanCreatureAI(boss_shade_of_aran); - RegisterKarazhanCreatureAI(npc_aran_elemental); } From 74353a3c8370928f21bcc3ef94adc2e41e2110e9 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 19 Sep 2023 21:39:07 -0300 Subject: [PATCH 057/340] fix(Scripts/Karazhan): Delay chain spawning so it spawns on proper place (#17311) * fix(Scripts/Karazhan): Delay chain spawning so it spawns on proper place * Update boss_terestian_illhoof.cpp --- .../EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 3092045dfeb233..956bd2b6f80fb1 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -183,10 +183,13 @@ struct boss_terestian_illhoof : public BossAI DoZoneInCombat(); scheduler.Schedule(30s, [this](TaskContext context) { - if (Unit * target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false)) + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false)) { DoCast(target, SPELL_SACRIFICE, true); - target->CastSpell(target, SPELL_SUMMON_DEMONCHAINS, true); + target->m_Events.AddEventAtOffset([target] { + target->CastSpell(target, SPELL_SUMMON_DEMONCHAINS, true); + }, 1s); + Talk(SAY_SACRIFICE); context.Repeat(30s); } From 152429867b8193c9403e5b5271c0c3d7d4c13a3c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 00:39:52 +0000 Subject: [PATCH 058/340] chore(DB): import pending files Referenced commit(s): 3cfb1d3bf627c50208ac32bb1db60d1b8673bb3f --- .../rev_1695168508123583100.sql => db_world/2023_09_20_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695168508123583100.sql => db_world/2023_09_20_00.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1695168508123583100.sql b/data/sql/updates/db_world/2023_09_20_00.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1695168508123583100.sql rename to data/sql/updates/db_world/2023_09_20_00.sql index 500a18e7e8a258..4c4d27924b6bad 100644 --- a/data/sql/updates/pending_db_world/rev_1695168508123583100.sql +++ b/data/sql/updates/db_world/2023_09_20_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_19_01 -> 2023_09_20_00 -- UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17167; From 0796df57ac09ba0d6e809df4c69d8e7643908e05 Mon Sep 17 00:00:00 2001 From: Tralenor <76077537+Tralenor@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:40:08 +0200 Subject: [PATCH 059/340] feat(Core/Player): Addition of a Hook in CanFlyInZone check (#16590) --------- Co-authored-by: tmoos Co-authored-by: Winfidonarleyan Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- src/server/game/Entities/Player/Player.cpp | 7 ++++++- src/server/game/Entities/Player/Player.h | 2 +- .../game/Scripting/ScriptDefines/PlayerScript.cpp | 15 +++++++++++++++ src/server/game/Scripting/ScriptMgr.h | 11 +++++++++++ src/server/game/Spells/SpellInfo.cpp | 2 +- src/server/game/Spells/SpellInfo.h | 2 +- 6 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index ae39a51a15df70..a4b3f29960655b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -13550,8 +13550,13 @@ uint32 Player::CalculateTalentsPoints() const return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT)); } -bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const +bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) { + if (!sScriptMgr->OnCanPlayerFlyInZone(this, mapid,zone,bySpell)) + { + return false; + } + // continent checked in SpellInfo::CheckLocation at cast and area update uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT)) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 8cb516504bdeef..19063e44a96a72 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2299,7 +2299,7 @@ class Player : public Unit, public GridObject } void HandleFall(MovementInfo const& movementInfo); - [[nodiscard]] bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const; + [[nodiscard]] bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell); void SetClientControl(Unit* target, bool allowMove, bool packetOnly = false); diff --git a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp index 68edcca999c941..de924a6c6e2486 100644 --- a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp @@ -74,6 +74,21 @@ void ScriptMgr::OnPlayerReleasedGhost(Player* player) }); } +bool ScriptMgr::OnCanPlayerFlyInZone(Player* player, uint32 mapId, uint32 zoneId, SpellInfo const* bySpell) +{ + auto ret = IsValidBoolScript([player, mapId, zoneId, bySpell](PlayerScript* script) + { + return !script->OnCanPlayerFlyInZone(player, mapId, zoneId, bySpell); + }); + + if (ret && *ret) + { + return false; + } + + return true; +} + void ScriptMgr::OnPVPKill(Player* killer, Player* killed) { ExecuteScript([&](PlayerScript* script) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 5c66b2a8dafb31..088d6b4cc359f2 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1472,6 +1472,16 @@ class PlayerScript : public ScriptObject */ virtual void OnQuestAbandon(Player* /*player*/, uint32 /*questId*/) { } + /** + * @brief This hook called before other CanFlyChecks are applied + * + * @param player Contains information about the Player + * @param mapId Contains information about the current map id + * @param zoneId Contains information about the current zone + * @param bySpell Contains information about the spell that invoked the check + */ + [[nodiscard]] virtual bool OnCanPlayerFlyInZone(Player* /*player*/, uint32 /*mapId*/, uint32 /*zoneId*/, SpellInfo const* /*bySpell*/) { return true; } + // Passive Anticheat System virtual void AnticheatSetSkipOnePacketForASH(Player* /*player*/, bool /*apply*/) { } virtual void AnticheatSetCanFlybyServer(Player* /*player*/, bool /*apply*/) { } @@ -2436,6 +2446,7 @@ class ScriptMgr bool CanSendErrorAlreadyLooted(Player* player); void OnAfterCreatureLoot(Player* player); void OnAfterCreatureLootMoney(Player* player); + bool OnCanPlayerFlyInZone(Player* player, uint32 mapId, uint32 zoneId, SpellInfo const* bySpell); // Anti cheat void AnticheatSetSkipOnePacketForASH(Player* player, bool apply); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 84e107db8449d0..bdab02384fb5f4 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1470,7 +1470,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const return SPELL_CAST_OK; } -SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player /*= nullptr*/, bool strict /*= true*/) const +SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player* player /*= nullptr*/, bool strict /*= true*/) const { // normal case if (AreaGroupId > 0) diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index dc300600b289f5..06450274fd057f 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -474,7 +474,7 @@ friend class SpellMgr; bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const* spellInfo) const; SpellCastResult CheckShapeshift(uint32 form) const; - SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player = nullptr, bool strict = true) const; + SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player* player = nullptr, bool strict = true) const; SpellCastResult CheckTarget(Unit const* caster, WorldObject const* target, bool implicit = true) const; SpellCastResult CheckExplicitTarget(Unit const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const; bool CheckTargetCreatureType(Unit const* target) const; From 190dc93d7e922ae29c7cfc4c172411ec0eadc877 Mon Sep 17 00:00:00 2001 From: wowquester <138876396+wowquester@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:40:44 +0200 Subject: [PATCH 060/340] fix(DB/Quest): Soothing Turtle Bisque POI (#16710) * fix(DB/questpoi): 7321 -Soothing Turtle Bisque - correct POI for Horde This fixes POI area for 7321 which shares it with the 555 (aliance version) which has the correct ones. Please beware of my SQL skill, although it fixes the problem, I encourage you to review this code and if necessarry, make it more compact. The basic idea is just to duplicate entries from 555 to 7321 - this results in correct behavior of the quest poi on the world map. * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../pending_db_world/db7321fix_poi.sql | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 data/sql/updates/pending_db_world/db7321fix_poi.sql diff --git a/data/sql/updates/pending_db_world/db7321fix_poi.sql b/data/sql/updates/pending_db_world/db7321fix_poi.sql new file mode 100644 index 00000000000000..bb315278ec5da5 --- /dev/null +++ b/data/sql/updates/pending_db_world/db7321fix_poi.sql @@ -0,0 +1,45 @@ +UPDATE `quest_poi` SET `WorldMapAreaId` = 24 WHERE (`QuestID` = 7321) AND (`id` IN (0,1,2,3)); +UPDATE `quest_poi` SET `id` = 4, `ObjectiveIndex` = -1 WHERE (`QuestID` = 7321) AND (`id` = 0); +UPDATE `quest_poi` SET `id` = 5, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 1); +UPDATE `quest_poi` SET `id` = 6, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 2); +UPDATE `quest_poi` SET `id` = 7, `ObjectiveIndex` = 4, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 3); +UPDATE `quest_poi_points` SET `Idx1` = 4, `Idx2` = 0, `X` = -852, `Y` = -594 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 0); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 0, `X` = -662, `Y` = -755 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 1); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 1, `X` = -646, `Y` = -742 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 2); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 2, `X` = -657, `Y` = -731 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 3); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 3, `X` = -672, `Y` = -723 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 4); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 4, `X` = -688, `Y` = -718 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 5); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 5, `X` = -714, `Y` = -710 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 0); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 6, `X` = -901, `Y` = -658 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 1); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 7, `X` = -919, `Y` = -668 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 2); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 8, `X` = -917, `Y` = -676 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 0); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 9, `X` = -904, `Y` = -689 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 1); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 10, `X` = -875, `Y` = -716 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 2); +UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 11, `X` = -854, `Y` = -726 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 3); +UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 0, `X` = -480, `Y` = -989 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 4); +UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 1, `X` = -475, `Y` = -963 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 5); +UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 2, `X` = -480, `Y` = -936 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 6); +UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 3, `X` = -543, `Y` = -781 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 7); +UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 4, `X` = -557, `Y` = -763 WHERE (`QuestID` = 7321) AND (`Idx1` = 3) AND (`Idx2` = 0); +DELETE FROM `quest_poi_points` WHERE `QuestID` = 7321 AND `Idx1` = 6 AND `Idx2` IN (5,6,7,8,9,10,11); +DELETE FROM `quest_poi_points` WHERE `QuestID` = 7321 AND `Idx1` = 7 AND `Idx2` IN (0,1,2,3,4,5,6,7,8,9,10,11); +INSERT INTO `quest_poi_points` (`QuestID`, `Idx1`, `Idx2`, `X`, `Y`, `VerifiedBuild`) VALUES +(7321, 6, 5, -575, -742, 0), +(7321, 6, 6, -596, -747, 0), +(7321, 6, 7, -614, -784, 0), +(7321, 6, 8, -609, -797, 0), +(7321, 6, 9, -549, -926, 0), +(7321, 6, 10, -528, -965, 0), +(7321, 6, 11, -512, -984, 0), +(7321, 7, 0, -238, -1121, 0), +(7321, 7, 1, -254, -1107, 0), +(7321, 7, 2, -380, -1010, 0), +(7321, 7, 3, -415, -986, 0), +(7321, 7, 4, -428, -981, 0), +(7321, 7, 5, -438, -1021, 0), +(7321, 7, 6, -423, -1042, 0), +(7321, 7, 7, -373, -1084, 0), +(7321, 7, 8, -349, -1099, 0), +(7321, 7, 9, -296, -1128, 0), +(7321, 7, 10, -286, -1131, 0), +(7321, 7, 11, -249, -1142, 0); From 4e270c4c1ea426c283f50f564e73058b8b483e95 Mon Sep 17 00:00:00 2001 From: wowquester <138876396+wowquester@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:41:00 +0200 Subject: [PATCH 061/340] fix(DB/Quest): Return to Brock completion text (#16711) * fix(DB/quest): 6392 - Return to Brock - incorrect completion text This fixes the incorrect completion text for 6392. * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- data/sql/updates/pending_db_world/questfix6392.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/questfix6392.sql diff --git a/data/sql/updates/pending_db_world/questfix6392.sql b/data/sql/updates/pending_db_world/questfix6392.sql new file mode 100644 index 00000000000000..716b799372373c --- /dev/null +++ b/data/sql/updates/pending_db_world/questfix6392.sql @@ -0,0 +1 @@ +UPDATE `quest_offer_reward` SET `RewardText` = 'You brought the picks. Great! I\'ll get these to my mining students. I\'m sure they\'re eager to use them on the ore deposits of Loch Modan.$B$BThank you for your help, $N. I am in your debt, but I hope this money will at least cover your travel costs.' WHERE (`ID` = 6392); From 7169215a88c49d8be3969575f1fdada9837d189e Mon Sep 17 00:00:00 2001 From: Roddan <33155577+Vanheden@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:41:10 +0200 Subject: [PATCH 062/340] fx(DB/Quest): The Stories Dead Men Tell Quest Fix (#16887) * fx(DB/Quest): The Stories Dead Men Tell Quest Fix Added script to the graves. * Create test.txt * Delete test.txt * go for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../sql/updates/pending_db_world/questfix.sql | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 data/sql/updates/pending_db_world/questfix.sql diff --git a/data/sql/updates/pending_db_world/questfix.sql b/data/sql/updates/pending_db_world/questfix.sql new file mode 100644 index 00000000000000..9a8a2a49555715 --- /dev/null +++ b/data/sql/updates/pending_db_world/questfix.sql @@ -0,0 +1,67 @@ + + -- Sir Wendell's Grave smart ai +SET @ENTRY := 194537; +DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY; +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' 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, 1, 0, 0, 71, 0, 100, 0, 21077, 0, 0, 0, 12, 33439, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8461.727, 468.7472, 596.2335, 4.729842, 'Sir Wendell\'s Grave - On Event 21077 Inform - Summon Creature \'Sir Wendell Balfour\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194537 AND `SourceId` = 1; + + -- Sir Wendell Balfour smart ai +SET @ENTRY := 33439; +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, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 51195, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Cast \'Cosmetic - Low Poly Fire\''), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 75, 29266, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Add Aura \'Permanent Feign Death\''), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 67, 1, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Create Timed Event'), +(@ENTRY, 0, 3, 0, 59, 0, 100, 0, 1, 0, 0, 0, 11, 10389, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Timed Event 1 Triggered - Cast \'Spawn Smoke\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33439 AND `SourceId` = 0; + + -- Lorien's Grave smart ai +SET @ENTRY := 194539; +DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY; +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' 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, 1, 0, 0, 71, 0, 100, 0, 21075, 0, 0, 0, 12, 33455, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8441.864, 452.88184, 596.1657, 1.850049, 'Lorien\'s Grave - On Event 21075 Inform - Summon Creature \'Lorien Sunblaze\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194539 AND `SourceId` = 1; + + -- Lorien Sunblaze smart ai +SET @ENTRY := 33455; +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, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 41290, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Disease Cloud\''), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Permanent Feign Death\''), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 61894, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Spirit Particles (green - Base)\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33455 AND `SourceId` = 0; + + -- Connall's Grave smart ai +SET @ENTRY := 194538; +DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY; +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' 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, 1, 0, 0, 71, 0, 100, 0, 21076, 0, 0, 0, 12, 33457, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8471.436, 452.21744, 596.1551, 4.7822022, 'Connall\'s Grave - On Event 21076 Inform - Summon Creature \'Conall Irongrip\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194538 AND `SourceId` = 1; + + -- Conall Irongrip smart ai +SET @ENTRY := 33457; +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, 54, 0, 100, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Conall Irongrip - On Just Summoned - Cast \'Permanent Feign Death\''); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33457 AND `SourceId` = 0; + + From 085dddbe539a604ae6763c68ebdb71b6aca2d87e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 20:41:16 +0000 Subject: [PATCH 063/340] chore(DB): import pending files Referenced commit(s): 0796df57ac09ba0d6e809df4c69d8e7643908e05 --- .../db7321fix_poi.sql => db_world/2023_09_20_01.sql} | 1 + .../questfix.sql => db_world/2023_09_20_02.sql} | 1 + .../questfix6392.sql => db_world/2023_09_20_03.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/db7321fix_poi.sql => db_world/2023_09_20_01.sql} (98%) rename data/sql/updates/{pending_db_world/questfix.sql => db_world/2023_09_20_02.sql} (99%) rename data/sql/updates/{pending_db_world/questfix6392.sql => db_world/2023_09_20_03.sql} (88%) diff --git a/data/sql/updates/pending_db_world/db7321fix_poi.sql b/data/sql/updates/db_world/2023_09_20_01.sql similarity index 98% rename from data/sql/updates/pending_db_world/db7321fix_poi.sql rename to data/sql/updates/db_world/2023_09_20_01.sql index bb315278ec5da5..a805c570ffe1c6 100644 --- a/data/sql/updates/pending_db_world/db7321fix_poi.sql +++ b/data/sql/updates/db_world/2023_09_20_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_00 -> 2023_09_20_01 UPDATE `quest_poi` SET `WorldMapAreaId` = 24 WHERE (`QuestID` = 7321) AND (`id` IN (0,1,2,3)); UPDATE `quest_poi` SET `id` = 4, `ObjectiveIndex` = -1 WHERE (`QuestID` = 7321) AND (`id` = 0); UPDATE `quest_poi` SET `id` = 5, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 1); diff --git a/data/sql/updates/pending_db_world/questfix.sql b/data/sql/updates/db_world/2023_09_20_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/questfix.sql rename to data/sql/updates/db_world/2023_09_20_02.sql index 9a8a2a49555715..5c6ad932a32efa 100644 --- a/data/sql/updates/pending_db_world/questfix.sql +++ b/data/sql/updates/db_world/2023_09_20_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_01 -> 2023_09_20_02 -- Sir Wendell's Grave smart ai SET @ENTRY := 194537; diff --git a/data/sql/updates/pending_db_world/questfix6392.sql b/data/sql/updates/db_world/2023_09_20_03.sql similarity index 88% rename from data/sql/updates/pending_db_world/questfix6392.sql rename to data/sql/updates/db_world/2023_09_20_03.sql index 716b799372373c..7c673d65c7f302 100644 --- a/data/sql/updates/pending_db_world/questfix6392.sql +++ b/data/sql/updates/db_world/2023_09_20_03.sql @@ -1 +1,2 @@ +-- DB update 2023_09_20_02 -> 2023_09_20_03 UPDATE `quest_offer_reward` SET `RewardText` = 'You brought the picks. Great! I\'ll get these to my mining students. I\'m sure they\'re eager to use them on the ore deposits of Loch Modan.$B$BThank you for your help, $N. I am in your debt, but I hope this money will at least cover your travel costs.' WHERE (`ID` = 6392); From ea0500df6585a2995c94640fd39944fa70ed6ece Mon Sep 17 00:00:00 2001 From: Roddan <33155577+Vanheden@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:41:25 +0200 Subject: [PATCH 064/340] fix(DB/Quest): Return To Obadei (#16891) * Create ReturnToObadei Fixed Creature Text * Delete ReturnToObadei * fix(DB/Quest): Return To Obadei Fixed NPC Text after quest completion. * Rename ReturnToObadei to ReturnToObadei.sql * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../sql/updates/pending_db_world/ReturnToObadei.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/ReturnToObadei.sql diff --git a/data/sql/updates/pending_db_world/ReturnToObadei.sql b/data/sql/updates/pending_db_world/ReturnToObadei.sql new file mode 100644 index 00000000000000..b1f415435bb7df --- /dev/null +++ b/data/sql/updates/pending_db_world/ReturnToObadei.sql @@ -0,0 +1,13 @@ + +DELETE FROM `creature_text` WHERE `CreatureID` = 16833; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(16833, 0, 0, 'No! Not... Sedai! The orcs must pay!', 12, 0, 100, 0, 0, 0, 13997, 0, 'Makuru // Makuru'); + + -- Anchorite Obadei smart ai +SET @ENTRY := 16834; +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, 20, 0, 100, 0, 9423, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 57906, 16833, 0, 0, 0, 0, 0, 'Anchorite Obadei - On Quest \'Return to Obadei\' Finished - Say Line 0'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 16834 AND `SourceId` = 0; From 586cc1ee0f9b13bf7168037a28122061a9beffd9 Mon Sep 17 00:00:00 2001 From: Christopher Galbraith <39371221+ChrisCGalbraith@users.noreply.github.com> Date: Wed, 20 Sep 2023 21:41:35 +0100 Subject: [PATCH 065/340] fix(DB/SAI) Add spore burst with 15% trigger chance (#16985) * add spore burst with 15% trigger chance * add new line at eof * ready for merge --------- Co-authored-by: ChrisCGalbraith Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../updates/pending_db_world/rev_1691842029005931700.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1691842029005931700.sql diff --git a/data/sql/updates/pending_db_world/rev_1691842029005931700.sql b/data/sql/updates/pending_db_world/rev_1691842029005931700.sql new file mode 100644 index 00000000000000..722c579c0df030 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1691842029005931700.sql @@ -0,0 +1,6 @@ +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 21246; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21246); +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`, `event_param6`, `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 +(21246, 0, 0, 0, 0, 0, 100, 0, 4850, 19400, 10900, 14500, 0, 0, 11, 38461, 0, 0, 0, 0, 0, 5, 25, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Sporebat - In Combat - Cast Sonic Charge'), +(21246, 0, 1, 0, 0, 0, 100, 0, 0, 0, 24000, 36800, 0, 0, 11, 38471, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Sporebat - In Combat - Cast \'Spore Burst\''); From 6750d8eed01b4a0377aa496375707fb45a3f62cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 20:42:10 +0000 Subject: [PATCH 066/340] chore(DB): import pending files Referenced commit(s): 4e270c4c1ea426c283f50f564e73058b8b483e95 --- .../ReturnToObadei.sql => db_world/2023_09_20_04.sql} | 1 + .../rev_1691842029005931700.sql => db_world/2023_09_20_05.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/ReturnToObadei.sql => db_world/2023_09_20_04.sql} (96%) rename data/sql/updates/{pending_db_world/rev_1691842029005931700.sql => db_world/2023_09_20_05.sql} (95%) diff --git a/data/sql/updates/pending_db_world/ReturnToObadei.sql b/data/sql/updates/db_world/2023_09_20_04.sql similarity index 96% rename from data/sql/updates/pending_db_world/ReturnToObadei.sql rename to data/sql/updates/db_world/2023_09_20_04.sql index b1f415435bb7df..608fa777d6950e 100644 --- a/data/sql/updates/pending_db_world/ReturnToObadei.sql +++ b/data/sql/updates/db_world/2023_09_20_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_03 -> 2023_09_20_04 DELETE FROM `creature_text` WHERE `CreatureID` = 16833; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1691842029005931700.sql b/data/sql/updates/db_world/2023_09_20_05.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1691842029005931700.sql rename to data/sql/updates/db_world/2023_09_20_05.sql index 722c579c0df030..234af3e23759ec 100644 --- a/data/sql/updates/pending_db_world/rev_1691842029005931700.sql +++ b/data/sql/updates/db_world/2023_09_20_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_04 -> 2023_09_20_05 UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 21246; DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21246); From e02554a2321a708d9450f4461e476325fe6639de Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Thu, 21 Sep 2023 04:42:28 +0800 Subject: [PATCH 067/340] fix(DB/Quest): Script The Binding (#17042) * Added smatAI to creatures for Warlock Pet Summoning Quests * Attackers: Trigger incidents * Modify the spelling of comments * Modify the comment again * Fix spelling errors Adjust time * Modified the time of bio disappearance and video in roughly the same as 10:53-12:00 * Update rev_1692493990178861500.sql Modify the commentary * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../rev_1692493990178861500.sql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1692493990178861500.sql diff --git a/data/sql/updates/pending_db_world/rev_1692493990178861500.sql b/data/sql/updates/pending_db_world/rev_1692493990178861500.sql new file mode 100644 index 00000000000000..44cbc1db105117 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1692493990178861500.sql @@ -0,0 +1,32 @@ +-- Summoned Succubus +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5677; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5677); +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`, `event_param6`, `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 +(5677, 0, 0, 0, 54, 0, 100, 513, 0, 0, 0, 0, 0, 0, 80, 567700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - On Just Summoned - Run Script (No Repeat)'), +(5677, 0, 1, 0, 0, 0, 100, 0, 3000, 5000, 7000, 11000, 0, 0, 11, 16583, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - In Combat - Cast \'Shadow Shock\''), +(5677, 0, 2, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - On Reached Home - Despawn In 1000 ms'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 567700); +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`, `event_param6`, `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 +(567700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Set Faction 35'), +(567700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Cast \'Summoned Demon\''), +(567700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Say Line 0'), +(567700, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Set Faction 14'), +(567700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Start Attacking'); + +-- Summoned Voidwalker +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5676; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5676); +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`, `event_param6`, `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 +(5676, 0, 0, 0, 54, 0, 100, 1, 0, 0, 0, 0, 0, 0, 80, 567600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - On Just Summoned - Run Script (No Repeat)'), +(5676, 0, 1, 0, 2, 0, 100, 1, 0, 30, 0, 0, 0, 0, 11, 7750, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Between 0-30% Health - Cast \'Consuming Rage\' (No Repeat)'), +(5676, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - On Aggro - Say Line 1'), +(5676, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - On Reached Home - Despawn In 1000 ms'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 567600); +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`, `event_param6`, `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 +(567600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Set Faction 35'), +(567600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Cast \'Summoned Demon\''), +(567600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Say Line 0'), +(567600, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Set Faction 14'), +(567600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Start Attacking'); From 0e7d49529b55a1774ca97ef1328caccb632f198a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 20:42:35 +0000 Subject: [PATCH 068/340] chore(DB): import pending files Referenced commit(s): 7169215a88c49d8be3969575f1fdada9837d189e --- .../rev_1692493990178861500.sql => db_world/2023_09_20_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1692493990178861500.sql => db_world/2023_09_20_06.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1692493990178861500.sql b/data/sql/updates/db_world/2023_09_20_06.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1692493990178861500.sql rename to data/sql/updates/db_world/2023_09_20_06.sql index 44cbc1db105117..da7ec5487ab599 100644 --- a/data/sql/updates/pending_db_world/rev_1692493990178861500.sql +++ b/data/sql/updates/db_world/2023_09_20_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_05 -> 2023_09_20_06 -- Summoned Succubus UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5677; DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5677); From 540eda2af9a21148a3d75a3db1964465de6064ad Mon Sep 17 00:00:00 2001 From: AG <43139552+AGandrup@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:48:23 +0200 Subject: [PATCH 069/340] fix(Core/Unit): Added bluewall AoE check (#17064) * Added bluewall AoE check - AoE spells/abilities done by non-flagged players now has no effect on pvp flagged players. * Crash fix * Update Unit.cpp Allow spells with flag "SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK" to pass this check. --- src/server/game/Entities/Unit/Unit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 57674dd6dc5260..a42fb492d7d116 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13956,6 +13956,9 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo // additional checks - only PvP case if (playerAffectingAttacker && playerAffectingTarget) { + if (!IsPvP() && bySpell && bySpell->IsAffectingArea() && !bySpell->HasAttribute(SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK)) + return false; + if (target->IsPvP()) return true; From 8e2f02b3613b22633cc8f4c6eefcd6356cd15e7c Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Wed, 20 Sep 2023 20:51:59 +0000 Subject: [PATCH 070/340] fix(DB/Item) Update some mismatched items from 12340 (#16452) --------- Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- .../rev_1685745892775868100.sql | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1685745892775868100.sql diff --git a/data/sql/updates/pending_db_world/rev_1685745892775868100.sql b/data/sql/updates/pending_db_world/rev_1685745892775868100.sql new file mode 100644 index 00000000000000..4b37c6c8d64d82 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1685745892775868100.sql @@ -0,0 +1,71 @@ +SET @Agility := 3; +SET @Strength := 4; +SET @Intellect := 5; +SET @Spirit := 6; +SET @Stamina := 7; +SET @Crit := 32; +SET @Resilience := 35; +SET @AttackPower := 38; +SET @MP5 := 43; +Set @SpellPower := 45; + +-- General's Ornamented Bracers 32983 113 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 624, `AllowableClass` = 3 WHERE `entry` = 32983; +-- Marshal's Ornamented Bracers 32986 113 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 624, `AllowableClass` = 3 WHERE `entry` = 32986; +-- General's Ringmail Bracers 32991 113 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 349, `AllowableClass` = 68 WHERE `entry` = 32991; +-- Marshal's Ringmail Bracers 32994 113 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 349, `AllowableClass` = 68 WHERE `entry` = 32994; +-- General's Mooncloth Cuffs 32973 113 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 25, `stat_type2` = @Intellect, `stat_value2` = 14, `stat_type3` = @SpellPower, `stat_value3` = 22, `stat_type4` = @Resilience, `stat_value4` = 14, `armor` = 84, `AllowableClass` = 400 WHERE `entry` = 32973; +-- Marshal's Mooncloth Cuffs 32977 113 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 25, `stat_type2` = @Intellect, `stat_value2` = 14, `stat_type3` = @SpellPower, `stat_value3` = 22, `stat_type4` = @Resilience, `stat_value4` = 14, `armor` = 84, `AllowableClass` = 400 WHERE `entry` = 32977; +-- General's Plate Greaves Tier 2 30491 123 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Strength, `stat_value1` = 27, `stat_type2` = @Stamina, `stat_value2` = 40, `stat_type3` = @Crit, `stat_value3` = 27, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 30491; +-- General's Ornamented Belt 32982 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 870, `AllowableClass` = 3 WHERE `entry` = 32982; +-- General's Ornamented Greaves 32984 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 32984; +-- Marshal's Ornamented Belt 32985 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 870, `AllowableClass` = 3 WHERE `entry` = 32985; +-- Marshal's Ornamented Greaves 32987 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 32987; +-- General's Ringmail Girdle 32992 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 487, `AllowableClass` = 68 WHERE `entry` = 32992; +-- General's Ringmail Sabatons 32993 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 595, `AllowableClass` = 68 WHERE `entry` = 32993; +-- Marshal's Ringmail Girdle 32995 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 487, `AllowableClass` = 68 WHERE `entry` = 32995; +-- Marshal's Ringmail Sabatons 32996 123 +UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 595, `AllowableClass` = 68 WHERE `entry` = 32996; +-- General's Mooncloth Belt 32974 123 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 39, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 117, `AllowableClass` = 400 WHERE `entry` = 32974; +-- General's Mooncloth Slippers 32975 123 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 40, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 142, `AllowableClass` = 400 WHERE `entry` = 32975; +-- Marshal's Mooncloth Belt 32976 123 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 39, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 117, `AllowableClass` = 400 WHERE `entry` = 32976; +-- Marshal's Mooncloth Slippers 32978 123 +UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 40, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 142, `AllowableClass` = 400 WHERE `entry` = 32978; + +UPDATE `item_template` SET `Flags` = `Flags`|32768, `FlagsExtra` = `FlagsExtra`&~8192, `BuyPrice` = 0, `SellPrice` = 0, `AllowableRace` = 32767, `VerifiedBuild` = 0 WHERE `entry` IN ( +32983, -- General's Ornamented Bracers +32986, -- Marshal's Ornamented Bracers +32991, -- General's Ringmail Bracers +32994, -- Marshal's Ringmail Bracers +32973, -- General's Mooncloth Cuffs +32977, -- Marshal's Mooncloth Cuffs +30491, -- General's Plate Greaves Tier 2 +32982, -- General's Ornamented Belt +32984, -- General's Ornamented Greaves +32985, -- Marshal's Ornamented Belt +32987, -- Marshal's Ornamented Greaves +32992, -- General's Ringmail Girdle +32993, -- General's Ringmail Sabatons +32995, -- Marshal's Ringmail Girdle +32996, -- Marshal's Ringmail Sabatons +32974, -- General's Mooncloth Belt +32975, -- General's Mooncloth Slippers +32976, -- Marshal's Mooncloth Belt +32978 -- Marshal's Mooncloth Slippers +); From c4c5e0b4386ca277dcf61d4d8a1e7d1f3bdb0065 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 20:53:03 +0000 Subject: [PATCH 071/340] chore(DB): import pending files Referenced commit(s): 8e2f02b3613b22633cc8f4c6eefcd6356cd15e7c --- .../rev_1685745892775868100.sql => db_world/2023_09_20_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1685745892775868100.sql => db_world/2023_09_20_07.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1685745892775868100.sql b/data/sql/updates/db_world/2023_09_20_07.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1685745892775868100.sql rename to data/sql/updates/db_world/2023_09_20_07.sql index 4b37c6c8d64d82..b2a6df41e963f0 100644 --- a/data/sql/updates/pending_db_world/rev_1685745892775868100.sql +++ b/data/sql/updates/db_world/2023_09_20_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_20_06 -> 2023_09_20_07 SET @Agility := 3; SET @Strength := 4; SET @Intellect := 5; From b1c92f498a3ba2464478f5115f2b8974efcbda35 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:55:46 -0400 Subject: [PATCH 072/340] refactor(Core): Source config more aggressively from env, rephrase a few of the messages (#17114) * refactor(Core): Let modules source config from env * create a cache of configs from env * Update src/common/Configuration/Config.cpp Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * Update src/common/Configuration/Config.cpp Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * enforce new function name --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- src/common/Configuration/Config.cpp | 89 +++++++++++++++++++--------- src/server/apps/authserver/Main.cpp | 5 -- src/server/apps/worldserver/Main.cpp | 5 -- 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index 7a51fc178df3da..742777b18611a8 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -32,6 +32,7 @@ namespace std::vector _additonalFiles; std::vector _args; std::unordered_map _configOptions; + std::unordered_map _envVarCache; std::mutex _configLock; // Check system configs like *server.conf* @@ -120,7 +121,7 @@ namespace auto const& itr = fileConfigs.find(confOption); if (itr != fileConfigs.end()) { - PrintError(file, "> Config::LoadFile: Dublicate key name '{}' in config file '{}'", confOption, file); + PrintError(file, "> Config::LoadFile: Duplicate key name '{}' in config file '{}'", confOption, file); return true; } @@ -283,9 +284,14 @@ namespace return result; } + std::string GetEnvVarName(std::string const& configName) + { + return "AC_" + IniKeyToEnvVarKey(configName); + } + Optional EnvVarForIniKey(std::string const& key) { - std::string envKey = "AC_" + IniKeyToEnvVarKey(key); + std::string envKey = GetEnvVarName(key); char* val = std::getenv(envKey.c_str()); if (!val) return std::nullopt; @@ -330,6 +336,29 @@ bool ConfigMgr::Reload() return true; } +// Check the _envVarCache if the env var is there +// if not, check the env for the value +Optional GetEnvFromCache(std::string const& configName, std::string const& envVarName) +{ + auto foundInCache = _envVarCache.find(envVarName); + Optional foundInEnv; + // If it's not in the cache + if (foundInCache == _envVarCache.end()) + { + // Check the env itself + foundInEnv = EnvVarForIniKey(configName); + if (foundInEnv) + { + // If it's found in the env, put it in the cache + _envVarCache.emplace(envVarName, *foundInEnv); + } + // Return the result of checking env + return foundInEnv; + } + + return foundInCache->second; +} + std::vector ConfigMgr::OverrideWithEnvVariablesIfAny() { std::lock_guard lock(_configLock); @@ -357,28 +386,30 @@ template T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLogs /*= true*/) const { std::string strValue; + auto const& itr = _configOptions.find(name); - if (itr == _configOptions.end()) + bool notFound = itr == _configOptions.end(); + auto envVarName = GetEnvVarName(name); + Optional envVar = GetEnvFromCache(name, envVarName); + if (envVar) { - Optional envVar = EnvVarForIniKey(name); - if (!envVar) + // If showLogs and this key/value pair wasn't found in the currently saved config + if (showLogs && (notFound || itr->second != envVar->c_str())) { - if (showLogs) - { - LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file.", - name, _filename, name, Acore::ToString(def)); - } - - return def; + LOG_INFO("server.loading", "> Config: Found config value '{}' from environment variable '{}'.", name, envVarName ); + AddKey(name, envVar->c_str(), "ENVIRONMENT", false, false); } + strValue = *envVar; + } + else if (notFound) + { if (showLogs) { - LOG_WARN("server.loading", "Missing property {} in config file {}, recovered with environment '{}' value.", - name, _filename, envVar->c_str()); + LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.", + name, _filename, name, Acore::ToString(def), envVarName); } - - strValue = *envVar; + return def; } else { @@ -404,24 +435,26 @@ template<> std::string ConfigMgr::GetValueDefault(std::string const& name, std::string const& def, bool showLogs /*= true*/) const { auto const& itr = _configOptions.find(name); - if (itr == _configOptions.end()) + bool notFound = itr == _configOptions.end(); + auto envVarName = GetEnvVarName(name); + Optional envVar = GetEnvFromCache(name, envVarName); + if (envVar) { - Optional envVar = EnvVarForIniKey(name); - if (envVar) + // If showLogs and this key/value pair wasn't found in the currently saved config + if (showLogs && (notFound || itr->second != envVar->c_str())) { - if (showLogs) - { - LOG_WARN("server.loading", "Missing property {} in config file {}, recovered with environment '{}' value.", - name, _filename, envVar->c_str()); - } - - return *envVar; + LOG_INFO("server.loading", "> Config: Found config value '{}' from environment variable '{}'.", name, envVarName); + AddKey(name, *envVar, "ENVIRONMENT", false, false); } + return *envVar; + } + else if (notFound) + { if (showLogs) { - LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file.", - name, _filename, name, def); + LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.", + name, _filename, name, def, envVarName); } return def; diff --git a/src/server/apps/authserver/Main.cpp b/src/server/apps/authserver/Main.cpp index bc40f2f10bf9e0..4c110db7aaaf49 100644 --- a/src/server/apps/authserver/Main.cpp +++ b/src/server/apps/authserver/Main.cpp @@ -85,8 +85,6 @@ int main(int argc, char** argv) if (!sConfigMgr->LoadAppConfigs()) return 1; - std::vector overriddenKeys = sConfigMgr->OverrideWithEnvVariablesIfAny(); - // Init logging sLog->RegisterAppender(); sLog->Initialize(nullptr); @@ -103,9 +101,6 @@ int main(int argc, char** argv) LOG_INFO("server.authserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100); }); - for (std::string const& key : overriddenKeys) - LOG_INFO("server.authserver", "Configuration field {} was overridden with environment variable.", key); - OpenSSLCrypto::threadsSetup(); std::shared_ptr opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); }); diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp index fa91207a72d673..b2087448a7dc4b 100644 --- a/src/server/apps/worldserver/Main.cpp +++ b/src/server/apps/worldserver/Main.cpp @@ -184,8 +184,6 @@ int main(int argc, char** argv) if (!sConfigMgr->LoadAppConfigs()) return 1; - std::vector overriddenKeys = sConfigMgr->OverrideWithEnvVariablesIfAny(); - std::shared_ptr ioContext = std::make_shared(); // Init all logs @@ -205,9 +203,6 @@ int main(int argc, char** argv) LOG_INFO("server.worldserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100); }); - for (std::string const& key : overriddenKeys) - LOG_INFO("server.worldserver", "Configuration field {} was overridden with environment variable.", key); - OpenSSLCrypto::threadsSetup(); std::shared_ptr opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); }); From 168192b731baf0a3d549a8b27f853ea009e680e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefano=20Borz=C3=AC?= Date: Thu, 21 Sep 2023 12:43:57 +0200 Subject: [PATCH 073/340] fix(CI): cppcheck failure step (#17240) * feat: add cppcheck for scripts * fix: cppcheck step failure * trigger cppcheck build, it should fail * fix: cppcheck should succeed * fix: cppcheck --- .github/workflows/cpp-check.yml | 15 ++++++--------- .suppress.cppcheck | 1 + src/server/apps/authserver/Server/AuthSession.h | 1 + src/server/game/Server/Packets/MiscPackets.h | 3 +++ 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .suppress.cppcheck diff --git a/.github/workflows/cpp-check.yml b/.github/workflows/cpp-check.yml index a4305fac544958..ea1f7adbb3476f 100644 --- a/.github/workflows/cpp-check.yml +++ b/.github/workflows/cpp-check.yml @@ -26,12 +26,9 @@ jobs: run: | sudo apt update -y sudo apt install -y cppcheck - cppcheck --force --inline-suppr \ - -i src/server/game/Achievements/AchievementMgr.cpp \ - -i src/server/game/AuctionHouse/AuctionHouseMgr.cpp \ - -i src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp \ - -i src/server/game/DungeonFinding/LFGMgr.cpp \ - -i src/server/game/Entities/GameObject/GameObject.cpp \ - -i src/server/game/Entities/Pet/Pet.cpp \ - -i src/server/game/Entities/Player/Player.cpp \ - src/ + cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt + + if [ -s report.txt ]; then # if file is not empty + cat report.txt + exit 1 # let github action fails + fi diff --git a/.suppress.cppcheck b/.suppress.cppcheck new file mode 100644 index 00000000000000..a29d5a58962d35 --- /dev/null +++ b/.suppress.cppcheck @@ -0,0 +1 @@ +cppcheckError diff --git a/src/server/apps/authserver/Server/AuthSession.h b/src/server/apps/authserver/Server/AuthSession.h index 4a333c8168c89a..fe19cf80927ffb 100644 --- a/src/server/apps/authserver/Server/AuthSession.h +++ b/src/server/apps/authserver/Server/AuthSession.h @@ -45,6 +45,7 @@ enum AuthStatus STATUS_CLOSED }; +// cppcheck-suppress ctuOneDefinitionRuleViolation struct AccountInfo { void LoadResult(Field* fields); diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h index 7097596ada63a3..52c45ba63063de 100644 --- a/src/server/game/Server/Packets/MiscPackets.h +++ b/src/server/game/Server/Packets/MiscPackets.h @@ -57,6 +57,7 @@ namespace WorldPackets class AC_GAME_API PlayMusic final : public ServerPacket { public: + // cppcheck-suppress missingReturn PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { } PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { } @@ -68,6 +69,7 @@ namespace WorldPackets class AC_GAME_API PlayObjectSound final : public ServerPacket { public: + // cppcheck-suppress missingReturn PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8) { } PlayObjectSound(ObjectGuid const& sourceObjectGUID, uint32 soundKitID) : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID) { } @@ -82,6 +84,7 @@ namespace WorldPackets class AC_GAME_API Playsound final : public ServerPacket { public: + // cppcheck-suppress missingReturn Playsound() : ServerPacket(SMSG_PLAY_SOUND, 4) { } Playsound(uint32 soundKitID) : ServerPacket(SMSG_PLAY_SOUND, 4), SoundKitID(soundKitID) { } From f633eb8592b83a9dc38871a969a9cf39607897e5 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Thu, 21 Sep 2023 18:56:28 +0200 Subject: [PATCH 074/340] fix(Core/Achivement): Implement ACHIEVEMENT_FLAG_AVERAGE (#17263) --- .../Implementation/CharacterDatabase.cpp | 2 +- .../game/Achievements/AchievementMgr.cpp | 26 +++++++++++++++++-- src/server/game/Achievements/AchievementMgr.h | 1 + src/server/game/Entities/Player/Player.cpp | 2 ++ src/server/game/Entities/Player/Player.h | 5 ++++ .../game/Entities/Player/PlayerStorage.cpp | 7 +++-- 6 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 9565cf310ead46..841ac51c529777 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -71,7 +71,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() "resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, " "arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " "health, power1, power2, power3, power4, power5, power6, power7, instance_id, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, " - "knownTitles, actionBars, grantableLevels, innTriggerId, extraBonusTalentCount FROM characters WHERE guid = ?", CONNECTION_ASYNC); + "knownTitles, actionBars, grantableLevels, innTriggerId, extraBonusTalentCount, UNIX_TIMESTAMP(creation_date) FROM characters WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_AURAS, "SELECT casterGuid, itemGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, " "base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 4b1c92e728d573..81dbe6bcecd631 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -758,7 +758,12 @@ void AchievementMgr::SendCriteriaUpdate(AchievementCriteriaEntry const* entry, C data << uint32(timedCompleted ? 0 : 1); // 1 is for keeping the counter at 0 in client data.AppendPackedTime(progress->date); data << uint32(timeElapsed); // time elapsed in seconds - data << uint32(0); // unk + + if (sAchievementMgr->IsAverageCriteria(entry)) + data << uint32(GameTime::GetGameTime().count() - GetPlayer()->GetCreationTime().count()); // for average achievements + else + data << uint32(timeElapsed); // time elapsed in seconds + GetPlayer()->SendDirectMessage(&data); } @@ -2356,7 +2361,11 @@ void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const *data << uint32(0); /// @todo: This should be 1 if it is a failed timed criteria data->AppendPackedTime(iter->second.date); *data << uint32(now - iter->second.date); - *data << uint32(now - iter->second.date); + + if (sAchievementMgr->IsAverageCriteria(sAchievementCriteriaStore.LookupEntry(iter->first))) + *data << uint32(now - GetPlayer()->GetCreationTime().count()); // for average achievements + else + *data << uint32(now - iter->second.date); } *data << int32(-1); @@ -2445,6 +2454,19 @@ bool AchievementGlobalMgr::IsStatisticAchievement(AchievementEntry const* achiev return false; } +bool AchievementGlobalMgr::IsAverageCriteria(AchievementCriteriaEntry const* criteria) const +{ + if ((sAchievementStore.LookupEntry(criteria->referredAchievement))->flags & ACHIEVEMENT_FLAG_AVERAGE) + return true; + + if (AchievementEntryList const* achRefList = GetAchievementByReferencedId(criteria->referredAchievement)) + for (AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr) + if ((*itr)->flags & ACHIEVEMENT_FLAG_AVERAGE) + return true; + + return false; +} + bool AchievementGlobalMgr::IsRealmCompleted(AchievementEntry const* achievement) const { auto itr = _allCompletedAchievements.find(achievement->ID); diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index 7b46c58ccf0266..c82cc6f4e8ae17 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -330,6 +330,7 @@ class AchievementGlobalMgr bool IsStatisticCriteria(AchievementCriteriaEntry const* achievementCriteria) const; bool IsStatisticAchievement(AchievementEntry const* achievement) const; + bool IsAverageCriteria(AchievementCriteriaEntry const* criteria) const; [[nodiscard]] AchievementCriteriaEntryList const* GetAchievementCriteriaByType(AchievementCriteriaTypes type) const { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a4b3f29960655b..a4d64daf17902a 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -384,6 +384,8 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this) _activeCheats = CHEAT_NONE; + m_creationTime = 0s; + _cinematicMgr = new CinematicMgr(this); m_achievementMgr = new AchievementMgr(this); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 19063e44a96a72..cffcaf7dfb1330 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2495,6 +2495,9 @@ class Player : public Unit, public GridObject void CompletedAchievement(AchievementEntry const* entry); [[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; } + void SetCreationTime(Seconds creationTime) { m_creationTime = creationTime; } + [[nodiscard]] Seconds GetCreationTime() const { return m_creationTime; } + [[nodiscard]] bool HasTitle(uint32 bitIndex) const; bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); } void SetTitle(CharTitlesEntry const* title, bool lost = false); @@ -2949,6 +2952,8 @@ class Player : public Unit, public GridObject bool _wasOutdoor; PlayerSettingMap m_charSettingsMap; + + Seconds m_creationTime; }; void AddItemsSetItem(Player* player, Item* item); diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index 3aa74d667c2c38..6a20fea94ed049 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -4948,8 +4948,8 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons //"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " // 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 //"health, power1, power2, power3, power4, power5, power6, power7, instance_id, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, knownTitles, - // 70 71 72 73 - //"actionBars, grantableLevels, innTriggerId, extraBonusTalentCount FROM characters WHERE guid = '{}'", guid); + // 70 71 72 73 74 + //"actionBars, grantableLevels, innTriggerId, extraBonusTalentCount, UNIX_TIMESTAMP(creation_date) FROM characters WHERE guid = '{}'", guid); PreparedQueryResult result = holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_FROM); if (!result) @@ -5026,6 +5026,9 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons SetObjectScale(1.0f); SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); + // load character creation date, relevant for achievements of type average + SetCreationTime(fields[74].Get()); + // load achievements before anything else to prevent multiple gains for the same achievement/criteria on every loading (as loading does call UpdateAchievementCriteria) m_achievementMgr->LoadFromDB(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS), holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS)); From 056ea323f3570463eec3728d77ed5496bb8c389a Mon Sep 17 00:00:00 2001 From: Ludwig Date: Fri, 22 Sep 2023 00:50:39 +0200 Subject: [PATCH 075/340] fix(Core/Achievement): Implement ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT (#17319) --- src/server/game/Achievements/AchievementMgr.cpp | 2 ++ src/server/game/Handlers/GroupHandler.cpp | 3 +++ src/server/shared/DataStores/DBCEnums.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 81dbe6bcecd631..fc0267f824e932 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -887,6 +887,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS: /* FIXME: for online player only currently */ case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED: case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED: + case ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT: case ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED: case ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN: case ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS: @@ -1953,6 +1954,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve case ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED: case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED: + case ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR: diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 195257b2ac95a5..e239f610530897 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -536,6 +536,9 @@ void WorldSession::HandleLootRoll(WorldPacket& recvData) case ROLL_GREED: GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED, 1); break; + case ROLL_DISENCHANT: + GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT, 1); + break; } } diff --git a/src/server/shared/DataStores/DBCEnums.h b/src/server/shared/DataStores/DBCEnums.h index c9ea4a6325c6fe..63c0b40667813d 100644 --- a/src/server/shared/DataStores/DBCEnums.h +++ b/src/server/shared/DataStores/DBCEnums.h @@ -225,6 +225,7 @@ enum AchievementCriteriaTypes ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113, ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114, ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115, + ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT = 117, ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS = 119, ACHIEVEMENT_CRITERIA_TYPE_TOTAL = 124, // 0..123 => 124 criteria types total }; From 5b899eb65d9c234a3c6dfe1c2544e1f382ab7c50 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 22 Sep 2023 00:51:04 +0200 Subject: [PATCH 076/340] fix(Scripts/Karazhan): Aran now evades when pulled out of the room (#17264) * initial * use standard methods dummy * Update boss_shade_of_aran.cpp * Update boss_shade_of_aran.cpp --------- Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com> --- .../Karazhan/boss_shade_of_aran.cpp | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 8bb6de119cd478..61f4538b2fc8f8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -76,6 +76,8 @@ enum Groups GROUP_DRINKING = 1 }; +Position const roomCenter = {-11158.f, -1920.f}; + Position const elementalPos[4] = { {-11168.1f, -1939.29f, 232.092f, 1.46f}, @@ -105,7 +107,7 @@ struct boss_shade_of_aran : public BossAI void Reset() override { BossAI::Reset(); - drinkScheduler.CancelAll(); + _drinkScheduler.CancelAll(); LastSuperSpell = rand() % 3; for (uint8 i = 0; i < 3; ++i) @@ -146,6 +148,11 @@ struct boss_shade_of_aran : public BossAI }); } + bool CheckAranInRoom() + { + return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f; + } + void AttackStart(Unit* who) override { if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE) @@ -216,7 +223,7 @@ struct boss_shade_of_aran : public BossAI libraryDoor->SetGoState(GO_STATE_READY); libraryDoor->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); } - }).Schedule(1ms, [this](TaskContext context) + }).Schedule(1s, [this](TaskContext context) { if (!me->IsNonMeleeSpellCast(false) && !_drinking) { @@ -356,7 +363,7 @@ struct boss_shade_of_aran : public BossAI me->SetStandState(UNIT_STAND_STATE_SIT); DoCastSelf(SPELL_DRINK, true); _currentHealth = me->GetHealth(); - drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) + _drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) { //check for damage to interrupt if (me->GetHealth() < _currentHealth) @@ -367,7 +374,7 @@ struct boss_shade_of_aran : public BossAI me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); DoCastSelf(SPELL_POTION, false); DoCastSelf(SPELL_AOE_PYROBLAST, false); - drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinkScheduler.CancelGroup(GROUP_DRINKING); _drinking = false; } else { @@ -380,7 +387,7 @@ struct boss_shade_of_aran : public BossAI me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); DoCastSelf(SPELL_POTION, true); DoCastSelf(SPELL_AOE_PYROBLAST, false); - drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinkScheduler.CancelGroup(GROUP_DRINKING); _drinking = false; }); context.Repeat(12s); //semi-arbitrary duration to envelop drinking duration @@ -444,12 +451,18 @@ struct boss_shade_of_aran : public BossAI void UpdateAI(uint32 diff) override { scheduler.Update(diff); - drinkScheduler.Update(diff); + _drinkScheduler.Update(diff); if (!UpdateVictim()) return; - if (_arcaneCooledDown && _fireCooledDown && _frostCooledDown) + if (!CheckAranInRoom()) + { + EnterEvadeMode(); + return; + } + + if (_arcaneCooledDown && _fireCooledDown && _frostCooledDown && !_drinking) DoMeleeAttackIfReady(); } @@ -481,7 +494,7 @@ struct boss_shade_of_aran : public BossAI } } private: - TaskScheduler drinkScheduler; + TaskScheduler _drinkScheduler; bool _arcaneCooledDown; bool _fireCooledDown; From fcd58da08c0b50383ff9f5d6b40cfc2054ef8e0b Mon Sep 17 00:00:00 2001 From: Ludwig Date: Fri, 22 Sep 2023 00:54:08 +0200 Subject: [PATCH 077/340] fix(Core/Achievement): Implement ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID (#17316) --- src/server/game/Achievements/AchievementMgr.cpp | 17 ++++++++++++++++- src/server/game/Instances/InstanceSaveMgr.cpp | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index fc0267f824e932..f445136f0d5f01 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1154,6 +1154,21 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE); break; } + case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID: + { + // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case + if (!miscValue1) + continue; + + Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : sMapMgr->FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId()); + if (!map || !map->IsDungeon()) + continue; + + if (map->ToInstanceMap()->GetMaxPlayers() != achievementCriteria->complete_raid.groupSize) + continue; + SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE); + break; + } case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE: // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case if (!miscValue1) @@ -1758,7 +1773,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING: break; // FIXME: not triggered in code as result, need to implement - case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID: case ACHIEVEMENT_CRITERIA_TYPE_TOTAL: break; // Not implemented yet :( } @@ -1930,6 +1944,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve case ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP: case ACHIEVEMENT_CRITERIA_TYPE_DEATH: case ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON: + case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID: case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE: case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER: case ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM: diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index efc07e5a46160d..d934ec3ad32dc8 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -675,6 +675,8 @@ InstancePlayerBind* InstanceSaveMgr::PlayerBindToInstance(ObjectGuid guid, Insta stmt->SetData(1, save->GetInstanceId()); stmt->SetData(2, permanent); CharacterDatabase.Execute(stmt); + + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID, 1); } if (bind.save != save) From fb1d356af98d7399f462055ab31d8e17847ad416 Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sat, 23 Sep 2023 01:24:41 +0000 Subject: [PATCH 078/340] fix(Script/Karazhan): Voidzones should only happen in Portal Phase (#17315) Update boss_netherspite.cpp --- .../Karazhan/boss_netherspite.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index a1f03421e0991f..46f16be9583bbb 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -218,13 +218,17 @@ struct boss_netherspite : public BossAI } }).Schedule(10s, PORTAL_PHASE, [this](TaskContext context) { - UpdatePortals(); - context.Repeat(1s); + UpdatePortals(); + context.Repeat(1s); }).Schedule(10s, PORTAL_PHASE, [this](TaskContext context) { - DoCastSelf(SPELL_EMPOWERMENT); - me->AddAura(SPELL_NETHERBURN_AURA, me); - context.Repeat(90s); + DoCastSelf(SPELL_EMPOWERMENT); + me->AddAura(SPELL_NETHERBURN_AURA, me); + context.Repeat(90s); + }).Schedule(15s, PORTAL_PHASE, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true); + context.Repeat(15s); }); Talk(EMOTE_PHASE_PORTAL); } @@ -267,11 +271,7 @@ struct boss_netherspite : public BossAI HandleDoors(false); SwitchToPortalPhase(); DoZoneInCombat(); - scheduler.Schedule(15s, [this](TaskContext context) - { - DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true); - context.Repeat(15s); - }).Schedule(9min, [this](TaskContext /*context*/) + scheduler.Schedule(9min, [this](TaskContext /*context*/) { if (!berserk) { From 1a84ab6983d038f92b547c5b5b1026190adbc2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Mauger?= Date: Sat, 23 Sep 2023 20:49:20 +0200 Subject: [PATCH 079/340] fix(Core/Unit): Fix CanSwim method not accurate for players (#17320) --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a42fb492d7d116..b95b31962f009c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -20224,7 +20224,7 @@ bool Unit::CanSwim() const // Mirror client behavior, if this method returns false then client will not use swimming animation and for players will apply gravity as if there was no water if (HasUnitFlag(UNIT_FLAG_CANNOT_SWIM)) return false; - if (HasUnitFlag(UNIT_FLAG_POSSESSED)) // is player + if (HasUnitFlag(UNIT_FLAG_POSSESSED) || HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED)) // is player return true; if (HasUnitFlag2(UNIT_FLAG2_UNUSED_6)) return false; From e7d0c75c7ef16e999f308d27dba0f12285e732be Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 23 Sep 2023 23:32:35 +0200 Subject: [PATCH 080/340] fix(CI): windows build (#17328) --- .github/workflows/windows_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 76d78e7e0a6849..9210ae8ae908ea 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -45,7 +45,7 @@ jobs: - name: Copy dll files shell: bash run: | - cp "/c/Program Files/OpenSSL/bin/legacy.dll" "env/dist" + cp "/c/Program Files/OpenSSL-Win64/bin/legacy.dll" "env/dist" - name: Dry run authserver shell: bash run: | From 58f8fe6426d3c9465359599fac11af094c1fc980 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Sat, 23 Sep 2023 23:55:45 +0200 Subject: [PATCH 081/340] refactor(Scripts/Midsummer): Remove old unused code for spell 45644 (#17324) - spell 45644 used to be linked to spell_midsummer_juggling_torch - spell 45644 was later linked to new implementation spell_midsummer_torch_catch in e1e4c6cddc44971054c61df1a884ac7c795c8b73 - old implementation of spell 45644 was never removed from spell_midsummer_juggling_torch --- src/server/scripts/Events/midsummer.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index a7b7d5ad708f68..b24d7ed6b447bc 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -424,8 +424,6 @@ class spell_midsummer_juggling_torch : public SpellScript { PrepareSpellScript(spell_midsummer_juggling_torch); - bool handled; - bool Load() override { handled = false; return true; } void HandleFinish() { Unit* caster = GetCaster(); @@ -447,27 +445,9 @@ class spell_midsummer_juggling_torch : public SpellScript caster->CastSpell(caster, SPELL_JUGGLE_SELF, true); } - void HandleDummy(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - Unit* caster = GetCaster(); - if (!caster || caster->GetTypeId() != TYPEID_PLAYER) - return; - - if (Player* target = GetHitPlayer()) - if (!handled && target->GetQuestRewardStatus(target->GetTeamId() == TEAM_ALLIANCE ? 11657 : 11923)) - { - handled = true; - caster->CastSpell(target, SPELL_GIVE_TORCH, true); - } - } - void Register() override { - if (m_scriptSpellId == SPELL_TORCH_CHECK) - OnEffectHitTarget += SpellEffectFn(spell_midsummer_juggling_torch::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - else - AfterCast += SpellCastFn(spell_midsummer_juggling_torch::HandleFinish); + AfterCast += SpellCastFn(spell_midsummer_juggling_torch::HandleFinish); } }; From 701b3efe07a2feade5a3adf49f52148525003865 Mon Sep 17 00:00:00 2001 From: damnablebear <127447064+damnablebear@users.noreply.github.com> Date: Sun, 24 Sep 2023 04:29:43 -0400 Subject: [PATCH 082/340] fix(DB/Quests): adding AllowableRaces flags for Quests 'The Mark of the Lightbringer' and 'Tomb of the Lightbringer' (#17301) * Add files via upload * Update lightbringer-quest-allowableraces.sql * Update lightbringer-quest-allowableraces.sql * Update lightbringer-quest-allowableraces.sql --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../pending_db_world/lightbringer-quest-allowableraces.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql diff --git a/data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql b/data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql new file mode 100644 index 00000000000000..c2dddd649d386e --- /dev/null +++ b/data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `AllowableRaces` = 1101 WHERE (`ID` IN (9474,9446)); From f7779a8fe4ce07e34551c8ed35d7f6445b9ab4a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Sep 2023 08:30:55 +0000 Subject: [PATCH 083/340] chore(DB): import pending files Referenced commit(s): 701b3efe07a2feade5a3adf49f52148525003865 --- .../2023_09_24_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/lightbringer-quest-allowableraces.sql => db_world/2023_09_24_00.sql} (64%) diff --git a/data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql b/data/sql/updates/db_world/2023_09_24_00.sql similarity index 64% rename from data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql rename to data/sql/updates/db_world/2023_09_24_00.sql index c2dddd649d386e..2651315b4c0fa1 100644 --- a/data/sql/updates/pending_db_world/lightbringer-quest-allowableraces.sql +++ b/data/sql/updates/db_world/2023_09_24_00.sql @@ -1 +1,2 @@ +-- DB update 2023_09_20_07 -> 2023_09_24_00 UPDATE `quest_template` SET `AllowableRaces` = 1101 WHERE (`ID` IN (9474,9446)); From def86cc74ec36dadf8af6b58d305a066ae5d01c7 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 24 Sep 2023 10:19:00 -0300 Subject: [PATCH 084/340] =?UTF-8?q?feat(Scripts/Commands):=20Display=20cre?= =?UTF-8?q?ature=20entry=20when=20using=20the=20npc=20nea=E2=80=A6=20(#173?= =?UTF-8?q?31)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(Scripts/Commands): Display creature entry when using the npc near command --- .../updates/pending_db_world/rev_1695556771332912400.sql | 4 ++++ src/server/scripts/Commands/cs_npc.cpp | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695556771332912400.sql diff --git a/data/sql/updates/pending_db_world/rev_1695556771332912400.sql b/data/sql/updates/pending_db_world/rev_1695556771332912400.sql new file mode 100644 index 00000000000000..741ff1f66ea8e0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695556771332912400.sql @@ -0,0 +1,4 @@ +-- +UPDATE `acore_string` SET `content_default` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', +`locale_deDE` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', +`locale_zhCN` = '%d%s - (entry: %d) |cffffffff|H生物:%d|h[%s X:%f Y:%f Z:%f 地图号:%d]|h|r' WHERE `entry` = 515; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 7813f5e422ca48..3db1a22fe73ef3 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -15,13 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -Name: npc_commandscript -%Complete: 100 -Comment: All npc related commands -Category: commandscripts -EndScriptData */ - #include "Chat.h" #include "CreatureAI.h" #include "CreatureGroups.h" @@ -719,7 +712,7 @@ class npc_commandscript : public CommandScript if (!creatureTemplate) continue; - handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", ""); + handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", ""); ++count; } while (result->NextRow()); From 5952861e92387a25ccc35294aa553d3fb6d12539 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Sep 2023 13:20:05 +0000 Subject: [PATCH 085/340] chore(DB): import pending files Referenced commit(s): def86cc74ec36dadf8af6b58d305a066ae5d01c7 --- .../rev_1695556771332912400.sql => db_world/2023_09_24_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695556771332912400.sql => db_world/2023_09_24_01.sql} (88%) diff --git a/data/sql/updates/pending_db_world/rev_1695556771332912400.sql b/data/sql/updates/db_world/2023_09_24_01.sql similarity index 88% rename from data/sql/updates/pending_db_world/rev_1695556771332912400.sql rename to data/sql/updates/db_world/2023_09_24_01.sql index 741ff1f66ea8e0..1f7f081aabd74f 100644 --- a/data/sql/updates/pending_db_world/rev_1695556771332912400.sql +++ b/data/sql/updates/db_world/2023_09_24_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_24_00 -> 2023_09_24_01 -- UPDATE `acore_string` SET `content_default` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', `locale_deDE` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', From e361c92d6680733e3e2b59b12956590c8778cb9e Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sun, 24 Sep 2023 17:46:13 +0000 Subject: [PATCH 086/340] fix(Scripts/Karazhan): Sync Enfeeble and Shadow Nova (#17314) Update boss_prince_malchezaar.cpp --- .../EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 0d4774a6154467..1f44a23d9becfd 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -205,13 +205,12 @@ struct boss_malchezaar : public BossAI }); context.SetGroup(GROUP_ENFEEBLE); - scheduler.DelayGroup(GROUP_SHADOW_NOVA, 5s); context.Repeat(); }).Schedule(35500ms, [this](TaskContext context) { DoCastAOE(SPELL_SHADOW_NOVA); context.SetGroup(GROUP_SHADOW_NOVA); - context.Repeat(); + context.Repeat(30s); }).Schedule(40s, [this](TaskContext context) { if (!MaxSpawns(infernalTargets)) // only spawn infernal when the area is not full From 6990a1d2a43b085cccf83a1cfe23c03675a69c88 Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Sun, 24 Sep 2023 16:23:58 -0300 Subject: [PATCH 087/340] fix(Scripts/Quest): improve Catch the Wild Wolpertinger! (#17333) --- .../rev_1695559726583951400.sql | 7 ++++ .../game/Spells/SpellInfoCorrections.cpp | 6 ---- src/server/scripts/Events/brewfest.cpp | 35 +++++++++---------- 3 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695559726583951400.sql diff --git a/data/sql/updates/pending_db_world/rev_1695559726583951400.sql b/data/sql/updates/pending_db_world/rev_1695559726583951400.sql new file mode 100644 index 00000000000000..58555e35f23950 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695559726583951400.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 41621) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 23487) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 41621, 0, 0, 31, 1, 3, 23487, 0, 0, 0, 0, '', 'Throw a net at a wild wolpertinger, which will allow you to capture it and place it in your pack.'); + +-- both missions are for the horde and alliance factions +UPDATE `spell_script_names` SET `ScriptName`='spell_catch_the_wild_wolpertinger' WHERE `spell_id`=41621 AND `ScriptName`='spell_q11117_catch_the_wild_wolpertinger'; diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 3aff2bee894ab8..d55a5505d78adb 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -3922,12 +3922,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->ExcludeCasterAuraSpell = 42299; }); - // Catch the Wild Wolpertinger! - ApplySpellFix({ 41621 }, [](SpellInfo* spellInfo) - { - spellInfo->Effects[EFFECT_0].Effect = SPELL_EFFECT_DUMMY; - }); - // Brewfest quests ApplySpellFix({ 47134, 51798 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index badf22dd90f942..b202673cd96b12 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -1031,35 +1031,32 @@ class spell_brewfest_apple_trap : public SpellScript } }; -class spell_q11117_catch_the_wild_wolpertinger : public SpellScript +enum Catch { - PrepareSpellScript(spell_q11117_catch_the_wild_wolpertinger); + NPC_WILD_WOLPERTINGER = 23487, - SpellCastResult CheckTarget() - { - if (Unit* caster = GetCaster()) - if (caster->ToPlayer()) - if (Unit* target = caster->ToPlayer()->GetSelectedUnit()) - if (target->GetEntry() == 23487 && target->IsAlive()) - return SPELL_CAST_OK; + ITEM_STUNNED_WOLPERTINGER = 32906 +}; - return SPELL_FAILED_BAD_TARGETS; - } +class spell_catch_the_wild_wolpertinger : public AuraScript +{ + PrepareAuraScript(spell_catch_the_wild_wolpertinger); - void HandleDummyEffect(SpellEffIndex /*effIndex*/) + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - if (GetCaster() && GetCaster()->ToPlayer()) + if (Creature* wild = GetTarget()->ToCreature()) { - GetCaster()->ToPlayer()->AddItem(32906, 1); - if (Unit* target = GetCaster()->ToPlayer()->GetSelectedUnit()) - target->ToCreature()->DespawnOrUnsummon(500); + if (wild->GetEntry() == NPC_WILD_WOLPERTINGER) + { + wild->ToCreature()->DespawnOrUnsummon(1s, 0s); + GetCaster()->ToPlayer()->AddItem(ITEM_STUNNED_WOLPERTINGER, 1); + } } } void Register() override { - OnCheckCast += SpellCheckCastFn(spell_q11117_catch_the_wild_wolpertinger::CheckTarget); - OnEffectHitTarget += SpellEffectFn(spell_q11117_catch_the_wild_wolpertinger::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffectApply += AuraEffectApplyFn(spell_catch_the_wild_wolpertinger::HandleEffectApply, EFFECT_0, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL); } }; @@ -2072,7 +2069,7 @@ void AddSC_event_brewfest_scripts() RegisterSpellScript(spell_brewfest_ram_fatigue); RegisterSpellScript(spell_brewfest_apple_trap); // other - RegisterSpellScript(spell_q11117_catch_the_wild_wolpertinger); + RegisterSpellScript(spell_catch_the_wild_wolpertinger); RegisterSpellScript(spell_brewfest_fill_keg); RegisterSpellScript(spell_brewfest_unfill_keg); RegisterSpellScript(spell_brewfest_toss_mug); From e2e393502c981ac08be312bd5a51da04517ab091 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Sun, 24 Sep 2023 21:24:33 +0200 Subject: [PATCH 088/340] fix(Scripts/Midsummer): Add missing torch shadows (#17323) --- src/server/scripts/Events/midsummer.cpp | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index b24d7ed6b447bc..d428e1747019cf 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -296,6 +296,7 @@ enum flingTorch SPELL_FLING_TORCH_DUMMY = 46747, SPELL_MISSED_TORCH = 45676, SPELL_TORCH_COUNTER = 45693, + SPELL_TORCH_SHADOW = 46105 }; class spell_midsummer_fling_torch : public SpellScript @@ -339,7 +340,10 @@ class spell_midsummer_fling_torch : public SpellScript // we have any pos if (pos.GetPositionX()) + { caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_FLING_TORCH, true); + caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_TORCH_SHADOW, true); + } } void HandleFinish() @@ -417,7 +421,12 @@ enum eJuggle SPELL_TORCH_CHECK = 45644, SPELL_GIVE_TORCH = 45280, QUEST_TORCH_CATCHING_A = 11657, - QUEST_TORCH_CATCHING_H = 11923 + QUEST_TORCH_CATCHING_H = 11923, + + SPELL_TORCH_SHADOW_SELF = 46121, + SPELL_TORCH_SHADOW_SLOW = 46120, + SPELL_TORCH_SHADOW_MED = 46118, + SPELL_TORCH_SHADOW_FAST = 46117 }; class spell_midsummer_juggling_torch : public SpellScript @@ -433,16 +442,31 @@ class spell_midsummer_juggling_torch : public SpellScript if (const WorldLocation* loc = GetExplTargetDest()) { if (loc->GetExactDist(caster) < 3.0f) + { caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_JUGGLE_SELF, true); + caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_TORCH_SHADOW_SELF, true); + } else if (loc->GetExactDist(caster) < 10.0f) + { caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_JUGGLE_SLOW, true); + caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_TORCH_SHADOW_SLOW, true); + } else if (loc->GetExactDist(caster) < 25.0f) + { caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_JUGGLE_MED, true); + caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_TORCH_SHADOW_MED, true); + } else + { caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_JUGGLE_FAST, true); + caster->CastSpell(loc->GetPositionX(), loc->GetPositionY(), loc->GetPositionZ(), SPELL_TORCH_SHADOW_FAST, true); + } } else + { caster->CastSpell(caster, SPELL_JUGGLE_SELF, true); + caster->CastSpell(caster, SPELL_TORCH_SHADOW_SELF, true); + } } void Register() override From 09c8aeac326eb06fed049c8fec9dde9da285c4a1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Sep 2023 19:25:10 +0000 Subject: [PATCH 089/340] chore(DB): import pending files Referenced commit(s): 6990a1d2a43b085cccf83a1cfe23c03675a69c88 --- .../rev_1695559726583951400.sql => db_world/2023_09_24_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695559726583951400.sql => db_world/2023_09_24_02.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1695559726583951400.sql b/data/sql/updates/db_world/2023_09_24_02.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1695559726583951400.sql rename to data/sql/updates/db_world/2023_09_24_02.sql index 58555e35f23950..a58cd048f6d960 100644 --- a/data/sql/updates/pending_db_world/rev_1695559726583951400.sql +++ b/data/sql/updates/db_world/2023_09_24_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_24_01 -> 2023_09_24_02 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 41621) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 23487) AND (`ConditionValue3` = 0); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From f2e289ea070e9f3d2d69cd8f8c383a2762cfc903 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Mon, 25 Sep 2023 05:55:24 +0200 Subject: [PATCH 090/340] fix(DB/GameObject): fix Malchezaar door being selectable (#16275) initial --- .../pending_db_world/make_malchezaar_door_not_interactable.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql diff --git a/data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql b/data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql new file mode 100644 index 00000000000000..54d9779968f1c0 --- /dev/null +++ b/data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql @@ -0,0 +1,3 @@ +-- +-- fix Malchezaar event door not being interactable with players +UPDATE `gameobject_template_addon` SET `flags` = `flags`|16 WHERE `entry` = 185134; From 07b106e4ab2065059eb2d4e415410f993cdad6b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 03:56:32 +0000 Subject: [PATCH 091/340] chore(DB): import pending files Referenced commit(s): f2e289ea070e9f3d2d69cd8f8c383a2762cfc903 --- .../2023_09_25_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/make_malchezaar_door_not_interactable.sql => db_world/2023_09_25_00.sql} (77%) diff --git a/data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql b/data/sql/updates/db_world/2023_09_25_00.sql similarity index 77% rename from data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql rename to data/sql/updates/db_world/2023_09_25_00.sql index 54d9779968f1c0..69afe7231de365 100644 --- a/data/sql/updates/pending_db_world/make_malchezaar_door_not_interactable.sql +++ b/data/sql/updates/db_world/2023_09_25_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_24_02 -> 2023_09_25_00 -- -- fix Malchezaar event door not being interactable with players UPDATE `gameobject_template_addon` SET `flags` = `flags`|16 WHERE `entry` = 185134; From 13284125011d725637b1e25a2e3afe746136b763 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:09:00 -0300 Subject: [PATCH 092/340] fix(Scripts/Commands): Fix list creature string output (#17351) --- src/server/scripts/Commands/cs_list.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index a260a786311544..6a64ba68f24afb 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -126,7 +126,7 @@ class list_commandscript : public CommandScript for (std::unordered_multimap::const_iterator itr = creBounds.first; itr != creBounds.second;) { if (handler->GetSession()) - handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " "); + handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " "); else handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " "); ++itr; @@ -138,7 +138,7 @@ class list_commandscript : public CommandScript if (!liveFound) { if (handler->GetSession()) - handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, cInfo->Name.c_str(), x, y, z, mapId, "", ""); + handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, "", ""); else handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, "", ""); } From cc60bc0c353573f8b3d5b3d8024407f80912f24f Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:10:23 -0300 Subject: [PATCH 093/340] =?UTF-8?q?fix(Scripts/Spells):=20Fix=20Healing=20?= =?UTF-8?q?&=20Mana=20injectors=20not=20giving=20bonus=20to=E2=80=A6=20(#1?= =?UTF-8?q?7348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/Spells): Fix Healing & Mana injectors not giving bonus to engineers * Update SpellEffects.cpp * Update spell_item.cpp --- .../rev_1695609935652952000.sql | 7 ++++ src/server/game/Spells/SpellEffects.cpp | 7 ---- src/server/scripts/Spells/spell_item.cpp | 35 ++++++++++++++++--- 3 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695609935652952000.sql diff --git a/data/sql/updates/pending_db_world/rev_1695609935652952000.sql b/data/sql/updates/pending_db_world/rev_1695609935652952000.sql new file mode 100644 index 00000000000000..9ac4d6392477ef --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695609935652952000.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` IN (67486, 67489, 67487, 67490); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(67486, 'spell_item_healing_injector'), +(67489, 'spell_item_healing_injector'), +(67487, 'spell_item_mana_injector'), +(67490, 'spell_item_mana_injector'); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 91a6fc8041bb46..ea793ce8ae277b 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1930,13 +1930,6 @@ void Spell::EffectEnergize(SpellEffIndex effIndex) case 48542: // Revitalize damage = int32(CalculatePct(unitTarget->GetMaxPower(power), damage)); break; - case 67490: // Runic Mana Injector (mana gain increased by 25% for engineers - 3.2.0 patch change) - { - if (Player* player = m_caster->ToPlayer()) - if (player->HasSkill(SKILL_ENGINEERING)) - AddPct(damage, 25); - break; - } case 71132: // Glyph of Shadow Word: Pain damage = int32(CalculatePct(unitTarget->GetCreateMana(), 1)); // set 1 as value, missing in dbc break; diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index a1cc175c881eca..17d9156e980a4d 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3342,9 +3342,9 @@ class spell_item_rocket_boots : public SpellScript } }; -class spell_item_runic_healing_injector : public SpellScript +class spell_item_healing_injector : public SpellScript { - PrepareSpellScript(spell_item_runic_healing_injector); + PrepareSpellScript(spell_item_healing_injector); bool Load() override { @@ -3360,7 +3360,33 @@ class spell_item_runic_healing_injector : public SpellScript void Register() override { - OnEffectHitTarget += SpellEffectFn(spell_item_runic_healing_injector::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL); + OnEffectHitTarget += SpellEffectFn(spell_item_healing_injector::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL); + } +}; + +class spell_item_mana_injector : public SpellScript +{ + PrepareSpellScript(spell_item_mana_injector); + + bool Load() override + { + return GetCaster()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleEnergize(SpellEffIndex /*effIndex*/) + { + if (Player* caster = GetCaster()->ToPlayer()) + { + if (caster->HasSkill(SKILL_ENGINEERING)) + { + SetEffectValue(GetEffectValue() * 1.25f); + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_item_mana_injector::HandleEnergize, EFFECT_0, SPELL_EFFECT_ENERGIZE); } }; @@ -3959,7 +3985,8 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_nitro_boots); RegisterSpellScript(spell_item_teach_language); RegisterSpellScript(spell_item_rocket_boots); - RegisterSpellScript(spell_item_runic_healing_injector); + RegisterSpellScript(spell_item_healing_injector); + RegisterSpellScript(spell_item_mana_injector); RegisterSpellScript(spell_item_pygmy_oil); RegisterSpellScript(spell_item_unusual_compass); RegisterSpellScript(spell_item_chicken_cover); From 13a9de1083e289ed58aece466c1da4addb974f73 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:10:56 -0300 Subject: [PATCH 094/340] refactor(Scripts/GruulsLair): Clean up instance script (#17347) --- .../GruulsLair/instance_gruuls_lair.cpp | 66 ++++--------------- 1 file changed, 12 insertions(+), 54 deletions(-) diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index 5fbfadbcb4ca15..a826f8857e869b 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -26,6 +26,12 @@ DoorData const doorData[] = { 0, 0, DOOR_TYPE_ROOM } // END }; +ObjectData const creatureData[] = +{ + { NPC_MAULGAR, DATA_MAULGAR }, + { 0, 0 } +}; + MinionData const minionData[] = { { NPC_MAULGAR, DATA_MAULGAR }, @@ -46,64 +52,13 @@ class instance_gruuls_lair : public InstanceMapScript { SetHeaders(DataHeader); SetBossNumber(MAX_ENCOUNTER); + LoadObjectData(creatureData, nullptr); LoadDoorData(doorData); LoadMinionData(minionData); _addsKilled = 0; } - void OnCreatureCreate(Creature* creature) override - { - switch (creature->GetEntry()) - { - case NPC_MAULGAR: - _maulgarGUID = creature->GetGUID(); - [[fallthrough]]; - case NPC_KROSH_FIREHAND: - case NPC_OLM_THE_SUMMONER: - case NPC_KIGGLER_THE_CRAZED: - case NPC_BLINDEYE_THE_SEER: - AddMinion(creature, true); - break; - } - } - - void OnCreatureRemove(Creature* creature) override - { - switch (creature->GetEntry()) - { - case NPC_MAULGAR: - case NPC_KROSH_FIREHAND: - case NPC_OLM_THE_SUMMONER: - case NPC_KIGGLER_THE_CRAZED: - case NPC_BLINDEYE_THE_SEER: - AddMinion(creature, false); - break; - } - } - - void OnGameObjectCreate(GameObject* go) override - { - switch (go->GetEntry()) - { - case GO_MAULGAR_DOOR: - case GO_GRUUL_DOOR: - AddDoor(go, true); - break; - } - } - - void OnGameObjectRemove(GameObject* go) override - { - switch (go->GetEntry()) - { - case GO_MAULGAR_DOOR: - case GO_GRUUL_DOOR: - AddDoor(go, false); - break; - } - } - bool SetBossState(uint32 id, EncounterState state) override { if (!InstanceScript::SetBossState(id, state)) @@ -117,8 +72,12 @@ class instance_gruuls_lair : public InstanceMapScript void SetData(uint32 type, uint32 /*id*/) override { if (type == DATA_ADDS_KILLED) - if (Creature* maulgar = instance->GetCreature(_maulgarGUID)) + { + if (Creature* maulgar = GetCreature(DATA_MAULGAR)) + { maulgar->AI()->DoAction(++_addsKilled); + } + } } uint32 GetData(uint32 type) const override @@ -130,7 +89,6 @@ class instance_gruuls_lair : public InstanceMapScript protected: uint32 _addsKilled; - ObjectGuid _maulgarGUID; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override From f0c4ab3c959e54b0f83403e934405f769fda671d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:11:12 -0300 Subject: [PATCH 095/340] refactor(Scripts/MagistersTerrace): Clean up instance script (#17346) --- .../boss_felblood_kaelthas.cpp | 11 +- .../boss_priestess_delrissa.cpp | 8 +- .../MagistersTerrace/boss_selin_fireheart.cpp | 6 +- .../MagistersTerrace/boss_vexallus.cpp | 6 +- .../instance_magisters_terrace.cpp | 136 +++--------------- .../MagistersTerrace/magisters_terrace.h | 11 +- 6 files changed, 44 insertions(+), 134 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 333ef040fc1798..182b4588b4d7dd 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -105,7 +105,7 @@ class boss_felblood_kaelthas : public CreatureScript events.Reset(); summons.DespawnAll(); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false); - instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); + instance->SetBossState(DATA_KAELTHAS, NOT_STARTED); me->SetImmuneToAll(false); } @@ -125,12 +125,17 @@ class boss_felblood_kaelthas : public CreatureScript void JustDied(Unit*) override { - instance->SetData(DATA_KAELTHAS_EVENT, DONE); + instance->SetBossState(DATA_KAELTHAS, DONE); + + if (GameObject* orb = instance->GetGameObject(DATA_ESCAPE_ORB)) + { + orb->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + } } void JustEngagedWith(Unit* /*who*/) override { - instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_KAELTHAS, IN_PROGRESS); me->SetInCombatWithZone(); events.ScheduleEvent(EVENT_SPELL_FIREBALL, 0); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index f15de20a89f624..f47af976e77176 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -105,7 +105,7 @@ class boss_priestess_delrissa : public CreatureScript { PlayersKilled = SAY_PLAYER_KILLED; HelpersKilled = SAY_HELPER_DIED; - instance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED); + instance->SetBossState(DATA_DELRISSA, NOT_STARTED); summons.Respawn(); me->SetLootMode(0); @@ -141,7 +141,7 @@ class boss_priestess_delrissa : public CreatureScript { me->loot.clear(); me->loot.FillLoot(me->GetCreatureTemplate()->lootid, LootTemplates_Creature, me->GetLootRecipient(), false, false, 1, me); - instance->SetData(DATA_DELRISSA_EVENT, DONE); + instance->SetBossState(DATA_DELRISSA, DONE); me->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE); } ++HelpersKilled; @@ -151,7 +151,7 @@ class boss_priestess_delrissa : public CreatureScript { Talk(SAY_AGGRO); summons.DoZoneInCombat(); - instance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_DELRISSA, IN_PROGRESS); events.ScheduleEvent(EVENT_SPELL_FLASH_HEAL, 15000); events.ScheduleEvent(EVENT_SPELL_RENEW, 10000); @@ -177,7 +177,7 @@ class boss_priestess_delrissa : public CreatureScript Talk(SAY_DEATH); if (HelpersKilled == MAX_ACTIVE_HELPERS + 1) - instance->SetData(DATA_DELRISSA_EVENT, DONE); + instance->SetBossState(DATA_DELRISSA, DONE); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index d14c9ff3e4e794..2c14c0fba4b7c0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -106,7 +106,7 @@ class boss_selin_fireheart : public CreatureScript events.Reset(); summons.DespawnAll(); SpawnCrystals(); - instance->SetData(DATA_SELIN_EVENT, NOT_STARTED); + instance->SetBossState(DATA_SELIN_FIREHEART, NOT_STARTED); CrystalGUID.Clear(); me->SetPower(POWER_MANA, 0); } @@ -114,7 +114,7 @@ class boss_selin_fireheart : public CreatureScript void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); - instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_SELIN_FIREHEART, IN_PROGRESS); events.ScheduleEvent(EVENT_SPELL_DRAIN_LIFE, 2500, 1); events.ScheduleEvent(EVENT_SPELL_FEL_EXPLOSION, 2000); @@ -134,7 +134,7 @@ class boss_selin_fireheart : public CreatureScript { Talk(SAY_DEATH); - instance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete! + instance->SetBossState(DATA_SELIN_FIREHEART, DONE); // Encounter complete! summons.DespawnAll(); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 574afed7d025f6..f550b955447689 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -87,7 +87,7 @@ class boss_vexallus : public CreatureScript summons.DespawnAll(); IntervalHealthAmount = 1; - instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); + instance->SetBossState(DATA_VEXALLUS, NOT_STARTED); instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_ENERGY_FEEDBACK); } @@ -100,14 +100,14 @@ class boss_vexallus : public CreatureScript void JustDied(Unit* /*killer*/) override { summons.DespawnAll(); - instance->SetData(DATA_VEXALLUS_EVENT, DONE); + instance->SetBossState(DATA_VEXALLUS, DONE); instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_ENERGY_FEEDBACK); } void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); - instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_VEXALLUS, IN_PROGRESS); events.ScheduleEvent(EVENT_SPELL_CHAIN_LIGHTNING, 8000); events.ScheduleEvent(EVENT_SPELL_ARCANE_SHOCK, 5000); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 315a7df1863002..bf73f90954c855 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -26,6 +26,21 @@ ObjectData const creatureData[] = { 0, 0 } }; +ObjectData const gameobjectData[] = +{ + { GO_ESCAPE_ORB, DATA_ESCAPE_ORB }, + { 0, 0, } +}; + +DoorData const doorData[] = +{ + { GO_SELIN_DOOR, DATA_SELIN_FIREHEART, DOOR_TYPE_PASSAGE }, + { GO_SELIN_ENCOUNTER_DOOR, DATA_SELIN_FIREHEART, DOOR_TYPE_ROOM }, + { GO_VEXALLUS_DOOR, DATA_VEXALLUS, DOOR_TYPE_PASSAGE }, + { GO_DELRISSA_DOOR, DATA_DELRISSA, DOOR_TYPE_PASSAGE }, + { 0, 0, DOOR_TYPE_ROOM } // END +}; + Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f }; class instance_magisters_terrace : public InstanceMapScript @@ -38,47 +53,16 @@ class instance_magisters_terrace : public InstanceMapScript instance_magisters_terrace_InstanceMapScript(Map* map) : InstanceScript(map) { SetHeaders(DataHeader); - LoadObjectData(creatureData, nullptr); + SetBossNumber(MAX_ENCOUNTER); + LoadObjectData(creatureData, gameobjectData); + LoadDoorData(doorData); } - uint32 Encounter[MAX_ENCOUNTER]; - - ObjectGuid VexallusDoorGUID; - ObjectGuid SelinDoorGUID; - ObjectGuid SelinEncounterDoorGUID; - ObjectGuid DelrissaDoorGUID; - ObjectGuid KaelDoorGUID; ObjectGuid EscapeOrbGUID; ObjectGuid DelrissaGUID; ObjectGuid KaelGUID; - void Initialize() override - { - memset(&Encounter, 0, sizeof(Encounter)); - } - - bool IsEncounterInProgress() const override - { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (Encounter[i] == IN_PROGRESS) - return true; - return false; - } - - uint32 GetData(uint32 identifier) const override - { - switch (identifier) - { - case DATA_SELIN_EVENT: - case DATA_VEXALLUS_EVENT: - case DATA_DELRISSA_EVENT: - case DATA_KAELTHAS_EVENT: - return Encounter[identifier]; - } - return 0; - } - void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) override { if (eventId == EVENT_SPAWN_KALECGOS) @@ -97,37 +81,6 @@ class instance_magisters_terrace : public InstanceMapScript } } - void SetData(uint32 identifier, uint32 data) override - { - switch (identifier) - { - case DATA_SELIN_EVENT: - HandleGameObject(SelinDoorGUID, data == DONE); - HandleGameObject(SelinEncounterDoorGUID, data != IN_PROGRESS); - Encounter[identifier] = data; - break; - case DATA_VEXALLUS_EVENT: - if (data == DONE) - HandleGameObject(VexallusDoorGUID, true); - Encounter[identifier] = data; - break; - case DATA_DELRISSA_EVENT: - if (data == DONE) - HandleGameObject(DelrissaDoorGUID, true); - Encounter[identifier] = data; - break; - case DATA_KAELTHAS_EVENT: - HandleGameObject(KaelDoorGUID, data != IN_PROGRESS); - if (data == DONE) - if (GameObject* escapeOrb = instance->GetGameObject(EscapeOrbGUID)) - escapeOrb->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); - Encounter[identifier] = data; - break; - } - - SaveToDB(); - } - void OnCreatureCreate(Creature* creature) override { switch (creature->GetEntry()) @@ -148,60 +101,11 @@ class instance_magisters_terrace : public InstanceMapScript InstanceScript::OnCreatureCreate(creature); } - void OnGameObjectCreate(GameObject* go) override - { - switch (go->GetEntry()) - { - case GO_SELIN_DOOR: - if (GetData(DATA_SELIN_EVENT) == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - SelinDoorGUID = go->GetGUID(); - break; - case GO_SELIN_ENCOUNTER_DOOR: - SelinEncounterDoorGUID = go->GetGUID(); - break; - - case GO_VEXALLUS_DOOR: - if (GetData(DATA_VEXALLUS_EVENT) == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - VexallusDoorGUID = go->GetGUID(); - break; - - case GO_DELRISSA_DOOR: - if (GetData(DATA_DELRISSA_EVENT) == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - DelrissaDoorGUID = go->GetGUID(); - break; - case GO_KAEL_DOOR: - KaelDoorGUID = go->GetGUID(); - break; - case GO_ESCAPE_ORB: - if (GetData(DATA_KAELTHAS_EVENT) == DONE) - go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); - EscapeOrbGUID = go->GetGUID(); - break; - } - } - - // @todo: Use BossStates. This is for code compatibility - void ReadSaveDataMore(std::istringstream& data) override - { - data >> Encounter[1]; - data >> Encounter[2]; - data >> Encounter[3]; - } - - void WriteSaveDataMore(std::ostringstream& data) override - { - data << Encounter[0] << ' ' << Encounter[1] << ' ' << Encounter[2] << ' ' << Encounter[3]; - } - ObjectGuid GetGuidData(uint32 identifier) const override { - switch (identifier) + if (identifier == NPC_DELRISSA) { - case NPC_DELRISSA: - return DelrissaGUID; + return DelrissaGUID; } return ObjectGuid::Empty; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index d265866cd7a0c2..e985711ac913f4 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -28,13 +28,14 @@ enum MTData { - DATA_SELIN_EVENT = 0, - DATA_VEXALLUS_EVENT = 1, - DATA_DELRISSA_EVENT = 2, - DATA_KAELTHAS_EVENT = 3, + DATA_SELIN_FIREHEART = 0, + DATA_VEXALLUS = 1, + DATA_DELRISSA = 2, + DATA_KAELTHAS = 3, MAX_ENCOUNTER = 4, - DATA_KALECGOS = 5 + DATA_KALECGOS = 5, + DATA_ESCAPE_ORB = 6 }; enum MTCreatures From 6d1517f5e5a881b4cf66d43f3fbfda5ccbf352f8 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:11:27 -0300 Subject: [PATCH 096/340] fix(Scripts/Karazhan): Make Chess door non interactable (#17349) Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1695611850243926000.sql | 2 ++ .../scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695611850243926000.sql diff --git a/data/sql/updates/pending_db_world/rev_1695611850243926000.sql b/data/sql/updates/pending_db_world/rev_1695611850243926000.sql new file mode 100644 index 00000000000000..2ff53bd4606ed1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695611850243926000.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gameobject_template_addon` SET `faction` = 1375, `flags` = 32 WHERE (`entry` = 184277); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index f8568de6cbd40b..c344f96c58c334 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -240,6 +240,9 @@ class instance_karazhan : public InstanceMapScript } } break; + case DONE: + HandleGameObject(m_uiGamesmansExitDoor, true); + break; } default: DoRemoveAurasDueToSpellOnPlayers(SPELL_GAME_IN_SESSION); From ebe887c5ba5b126dc1c37e40b7c900680ec6971b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 09:11:45 +0000 Subject: [PATCH 097/340] chore(DB): import pending files Referenced commit(s): cc60bc0c353573f8b3d5b3d8024407f80912f24f --- .../rev_1695609935652952000.sql => db_world/2023_09_25_01.sql} | 1 + .../rev_1695611850243926000.sql => db_world/2023_09_25_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1695609935652952000.sql => db_world/2023_09_25_01.sql} (87%) rename data/sql/updates/{pending_db_world/rev_1695611850243926000.sql => db_world/2023_09_25_02.sql} (69%) diff --git a/data/sql/updates/pending_db_world/rev_1695609935652952000.sql b/data/sql/updates/db_world/2023_09_25_01.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1695609935652952000.sql rename to data/sql/updates/db_world/2023_09_25_01.sql index 9ac4d6392477ef..ef08575726355f 100644 --- a/data/sql/updates/pending_db_world/rev_1695609935652952000.sql +++ b/data/sql/updates/db_world/2023_09_25_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_00 -> 2023_09_25_01 -- DELETE FROM `spell_script_names` WHERE `spell_id` IN (67486, 67489, 67487, 67490); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1695611850243926000.sql b/data/sql/updates/db_world/2023_09_25_02.sql similarity index 69% rename from data/sql/updates/pending_db_world/rev_1695611850243926000.sql rename to data/sql/updates/db_world/2023_09_25_02.sql index 2ff53bd4606ed1..2659f7d8d04c89 100644 --- a/data/sql/updates/pending_db_world/rev_1695611850243926000.sql +++ b/data/sql/updates/db_world/2023_09_25_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_25_01 -> 2023_09_25_02 -- UPDATE `gameobject_template_addon` SET `faction` = 1375, `flags` = 32 WHERE (`entry` = 184277); From 84d4d60cfcc2d97cf09aba55668e2ff5d81eef36 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:38:01 -0300 Subject: [PATCH 098/340] fix(Scripts/Karazhan): Fix Julliane awarding no loot (#17334) * fix(Scripts/Karazhan): Fix Julliene awarding no loot * Update bosses_opera.cpp --- src/server/game/Entities/Creature/Creature.h | 1 + .../EasternKingdoms/Karazhan/bosses_opera.cpp | 257 ++++-------------- .../Karazhan/instance_karazhan.cpp | 36 +++ .../EasternKingdoms/Karazhan/karazhan.h | 8 + 4 files changed, 105 insertions(+), 197 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 903ae70994e783..c7c3102a1167a9 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -366,6 +366,7 @@ class Creature : public Unit, public GridObject, public MovableMapObje // Handling caster facing during spellcast void SetTarget(ObjectGuid guid = ObjectGuid::Empty) override; + void ClearTarget() { SetTarget(); }; void FocusTarget(Spell const* focusSpell, WorldObject const* target); void ReleaseFocus(Spell const* focusSpell); [[nodiscard]] bool IsMovementPreventedByCasting() const override; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 24fb4e99166bb9..1c037f381f6952 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -947,7 +947,7 @@ enum JulianneRomulo SAY_ROMULO_AGGRO = 0, SAY_ROMULO_DEATH = 1, - SAY_ROMULO_ENTER = 2, + SAY_ROMULO_DEATH2 = 2, SAY_ROMULO_RESURRECT = 3, SAY_ROMULO_SLAY = 4, @@ -985,12 +985,10 @@ enum RAJGroups enum RAJActions { - ACTION_DIED_ANNOUNCE = 0, - ACTION_PHASE_SET = 1, ACTION_FAKING_DEATH = 2, ACTION_COMBAT_SCHEDULE = 3, - ACTION_DO_RESURRECT = 4, - ACTION_EARLY_REVIVE = 5, + //ACTION_DO_RESURRECT = 4, + //ACTION_RESS_ROMULO = 5, ACTION_CANCEL_COMBAT = 6 }; @@ -999,7 +997,6 @@ void PretendToDie(Creature* creature) creature->AI()->DoAction(ACTION_CANCEL_COMBAT); creature->InterruptNonMeleeSpells(true); creature->RemoveAllAuras(); - creature->SetHealth(0); creature->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); creature->SetReactState(REACT_PASSIVE); creature->GetMotionMaster()->MovementExpired(false); @@ -1032,14 +1029,6 @@ struct boss_julianne : public ScriptedAI isFakingDeath = false; } - InstanceScript* instance; - - uint32 phase; - - bool isFakingDeath; - bool summonedRomulo; - bool romuloDied; - void Reset() override { phase = PHASE_JULIANNE; @@ -1051,10 +1040,8 @@ struct boss_julianne : public ScriptedAI } summonedRomulo = false; - romuloDied = false; me->SetImmuneToPC(true); - //intro sequence _scheduler.Schedule(1s, [this](TaskContext) { Talk(SAY_JULIANNE_ENTER); @@ -1071,38 +1058,29 @@ struct boss_julianne : public ScriptedAI { switch(action) { - case ACTION_DIED_ANNOUNCE: - romuloDied = true; - break; - case ACTION_EARLY_REVIVE: - romuloDied = true; - _resurrectScheduler.Schedule(10s, [this](TaskContext) - { - Talk(SAY_JULIANNE_RESURRECT); - romuloDied = false; - }); - break; - case ACTION_PHASE_SET: - phase = PHASE_BOTH; - isFakingDeath = false; - break; case ACTION_FAKING_DEATH: isFakingDeath = false; break; case ACTION_COMBAT_SCHEDULE: ScheduleCombat(); break; - case ACTION_DO_RESURRECT: - _resurrectScheduler.Schedule(1s, [this](TaskContext) + case ACTION_RESS_ROMULO: + me->m_Events.AddEventAtOffset([this] { - if (Creature* Romulo = instance->GetCreature(DATA_ROMULO)) + if (Creature* romulo = instance->GetCreature(DATA_ROMULO)) { Talk(SAY_JULIANNE_RESURRECT); - Resurrect(Romulo); - Romulo->AI()->DoAction(ACTION_FAKING_DEATH); - romuloDied = false; + Resurrect(romulo); + romulo->AI()->DoAction(ACTION_FAKING_DEATH); + romulo->AI()->Talk(SAY_ROMULO_RESURRECT); } - }); + }, 1s); + break; + case ACTION_DO_RESURRECT: + phase = PHASE_BOTH; + isFakingDeath = false; + Resurrect(me); + me->ResumeChasingVictim(); break; case ACTION_CANCEL_COMBAT: _scheduler.CancelGroup(GROUP_COMBAT); @@ -1128,11 +1106,11 @@ struct boss_julianne : public ScriptedAI { if (urand(0, 1) && summonedRomulo) { - if (Creature* Romulo = instance->GetCreature(DATA_ROMULO)) + if (Creature* romulo = instance->GetCreature(DATA_ROMULO)) { - if (Romulo->IsAlive() && !romuloDied) + if (!romulo->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) { - DoCast(Romulo, SPELL_ETERNAL_AFFECTION); + DoCast(romulo, SPELL_ETERNAL_AFFECTION); } } } @@ -1149,22 +1127,6 @@ struct boss_julianne : public ScriptedAI ScheduleCombat(); } - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void JustReachedHome() override { me->DespawnOrUnsummon(); @@ -1183,10 +1145,9 @@ struct boss_julianne : public ScriptedAI phase = PHASE_ROMULO; _scheduler.Schedule(10s, GROUP_RP, [this](TaskContext) { - if (Creature* pRomulo = me->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR * 2 * IN_MILLISECONDS)) + if (Creature* romulo = me->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR * 2 * IN_MILLISECONDS)) { - pRomulo->AI()->DoAction(ACTION_PHASE_SET); - pRomulo->SetInCombatWithZone(); + romulo->SetInCombatWithZone(); } summonedRomulo = true; }); @@ -1201,13 +1162,12 @@ struct boss_julianne : public ScriptedAI return; } - //anything below only used if incoming damage will kill + damage = me->GetHealth() - 1; if (phase == PHASE_JULIANNE) { - damage = 0; + me->ClearTarget(); - //this means already drinking, so return if (isFakingDeath) { return; @@ -1222,50 +1182,12 @@ struct boss_julianne : public ScriptedAI return; } - if (phase == PHASE_ROMULO) + if (phase == PHASE_BOTH && !isFakingDeath) { - //LOG_ERROR("scripts", "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?"); - damage = 0; - return; - } - - if (phase == PHASE_BOTH) - { - //if this is true then we have to kill romulo too - if (romuloDied) - { - if (Creature* Romulo = instance->GetCreature(DATA_ROMULO)) - { - _scheduler.CancelAll(); - _resurrectScheduler.CancelAll(); - Romulo->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - Romulo->GetMotionMaster()->Clear(); - Romulo->setDeathState(JUST_DIED); - Romulo->CombatStop(true); - Romulo->GetThreatMgr().ClearAllThreat(); - Romulo->ReplaceAllDynamicFlags(UNIT_DYNFLAG_LOOTABLE); - //this does not seem to really work - the lootable dynamic flags - } - - return; - } - - //if not already returned, then romulo is alive and we can pretend die - if (Creature* Romulo = instance->GetCreature(DATA_ROMULO)) - { - PretendToDie(me); - isFakingDeath = true; - Romulo->AI()->DoAction(ACTION_EARLY_REVIVE); - _scheduler.Schedule(10050ms, [this](TaskContext) - { - Resurrect(me); - isFakingDeath = false; - }); - damage = 0; - return; - } + PretendToDie(me); + isFakingDeath = true; + instance->DoAction(ACTION_SCHEDULE_RAJ_CHECK); } - //LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen."); } void EnterEvadeMode(EvadeReason reason) override @@ -1286,15 +1208,17 @@ struct boss_julianne : public ScriptedAI instance->SetBossState(DATA_OPERA_PERFORMANCE, DONE); } - void KilledUnit(Unit* /*victim*/) override + void KilledUnit(Unit* victim) override { - Talk(SAY_JULIANNE_SLAY); + if (victim != me) + { + Talk(SAY_JULIANNE_SLAY); + } } void UpdateAI(uint32 diff) override { _scheduler.Update(diff); - _resurrectScheduler.Update(diff); if (!UpdateVictim()) { @@ -1307,50 +1231,30 @@ struct boss_julianne : public ScriptedAI } } private: + InstanceScript* instance; + uint32 phase; + bool isFakingDeath; + bool summonedRomulo; TaskScheduler _scheduler; - TaskScheduler _resurrectScheduler; }; struct boss_romulo : public ScriptedAI { boss_romulo(Creature* creature) : ScriptedAI(creature) { - instance = creature->GetInstanceScript(); //not necessary + instance = creature->GetInstanceScript(); } - InstanceScript* instance; - - uint32 phase; - - bool isFakingDeath; - bool julianneDead; - void Reset() override { phase = PHASE_ROMULO; - isFakingDeath = false; - julianneDead = false; } void DoAction(int32 action) override { switch(action) { - case ACTION_DIED_ANNOUNCE: - julianneDead = true; - break; - case ACTION_EARLY_REVIVE: - julianneDead = true; - _resurrectScheduler.Schedule(10s, [this](TaskContext) - { - Talk(SAY_ROMULO_RESURRECT); - julianneDead = false; - }); - break; - case ACTION_PHASE_SET: - phase = PHASE_ROMULO; - break; case ACTION_FAKING_DEATH: isFakingDeath = false; break; @@ -1375,9 +1279,11 @@ struct boss_romulo : public ScriptedAI void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override { if (damage < me->GetHealth()) + { return; + } - //anything below only used if incoming damage will kill + damage = me->GetHealth() - 1; if (phase == PHASE_ROMULO) { @@ -1386,63 +1292,24 @@ struct boss_romulo : public ScriptedAI isFakingDeath = true; phase = PHASE_BOTH; - if (Creature* Julianne = instance->GetCreature(DATA_JULIANNE)) + me->m_Events.AddEventAtOffset([this] { - Julianne->AI()->DoAction(ACTION_DIED_ANNOUNCE); - //resurrect julianne - _scheduler.Schedule(10s, GROUP_RP, [this](TaskContext) + Resurrect(me); + isFakingDeath = false; + if (Creature* julliane = instance->GetCreature(DATA_JULIANNE)) { - if (Creature* Julianne = instance->GetCreature(DATA_JULIANNE)) - { - Resurrect(Julianne); - Julianne->AI()->DoAction(ACTION_PHASE_SET); - Julianne->AI()->DoAction(ACTION_DO_RESURRECT); - if (Julianne->GetVictim()) - { - AttackStart(Julianne->GetVictim()); - } - } - }); - } - - damage = 0; - return; + julliane->AI()->DoAction(ACTION_DO_RESURRECT); + } + }, 3s); } - if (phase == PHASE_BOTH) + if (phase == PHASE_BOTH && !isFakingDeath) { - if (julianneDead) - { - if (Creature* Julianne = instance->GetCreature(DATA_JULIANNE)) - { - _scheduler.CancelAll(); - _resurrectScheduler.CancelAll(); - Julianne->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - Julianne->GetMotionMaster()->Clear(); - Julianne->setDeathState(JUST_DIED); - Julianne->CombatStop(true); - Julianne->GetThreatMgr().ClearAllThreat(); - Julianne->ReplaceAllDynamicFlags(UNIT_DYNFLAG_LOOTABLE); - //this does not seem to really work - } - return; - } - - if (Creature* Julianne = instance->GetCreature(DATA_JULIANNE)) - { - PretendToDie(me); - isFakingDeath = true; - Julianne->AI()->DoAction(ACTION_EARLY_REVIVE); - _scheduler.Schedule(10050ms, [this](TaskContext) - { - Resurrect(me); - isFakingDeath = false; - }); - damage = 0; - return; - } + Talk(SAY_ROMULO_DEATH2); + PretendToDie(me); + instance->DoAction(ACTION_SCHEDULE_RAJ_CHECK); + isFakingDeath = true; } - //LOG_ERROR("scripts", "boss_romuloAI: DamageTaken reach end of code, that should not happen."); } void ScheduleCombat() @@ -1488,14 +1355,6 @@ struct boss_romulo : public ScriptedAI ScheduleCombat(); } - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -1510,15 +1369,17 @@ struct boss_romulo : public ScriptedAI instance->SetBossState(DATA_OPERA_PERFORMANCE, DONE); } - void KilledUnit(Unit* /*victim*/) override + void KilledUnit(Unit* victim) override { - Talk(SAY_ROMULO_SLAY); + if (victim != me) + { + Talk(SAY_ROMULO_SLAY); + } } void UpdateAI(uint32 diff) override { _scheduler.Update(diff); - _resurrectScheduler.Update(diff); if (!UpdateVictim()) { @@ -1531,8 +1392,10 @@ struct boss_romulo : public ScriptedAI } } private: + InstanceScript* instance; + uint32 phase; + bool isFakingDeath; TaskScheduler _scheduler; - TaskScheduler _resurrectScheduler; }; void AddSC_bosses_opera() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index c344f96c58c334..0fe84199bd3d54 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -421,6 +421,42 @@ class instance_karazhan : public InstanceMapScript return 0; } + void DoAction(int32 actionId) override + { + if (actionId == ACTION_SCHEDULE_RAJ_CHECK) + { + scheduler.Schedule(10s, [this](TaskContext) + { + Creature* julliane = GetCreature(DATA_JULIANNE); + Creature* romulo = GetCreature(DATA_ROMULO); + + if (julliane && romulo) + { + if (julliane->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) + && romulo->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) + { + julliane->KillSelf(); + julliane->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + romulo->KillSelf(); + romulo->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + } + else + { + if (romulo->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) + { + julliane->AI()->DoAction(ACTION_RESS_ROMULO); + } + + if (julliane->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) + { + julliane->AI()->DoAction(ACTION_DO_RESURRECT); + } + } + } + }); + } + } + ObjectGuid GetGuidData(uint32 data) const override { switch (data) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index 274a5f1f390560..7dbdbdb91d3035 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -204,6 +204,14 @@ enum KarazhanChessGameFactions CHESS_FACTION_BOTH = 536 }; +enum InstanceActions +{ + ACTION_SCHEDULE_RAJ_CHECK, + + ACTION_DO_RESURRECT = 4, + ACTION_RESS_ROMULO = 5, +}; + template inline AI* GetKarazhanAI(T* obj) { From 4a0b879ee3ff6fd7318577f8b36b2eaf91ad59c3 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:41:21 -0300 Subject: [PATCH 099/340] =?UTF-8?q?fix(Scripts/Karazhan):=20Fix=20Shade=20?= =?UTF-8?q?of=20Aran=20Blizzard=20and=20use=20proper=20spel=E2=80=A6=20(#1?= =?UTF-8?q?7329)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/Karazhan): Fix Shade of Aran Blizzard and use proper spells to summon elementals * Update boss_shade_of_aran.cpp * Update boss_shade_of_aran.cpp * Update rev_1695546719351253200.sql * missing sql --- .../rev_1695546719351253200.sql | 40 ++++++++ .../game/Spells/SpellInfoCorrections.cpp | 6 ++ .../Karazhan/boss_shade_of_aran.cpp | 98 +++++++++---------- 3 files changed, 93 insertions(+), 51 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695546719351253200.sql diff --git a/data/sql/updates/pending_db_world/rev_1695546719351253200.sql b/data/sql/updates/pending_db_world/rev_1695546719351253200.sql new file mode 100644 index 00000000000000..6602a00cdfd3e6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695546719351253200.sql @@ -0,0 +1,40 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (29962, 37051, 37052, 37053, 29969)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 29962, 0, 0, 31, 0, 3, 17172, 0, 0, 0, 0, '', 'Summon Water Elementals (29962) can only target Shade of Aran Teleport NE (17172)'), +(13, 1, 37051, 0, 0, 31, 0, 3, 17175, 0, 0, 0, 0, '', 'Summon Water Elementals (37051) can only target Shade of Aran Teleport NW (17175)'), +(13, 1, 37052, 0, 0, 31, 0, 3, 17174, 0, 0, 0, 0, '', 'Summon Water Elementals (37052) can only target Shade of Aran Teleport SW (17174)'), +(13, 1, 37053, 0, 0, 31, 0, 3, 17173, 0, 0, 0, 0, '', 'Summon Water Elementals (37053) can only target Shade of Aran Teleport SE (17173)'), +(13, 1, 29969, 0, 0, 31, 0, 3, 17161, 0, 0, 0, 0, '', 'Summon Blizzard (29969) can only target Blizzard (Shade of Aran) (17161)'); + +SET @NPC := 135127; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-11179.069,`position_y`=-1903.9922,`position_z`=231.99551 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-11179.069,-1903.9922,231.99551,NULL,0,0,0,100,0), +(@PATH,2,-11175.637,-1898.6766,231.99551,NULL,0,0,0,100,0), +(@PATH,3,-11170.077,-1896.4208,231.99551,NULL,0,0,0,100,0), +(@PATH,4,-11163.756,-1896.4015,231.99551,NULL,0,0,0,100,0), +(@PATH,5,-11157.39,-1897.875,231.99551,NULL,0,0,0,100,0), +(@PATH,6,-11152.051,-1901.6866,231.99551,NULL,0,0,0,100,0), +(@PATH,7,-11148.58,-1906.875,231.99551,NULL,0,0,0,100,0), +(@PATH,8,-11148.341,-1914.24,231.99551,NULL,0,0,0,100,0), +(@PATH,9,-11149.94,-1919.9163,231.99551,NULL,0,0,0,100,0), +(@PATH,10,-11154.768,-1924.6886,231.99551,NULL,0,0,0,100,0), +(@PATH,11,-11160.866,-1927.3403,231.99551,NULL,0,0,0,100,0), +(@PATH,12,-11166.848,-1927.012,231.99551,NULL,0,0,0,100,0), +(@PATH,13,-11173.295,-1925.4417,231.99551,NULL,0,0,0,100,0), +(@PATH,14,-11178.082,-1922.4479,231.99551,NULL,0,0,0,100,0), +(@PATH,15,-11180.802,-1915.3156,231.99551,NULL,0,0,0,100,0), +(@PATH,16,-11181.109,-1909.6647,231.99551,NULL,0,0,0,100,0); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17161; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17161) AND (`source_type` = 0) AND (`id` IN (0, 1, 2)); +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 +(17161, 0, 0, 0, 8, 0, 100, 0, 29969, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blizzard (Shade of Aran) - On Spellhit \'Summon Blizzard\' - Set Event Phase 1'), +(17161, 0, 1, 0, 60, 1, 100, 0, 1000, 1000, 2000, 2000, 0, 11, 29951, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blizzard (Shade of Aran) - On Update - Cast \'Blizzard\' (Phase 1)'), +(17161, 0, 2, 0, 60, 1, 100, 0, 20000, 20000, 20000, 20000, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blizzard (Shade of Aran) - On Update - Set Event Phase 0 (Phase 1)'); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index d55a5505d78adb..18aaac71a4de3e 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4574,6 +4574,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->ProcChance = 3; }); + // Summon Water Elementals + ApplySpellFix({ 29962, 37051, 37052, 37053 }, [](SpellInfo* spellInfo) + { + spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 61f4538b2fc8f8..fa75f1d3d207df 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -22,45 +22,52 @@ #include "karazhan.h" #include "TaskScheduler.h" -enum ShadeOfAran +enum Texts { - SAY_AGGRO = 0, + SAY_AGGRO = 0, SAY_FLAMEWREATH = 1, - SAY_BLIZZARD = 2, - SAY_EXPLOSION = 3, - SAY_DRINK = 4, - SAY_ELEMENTALS = 5, - SAY_KILL = 6, - SAY_TIMEOVER = 7, - SAY_DEATH = 8, + SAY_BLIZZARD = 2, + SAY_EXPLOSION = 3, + SAY_DRINK = 4, + SAY_ELEMENTALS = 5, + SAY_KILL = 6, + SAY_TIMEOVER = 7, + SAY_DEATH = 8 +}; +enum Spells +{ //Spells - SPELL_FROSTBOLT = 29954, - SPELL_FIREBALL = 29953, - SPELL_ARCMISSLE = 29955, - SPELL_CHAINSOFICE = 29991, - SPELL_DRAGONSBREATH = 29964, - SPELL_MASSSLOW = 30035, - SPELL_FLAME_WREATH = 29946, - SPELL_AOE_CS = 29961, - SPELL_PLAYERPULL = 32265, - SPELL_AEXPLOSION = 29973, - SPELL_MASS_POLY = 29963, - SPELL_BLINK_CENTER = 29967, - SPELL_ELEMENTALS = 29962, - SPELL_CONJURE = 29975, - SPELL_DRINK = 30024, - SPELL_POTION = 32453, - SPELL_AOE_PYROBLAST = 29978, - - //Creature Spells - SPELL_CIRCULAR_BLIZZARD = 29951, - SPELL_SHADOW_PYRO = 29978, - - //Creatures - NPC_WATER_ELEMENTAL = 17167, - NPC_SHADOW_OF_ARAN = 18254, - NPC_ARAN_BLIZZARD = 17161, + SPELL_FROSTBOLT = 29954, + SPELL_FIREBALL = 29953, + SPELL_ARCMISSLE = 29955, + SPELL_CHAINSOFICE = 29991, + SPELL_DRAGONSBREATH = 29964, + SPELL_MASSSLOW = 30035, + SPELL_FLAME_WREATH = 29946, + SPELL_AOE_CS = 29961, + SPELL_PLAYERPULL = 32265, + SPELL_AEXPLOSION = 29973, + SPELL_MASS_POLY = 29963, + SPELL_BLINK_CENTER = 29967, + SPELL_CONJURE = 29975, + SPELL_DRINK = 30024, + SPELL_POTION = 32453, + SPELL_AOE_PYROBLAST = 29978, + + SPELL_SUMMON_WELEMENTAL_1 = 29962, + SPELL_SUMMON_WELEMENTAL_2 = 37051, + SPELL_SUMMON_WELEMENTAL_3 = 37052, + SPELL_SUMMON_WELEMENTAL_4 = 37053, + + SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC + + SPELL_SHADOW_PYRO = 29978 +}; + +enum Creatures +{ + NPC_SHADOW_OF_ARAN = 18254 }; enum SuperSpell @@ -133,17 +140,11 @@ struct boss_shade_of_aran : public BossAI ScheduleHealthCheckEvent(40, [&]{ Talk(SAY_ELEMENTALS); - for(Position pos : elementalPos) + std::vector elementalSpells = { SPELL_SUMMON_WELEMENTAL_1, SPELL_SUMMON_WELEMENTAL_2, SPELL_SUMMON_WELEMENTAL_3, SPELL_SUMMON_WELEMENTAL_4 }; + + for (auto const& spell : elementalSpells) { - if(Creature* elemental = me->SummonCreature(NPC_WATER_ELEMENTAL, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000)) - { - if(Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true)) - { - DoStartNoMovement(target); - elemental->SetInCombatWithZone(); - elemental->CombatStart(target); - } - } + DoCastAOE(spell, true); } }); } @@ -341,12 +342,7 @@ struct boss_shade_of_aran : public BossAI case SUPER_BLIZZARD: Talk(SAY_BLIZZARD); - - if (Creature* pSpawn = me->SummonCreature(NPC_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000)) - { - pSpawn->SetFaction(me->GetFaction()); - pSpawn->CastSpell(me, SPELL_CIRCULAR_BLIZZARD, false); - } + DoCastAOE(SPELL_SUMMON_BLIZZARD); break; } } From 708bfb2c4884aa73f9447826a53efdb5cfd7cbd2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 09:42:28 +0000 Subject: [PATCH 100/340] chore(DB): import pending files Referenced commit(s): 4a0b879ee3ff6fd7318577f8b36b2eaf91ad59c3 --- .../rev_1695546719351253200.sql => db_world/2023_09_25_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695546719351253200.sql => db_world/2023_09_25_03.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1695546719351253200.sql b/data/sql/updates/db_world/2023_09_25_03.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1695546719351253200.sql rename to data/sql/updates/db_world/2023_09_25_03.sql index 6602a00cdfd3e6..9f8d0a39635dc8 100644 --- a/data/sql/updates/pending_db_world/rev_1695546719351253200.sql +++ b/data/sql/updates/db_world/2023_09_25_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_02 -> 2023_09_25_03 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (29962, 37051, 37052, 37053, 29969)); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 3c698f86af7fa248973dff052ca4b6929fa6f608 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:04:15 -0300 Subject: [PATCH 101/340] fix(DB/Text): Add missing Netherspite text emotes (#17335) * fix(DB/Text): Add missing Netherspite text emotes * fix emote order * Update boss_netherspite.cpp --- .../rev_1695579044772631700.sql | 5 +++ .../Karazhan/boss_netherspite.cpp | 43 ++++++++----------- 2 files changed, 22 insertions(+), 26 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695579044772631700.sql diff --git a/data/sql/updates/pending_db_world/rev_1695579044772631700.sql b/data/sql/updates/pending_db_world/rev_1695579044772631700.sql new file mode 100644 index 00000000000000..35244f0331980b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695579044772631700.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature_text` WHERE `CreatureId` = 15689; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(15689, 0, 0, '%s goes into a nether-fed rage!', 41, 0, 100, 19877, 3, 'Netherspite EMOTE_PHASE_BANISH'), +(15689, 1, 0, '%s cries out in withdrawal, opening gates to the nether.', 41, 0, 100, 19880, 3, 'Netherspite EMOTE_PHASE_PORTAL'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 46f16be9583bbb..f16654cfba7df9 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -24,8 +24,8 @@ enum Emotes { - EMOTE_PHASE_PORTAL = 0, - EMOTE_PHASE_BANISH = 1 + EMOTE_PHASE_BANISH = 0, + EMOTE_PHASE_PORTAL = 1 }; enum Spells @@ -101,7 +101,6 @@ struct boss_netherspite : public BossAI BossAI::Reset(); berserk = false; HandleDoors(true); - DestroyPortals(); } void SummonPortals() @@ -121,23 +120,6 @@ struct boss_netherspite : public BossAI } } - void DestroyPortals() - { - for (int i = 0; i < 3; ++i) - { - if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[i])) - { - portal->DisappearAndDie(); - } - if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i])) - { - portal->DisappearAndDie(); - } - PortalGUID[i].Clear(); - BeamTarget[i].Clear(); - } - } - void UpdatePortals() // Here we handle the beams' behavior { for (int j = 0; j < 3; ++j) // j = color @@ -203,8 +185,13 @@ struct boss_netherspite : public BossAI } } - void SwitchToPortalPhase() + void SwitchToPortalPhase(bool aggro = false) { + if (!aggro) + { + Talk(EMOTE_PHASE_PORTAL); + } + scheduler.CancelGroup(VANISH_PHASE); me->RemoveAurasDueToSpell(SPELL_BANISH_ROOT); me->RemoveAurasDueToSpell(SPELL_BANISH_VISUAL); @@ -230,17 +217,22 @@ struct boss_netherspite : public BossAI DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true); context.Repeat(15s); }); - Talk(EMOTE_PHASE_PORTAL); } void SwitchToBanishPhase() { + Talk(EMOTE_PHASE_BANISH); scheduler.CancelGroup(PORTAL_PHASE); me->RemoveAurasDueToSpell(SPELL_EMPOWERMENT); me->RemoveAurasDueToSpell(SPELL_NETHERBURN_AURA); DoCastSelf(SPELL_BANISH_VISUAL, true); DoCastSelf(SPELL_BANISH_ROOT, true); - DestroyPortals(); + + for (uint32 id : PortalID) + { + summons.DespawnEntry(id); + } + scheduler.Schedule(30s, [this](TaskContext) { SwitchToPortalPhase(); @@ -250,7 +242,7 @@ struct boss_netherspite : public BossAI DoCastRandomTarget(SPELL_NETHERBREATH, 0, 40.0f, true); context.Repeat(5s, 7s); }); - Talk(EMOTE_PHASE_BANISH); + for (uint8 i = 0; i < 3; ++i) { me->RemoveAurasDueToSpell(NetherBuff[i]); @@ -269,7 +261,7 @@ struct boss_netherspite : public BossAI { BossAI::JustEngagedWith(who); HandleDoors(false); - SwitchToPortalPhase(); + SwitchToPortalPhase(true); DoZoneInCombat(); scheduler.Schedule(9min, [this](TaskContext /*context*/) { @@ -286,7 +278,6 @@ struct boss_netherspite : public BossAI { BossAI::JustDied(killer); HandleDoors(true); - DestroyPortals(); } void UpdateAI(uint32 diff) override From bfb40db86db70977af43cc32c4d68faf28c3c12a Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:04:49 -0300 Subject: [PATCH 102/340] fix(Scripts/SlavePens): Correct target selector for Quagmirran Acid Spray (#17341) fix(Scripts/SlavePens): Correct target for Quagmirran Acid Spray --- .../pending_db_world/rev_1695589175269497100.sql | 4 ++++ .../SlavePens/boss_quagmirran.cpp | 14 ++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695589175269497100.sql diff --git a/data/sql/updates/pending_db_world/rev_1695589175269497100.sql b/data/sql/updates/pending_db_world/rev_1695589175269497100.sql new file mode 100644 index 00000000000000..09372c75863058 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695589175269497100.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spelldifficulty_dbc` WHERE `ID`=34780; +INSERT INTO `spelldifficulty_dbc` VALUES +(34780,34780,39340,0,0); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp index 105b17616d3e63..136348fa6e7f67 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp @@ -23,8 +23,7 @@ enum Spells { SPELL_ACID_SPRAY = 38153, SPELL_CLEAVE = 40504, - SPELL_POISON_BOLT_VOLLEY_N = 34780, - SPELL_POISON_BOLT_VOLLEY_H = 39340, + SPELL_POISON_BOLT_VOLLEY = 34780, SPELL_UPPERCUT = 32055 }; @@ -38,11 +37,6 @@ struct boss_quagmirran : public BossAI }); } - void Reset() override - { - _Reset(); - } - void JustEngagedWith(Unit* /*who*/) override { _JustEngagedWith(); @@ -57,11 +51,11 @@ struct boss_quagmirran : public BossAI context.Repeat(21800ms); }).Schedule(25200ms, [this](TaskContext context) { - DoCastVictim(SPELL_ACID_SPRAY); + DoCastRandomTarget(SPELL_ACID_SPRAY); context.Repeat(25s); }).Schedule(31800ms, [this](TaskContext context) { - DoCastSelf(DUNGEON_MODE(SPELL_POISON_BOLT_VOLLEY_N, SPELL_POISON_BOLT_VOLLEY_H)); + DoCastAOE(SPELL_POISON_BOLT_VOLLEY); context.Repeat(24400ms); }); } @@ -70,4 +64,4 @@ struct boss_quagmirran : public BossAI void AddSC_boss_quagmirran() { RegisterTheSlavePensCreatureAI(boss_quagmirran); -} \ No newline at end of file +} From f9a88b52868e9125590d7f389b3b408a33486f12 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:05:20 -0300 Subject: [PATCH 103/340] fix(DB/Conditions): Fix Berthold teleport gossip conditions (#17336) --- data/sql/updates/pending_db_world/rev_1695581559864061500.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695581559864061500.sql diff --git a/data/sql/updates/pending_db_world/rev_1695581559864061500.sql b/data/sql/updates/pending_db_world/rev_1695581559864061500.sql new file mode 100644 index 00000000000000..56c56f2126da37 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695581559864061500.sql @@ -0,0 +1,3 @@ +-- +UPDATE `conditions` SET `ConditionValue1` = 6, `ConditionValue3` = 2 WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7139 AND `SourceEntry` = 3; +UPDATE `spell_target_position` SET `PositionX` = -11165.2, `PositionY` = -1911.95, `PositionZ` = 232.009, `Orientation` = 2.14352, VerifiedBuild = 51845 WHERE `ID` = 39567; From e4717dc1791bd8ac405ed3b28cc17df9dee9d185 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 11:05:28 +0000 Subject: [PATCH 104/340] chore(DB): import pending files Referenced commit(s): 3c698f86af7fa248973dff052ca4b6929fa6f608 --- .../rev_1695579044772631700.sql => db_world/2023_09_25_04.sql} | 1 + .../rev_1695581559864061500.sql => db_world/2023_09_25_05.sql} | 1 + .../rev_1695589175269497100.sql => db_world/2023_09_25_06.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1695579044772631700.sql => db_world/2023_09_25_04.sql} (91%) rename data/sql/updates/{pending_db_world/rev_1695581559864061500.sql => db_world/2023_09_25_05.sql} (88%) rename data/sql/updates/{pending_db_world/rev_1695589175269497100.sql => db_world/2023_09_25_06.sql} (73%) diff --git a/data/sql/updates/pending_db_world/rev_1695579044772631700.sql b/data/sql/updates/db_world/2023_09_25_04.sql similarity index 91% rename from data/sql/updates/pending_db_world/rev_1695579044772631700.sql rename to data/sql/updates/db_world/2023_09_25_04.sql index 35244f0331980b..4d161db7609078 100644 --- a/data/sql/updates/pending_db_world/rev_1695579044772631700.sql +++ b/data/sql/updates/db_world/2023_09_25_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_03 -> 2023_09_25_04 -- DELETE FROM `creature_text` WHERE `CreatureId` = 15689; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1695581559864061500.sql b/data/sql/updates/db_world/2023_09_25_05.sql similarity index 88% rename from data/sql/updates/pending_db_world/rev_1695581559864061500.sql rename to data/sql/updates/db_world/2023_09_25_05.sql index 56c56f2126da37..6ab5b3910cb7cd 100644 --- a/data/sql/updates/pending_db_world/rev_1695581559864061500.sql +++ b/data/sql/updates/db_world/2023_09_25_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_04 -> 2023_09_25_05 -- UPDATE `conditions` SET `ConditionValue1` = 6, `ConditionValue3` = 2 WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7139 AND `SourceEntry` = 3; UPDATE `spell_target_position` SET `PositionX` = -11165.2, `PositionY` = -1911.95, `PositionZ` = 232.009, `Orientation` = 2.14352, VerifiedBuild = 51845 WHERE `ID` = 39567; diff --git a/data/sql/updates/pending_db_world/rev_1695589175269497100.sql b/data/sql/updates/db_world/2023_09_25_06.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1695589175269497100.sql rename to data/sql/updates/db_world/2023_09_25_06.sql index 09372c75863058..27331db4f1d7b1 100644 --- a/data/sql/updates/pending_db_world/rev_1695589175269497100.sql +++ b/data/sql/updates/db_world/2023_09_25_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_05 -> 2023_09_25_06 -- DELETE FROM `spelldifficulty_dbc` WHERE `ID`=34780; INSERT INTO `spelldifficulty_dbc` VALUES From b6e5e9f8842962ee381f371e23f885f9a7e3b339 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:05:39 -0300 Subject: [PATCH 105/340] =?UTF-8?q?fix(Scripts/SethekkHalls):=20Fix=20Anzu?= =?UTF-8?q?=20not=20leaving=20banish=20phase=20when=20all=E2=80=A6=20(#173?= =?UTF-8?q?37)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/SethekkHalls): Fix Anzu not leaving banish phase when all adds die --- .../scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp index c13ec226efc722..fe184a9c7b1e50 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp @@ -83,13 +83,13 @@ struct boss_anzu : public BossAI uint32 talkTimer; - void SummonedCreatureDies(Creature* summon, Unit*) override + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override { if (summon->GetEntry() == NPC_BROOD_OF_ANZU) { summons.Despawn(summon); summons.RemoveNotExisting(); - if (summons.empty()) + if (!summons.HasEntry(NPC_BROOD_OF_ANZU)) { me->RemoveAurasDueToSpell(SPELL_BANISH_SELF); } From 4afc200f41b58a419396e639ddbabe689f4e8094 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:06:01 -0300 Subject: [PATCH 106/340] fix(Scripts/Spells): Druid Dash require Cat Form (#17343) --- src/server/scripts/Spells/spell_druid.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index d7da1c33ca6f05..27f3cdece3996e 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -388,20 +388,25 @@ class spell_dru_treant_scaling : public AuraScript }; // -1850 - Dash -class spell_dru_dash : public AuraScript +class spell_dru_dash : public SpellScript { - PrepareAuraScript(spell_dru_dash); + PrepareSpellScript(spell_dru_dash); - void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + SpellCastResult CheckCast() { - // do not set speed if not in cat form - if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT) - amount = 0; + Unit* caster = GetCaster(); + if (caster->GetShapeshiftForm() != FORM_CAT) + { + SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_MUST_BE_IN_CAT_FORM); + return SPELL_FAILED_CUSTOM_ERROR; + } + + return SPELL_CAST_OK; } void Register() override { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED); + OnCheckCast += SpellCheckCastFn(spell_dru_dash::CheckCast); } }; From c7b7b7dc075c85d2a7b1bfc2791932e411682cd5 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:07:09 -0300 Subject: [PATCH 107/340] fix(Scripts/Spells): Fix Glyph of Voidwalker applying to every pet (#17342) * fix(Scripts/Spells): Fix Glyph of Voidwalker applying to every pet * Update src/server/game/Entities/Pet/Pet.cpp --- .../rev_1695598231920750800.sql | 4 ++ src/server/game/Entities/Pet/Pet.cpp | 8 ++++ src/server/game/Entities/Pet/PetDefines.h | 1 + .../game/Spells/SpellInfoCorrections.cpp | 8 ---- src/server/scripts/Spells/spell_warlock.cpp | 40 +++++++++++++++++++ 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695598231920750800.sql diff --git a/data/sql/updates/pending_db_world/rev_1695598231920750800.sql b/data/sql/updates/pending_db_world/rev_1695598231920750800.sql new file mode 100644 index 00000000000000..fc56bd72f98e4a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695598231920750800.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_warl_glyph_of_voidwalker' AND `spell_id` = 56247; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(56247, 'spell_warl_glyph_of_voidwalker'); diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 5696c18ac52ade..2b7f0570c3bb2a 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1175,6 +1175,14 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, aurEff->GetAmount(), true); } + break; + } + case NPC_VOIDWALKER: + { + if (AuraEffect* aurEff = owner->GetAuraEffectDummy(SPELL_GLYPH_OF_VOIDWALKER)) + { + HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), true); + } break; } case NPC_WATER_ELEMENTAL_PERM: diff --git a/src/server/game/Entities/Pet/PetDefines.h b/src/server/game/Entities/Pet/PetDefines.h index 22849c217891c3..65de91faad676c 100644 --- a/src/server/game/Entities/Pet/PetDefines.h +++ b/src/server/game/Entities/Pet/PetDefines.h @@ -147,6 +147,7 @@ enum PetScalingSpells SPELL_WARLOCK_PET_SCALING_04 = 34958, SPELL_WARLOCK_PET_SCALING_05 = 61013, // Hit / Expertise SPELL_GLYPH_OF_FELGUARD = 56246, + SPELL_GLYPH_OF_VOIDWALKER = 56247, SPELL_INFERNAL_SCALING_01 = 36186, SPELL_INFERNAL_SCALING_02 = 36188, SPELL_INFERNAL_SCALING_03 = 36189, diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 18aaac71a4de3e..c3ca283d28933e 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -1028,14 +1028,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(6); }); - // Glyph of Voidwalker - ApplySpellFix({ 56247 }, [](SpellInfo* spellInfo) - { - spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; - spellInfo->Effects[EFFECT_0].MiscValue = SPELLMOD_EFFECT1; - spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x8000000, 0, 0); - }); - // Everlasting Affliction ApplySpellFix({ 47201, 47202, 47203, 47204, 47205 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 822d7bf642754d..e8efd5d510f806 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1267,6 +1267,45 @@ class spell_warl_glyph_of_felguard : public AuraScript } }; +class spell_warl_glyph_of_voidwalker : public AuraScript +{ + PrepareAuraScript(spell_warl_glyph_of_voidwalker); + + void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Player* player = GetCaster()->ToPlayer()) + { + if (Pet* pet = player->GetPet()) + { + if (pet->GetEntry() == NPC_VOIDWALKER) + { + pet->HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), true); + } + } + } + } + + void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Player* player = GetCaster()->ToPlayer()) + { + if (Pet* pet = player->GetPet()) + { + if (pet->GetEntry() == NPC_VOIDWALKER) + { + pet->HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), false); + } + } + } + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_warl_glyph_of_voidwalker::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_warl_glyph_of_voidwalker::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_warlock_spell_scripts() { RegisterSpellScript(spell_warl_eye_of_kilrogg); @@ -1299,4 +1338,5 @@ void AddSC_warlock_spell_scripts() RegisterSpellScript(spell_warl_drain_soul); RegisterSpellScript(spell_warl_shadowburn); RegisterSpellScript(spell_warl_glyph_of_felguard); + RegisterSpellScript(spell_warl_glyph_of_voidwalker); } From 970c57954720733a2e02d32721395657db07ccd4 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:07:30 -0300 Subject: [PATCH 108/340] fix(Scripts/Ulduar): Respawn Algalon on wipes (#17344) --- .../Ulduar/Ulduar/boss_algalon_the_observer.cpp | 3 +++ .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index f187c85a500746..86fc029040ea70 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -366,6 +366,9 @@ class boss_algalon_the_observer : public CreatureScript return; } + if (m_pInstance) + m_pInstance->SetData(TYPE_ALGALON, FAIL); + ScriptedAI::EnterEvadeMode(why); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 52a25f4382e6da..df114d77d7c954 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -786,6 +786,18 @@ class instance_ulduar : public InstanceMapScript go->SetGoState(data == IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY); go->EnableCollision(false); } + + if (data == FAIL) + { + scheduler.Schedule(5s, [this](TaskContext) + { + if (m_algalonTimer && (m_algalonTimer <= 60 || m_algalonTimer == TIMER_ALGALON_TO_SUMMON)) + { + instance->SummonCreature(NPC_ALGALON, AlgalonLandPos); + } + }); + } + break; // Achievement @@ -1109,6 +1121,8 @@ class instance_ulduar : public InstanceMapScript void Update(uint32 diff) override { + InstanceScript::Update(diff); + if (_events.Empty()) return; From 62c7d074f9020430c09f6a1f1545cfdc7d04a640 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 11:08:21 +0000 Subject: [PATCH 109/340] chore(DB): import pending files Referenced commit(s): c7b7b7dc075c85d2a7b1bfc2791932e411682cd5 --- .../rev_1695598231920750800.sql => db_world/2023_09_25_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695598231920750800.sql => db_world/2023_09_25_07.sql} (83%) diff --git a/data/sql/updates/pending_db_world/rev_1695598231920750800.sql b/data/sql/updates/db_world/2023_09_25_07.sql similarity index 83% rename from data/sql/updates/pending_db_world/rev_1695598231920750800.sql rename to data/sql/updates/db_world/2023_09_25_07.sql index fc56bd72f98e4a..25279d51c60063 100644 --- a/data/sql/updates/pending_db_world/rev_1695598231920750800.sql +++ b/data/sql/updates/db_world/2023_09_25_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_06 -> 2023_09_25_07 -- DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_warl_glyph_of_voidwalker' AND `spell_id` = 56247; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 14ed5860e18017bcfb4f6759af3b955f09ce730d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:33:23 -0300 Subject: [PATCH 110/340] =?UTF-8?q?fix(Core/Spells):=20Correct=20swapped?= =?UTF-8?q?=20TARGET=5FUNIT=5FNEARBY=5FALLY=20and=20TARGET=5F=E2=80=A6=20(?= =?UTF-8?q?#17339)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): Correct swapped TARGET_UNIT_NEARBY_ALLY and TARGET_UNIT_NEARBY_PARTY (cherry picked from commit https://github.com/TrinityCore/TrinityCore/commit/7c6d92012afa4efe7b075aa6543e2169cda3faed ) Co-Authored-By: xvwyh <43143822+xvwyh@users.noreply.github.com> --- src/server/game/Spells/SpellInfo.cpp | 4 ++-- src/server/shared/SharedDefines.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index bdab02384fb5f4..baaf3f1af11299 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -212,8 +212,8 @@ std::array SpellImplic {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 1 TARGET_UNIT_CASTER {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 2 TARGET_UNIT_NEARBY_ENEMY - {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 3 TARGET_UNIT_NEARBY_PARTY - {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 4 TARGET_UNIT_NEARBY_ALLY + {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 3 TARGET_UNIT_NEARBY_ALLY + {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 4 TARGET_UNIT_NEARBY_PARTY {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 5 TARGET_UNIT_PET {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 6 TARGET_UNIT_TARGET_ENEMY {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 7 TARGET_UNIT_SRC_AREA_ENTRY diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index 3a5623d8a44773..be1179b065fe2c 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -1381,8 +1381,8 @@ enum Targets { TARGET_UNIT_CASTER = 1, TARGET_UNIT_NEARBY_ENEMY = 2, - TARGET_UNIT_NEARBY_PARTY = 3, - TARGET_UNIT_NEARBY_ALLY = 4, + TARGET_UNIT_NEARBY_ALLY = 3, + TARGET_UNIT_NEARBY_PARTY = 4, TARGET_UNIT_PET = 5, TARGET_UNIT_TARGET_ENEMY = 6, TARGET_UNIT_SRC_AREA_ENTRY = 7, From 7140c0aa6456cdbf2b174c10ed8ee6669dd9ee93 Mon Sep 17 00:00:00 2001 From: KJack Date: Mon, 25 Sep 2023 08:34:09 -0400 Subject: [PATCH 111/340] fix(DB/Conditions): Argent Dawn shoulder enchant quest fixes (#17354) * Fix Argent Dawn enchants to only be available once the appropriate quest has been completed. * Remove horde-only flag, handle Chromatic enchant quests too --- .../rev_1695612785136315613.sql | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695612785136315613.sql diff --git a/data/sql/updates/pending_db_world/rev_1695612785136315613.sql b/data/sql/updates/pending_db_world/rev_1695612785136315613.sql new file mode 100644 index 00000000000000..eb129046c8fc6a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695612785136315613.sql @@ -0,0 +1,140 @@ +/* +################################################## +Argent Dawn Vendors: +- Argent Quartermaster Hasana (10856) +- Argent Quartermaster Lightspark (10857) +- Quartermaster Miranda Breechlock (11536) + +Quests: +- Mantles of the Dawn (5504) +- Mantles of the Dawn (5507) +- Mantles of the Dawn (5513) + +Shoulder Enchants: +- Flame Mantle of the Dawn (18169) +- Frost Mantle of the Dawn (18170) +- Arcane Mantle of the Dawn (18171) +- Nature Mantle of the Dawn (18172) +- Shadow Mantle of the Dawn (18173) + +Follow-up Quests: +- Chromatic Mantle of the Dawn (5517) +- Chromatic Mantle of the Dawn (5521) +- Chromatic Mantle of the Dawn (5524) + +Shoulder Enchant: +- Chromatic Mantle of the Dawn (18182) + +Vendor should only sell shoulder enchants if the player has completed the appropriate quest. +################################################## +*/ + +-- Add the Mantle of the Dawn quests (5504, 5507, 5513) to an ExclusiveGroup +DELETE FROM `quest_template_addon` WHERE `ID` in (5504, 5507, 5513); +INSERT INTO `quest_template_addon` (`ID`, `MaxLevel`, `AllowableClasses`, `SourceSpellID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `RewardMailTemplateID`, `RewardMailDelay`, `RequiredSkillID`, `RequiredSkillPoints`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `ProvidedItemCount`, `SpecialFlags`) VALUES +(5504, 0, 0, 0, 0, 0, 5504, 0, 0, 0, 0, 529, 0, 21000, 0, 0, 0), +(5507, 0, 0, 0, 0, 0, 5504, 0, 0, 0, 0, 529, 0, 21000, 0, 0, 0), +(5513, 0, 0, 0, 0, 0, 5504, 0, 0, 0, 0, 529, 0, 21000, 0, 0, 0); + +-- Add the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) to an ExclusiveGroup, and remove the repeatable flag +DELETE FROM `quest_template_addon` WHERE `ID` in (5517, 5521, 5524); +INSERT INTO `quest_template_addon` (`ID`, `MaxLevel`, `AllowableClasses`, `SourceSpellID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `RewardMailTemplateID`, `RewardMailDelay`, `RequiredSkillID`, `RequiredSkillPoints`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `ProvidedItemCount`, `SpecialFlags`) VALUES +(5517, 0, 0, 0, 0, 0, 5517, 0, 0, 0, 0, 529, 0, 42000, 0, 0, 0), +(5521, 0, 0, 0, 0, 0, 5517, 0, 0, 0, 0, 529, 0, 42000, 0, 0, 0), +(5524, 0, 0, 0, 0, 0, 5517, 0, 0, 0, 0, 529, 0, 42000, 0, 0, 0); + +-- Make the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) require one of the Mantle of the Dawn quests (5504, 5507, 5513) +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 19 AND `SourceEntry` IN (5517, 5521, 5524)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 5517, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5517) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5517, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5517) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5517, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5517) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), + +(19, 0, 5521, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5521) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5521, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5521) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5521, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5521) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), + +(19, 0, 5524, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5524) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5524, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5524) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'), +(19, 0, 5524, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Chromatic Mantle of the Dawn (5524) - Requires one of the Mantle of the Dawn quests (5504, 5507, 5513) rewarded'); + +-- Argent QuarterMaster Hasana (10856) Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 23 AND `SourceGroup` = 10856 AND `SourceEntry` IN (18169, 18170, 18171, 18172, 18173, 18182)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(23, 10856, 18169, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18169, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18169, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10856, 18170, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18170, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18170, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10856, 18171, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18171, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18171, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10856, 18172, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18172, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18172, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10856, 18173, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18173, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10856, 18173, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10856, 18182, 0, 1, 47, 0, 5517, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 10856, 18182, 0, 2, 47, 0, 5521, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 10856, 18182, 0, 3, 47, 0, 5524, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Hasana (10856) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'); + +-- Argent QuarterMaster Lightspark (10857) Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 23 AND `SourceGroup` = 10857 AND `SourceEntry` IN (18169, 18170, 18171, 18172, 18173, 18182)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(23, 10857, 18169, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18169, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18169, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10857, 18170, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18170, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18170, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10857, 18171, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18171, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18171, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10857, 18172, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18172, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18172, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10857, 18173, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18173, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 10857, 18173, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 10857, 18182, 0, 1, 47, 0, 5517, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 10857, 18182, 0, 2, 47, 0, 5521, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 10857, 18182, 0, 3, 47, 0, 5524, 64, 0, 0, 0, 0, '', 'Argent Quartermaster Lightspark (10857) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'); + +-- Quartermaster Miranda Breechlock (11536) Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 23 AND `SourceGroup` = 11536 AND `SourceEntry` IN (18169, 18170, 18171, 18172, 18173, 18182)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(23, 11536, 18169, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18169, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18169, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Flame Mantle of the Dawn (18169) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 11536, 18170, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18170, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18170, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Frost Mantle of the Dawn (18170) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 11536, 18171, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18171, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18171, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Arcane Mantle of the Dawn (18171) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 11536, 18172, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18172, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18172, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Nature Mantle of the Dawn (18172) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 11536, 18173, 0, 1, 47, 0, 5504, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18173, 0, 2, 47, 0, 5507, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), +(23, 11536, 18173, 0, 3, 47, 0, 5513, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Shadow Mantle of the Dawn (18173) if one of the Mantle of the Dawn quests (5504, 5507, 5513) is rewarded.'), + +(23, 11536, 18182, 0, 1, 47, 0, 5517, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 11536, 18182, 0, 2, 47, 0, 5521, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'), +(23, 11536, 18182, 0, 3, 47, 0, 5524, 64, 0, 0, 0, 0, '', 'Quartermaster Miranda Breechlock (11536) - Only sell Chromatic Mantle of the Dawn (18182) if one of the Chromatic Mantle of the Dawn quests (5517, 5521, 5524) is rewarded.'); From b40640fc38965e083ec89a21eca07436f2a18178 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Sep 2023 12:35:15 +0000 Subject: [PATCH 112/340] chore(DB): import pending files Referenced commit(s): 7140c0aa6456cdbf2b174c10ed8ee6669dd9ee93 --- .../rev_1695612785136315613.sql => db_world/2023_09_25_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695612785136315613.sql => db_world/2023_09_25_08.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1695612785136315613.sql b/data/sql/updates/db_world/2023_09_25_08.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1695612785136315613.sql rename to data/sql/updates/db_world/2023_09_25_08.sql index eb129046c8fc6a..366134a83e8dc7 100644 --- a/data/sql/updates/pending_db_world/rev_1695612785136315613.sql +++ b/data/sql/updates/db_world/2023_09_25_08.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_07 -> 2023_09_25_08 /* ################################################## Argent Dawn Vendors: From 2d3e9a8f2386eb7725c83b14d72c49766168dd21 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:01:19 +0200 Subject: [PATCH 113/340] fix(Player/Achievement): fix crash (#17357) * closes https://github.com/azerothcore/azerothcore-wotlk/issues/17330 --- src/server/game/Instances/InstanceSaveMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index d934ec3ad32dc8..ec6854ede84bfa 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -676,7 +676,8 @@ InstancePlayerBind* InstanceSaveMgr::PlayerBindToInstance(ObjectGuid guid, Insta stmt->SetData(2, permanent); CharacterDatabase.Execute(stmt); - player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID, 1); + if (player) + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID, 1); } if (bind.save != save) From e67a0b1a82a0173c6100921b1bcf91b8834c9308 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:31:36 -0300 Subject: [PATCH 114/340] =?UTF-8?q?fix(Scripts/Spells):=20Fix=20Furious=20?= =?UTF-8?q?Howl=20not=20giving=20ranged=20attack=20power=20=E2=80=A6=20(#1?= =?UTF-8?q?7345)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rev_1695604876617457700.sql | 6 +++++ src/server/scripts/Spells/spell_hunter.cpp | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695604876617457700.sql diff --git a/data/sql/updates/pending_db_world/rev_1695604876617457700.sql b/data/sql/updates/pending_db_world/rev_1695604876617457700.sql new file mode 100644 index 00000000000000..ba48608ae9b0c9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695604876617457700.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`= -24604 AND `ScriptName` = 'spell_hun_furious_howl'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(-24604, 'spell_hun_furious_howl'); + +DELETE FROM `spell_dbc` WHERE `ID` IN (24604, 64491, 64492, 64493, 64494, 64495, 53434); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 7f3468659168f3..4bbb80310b2cb8 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1308,6 +1308,29 @@ class spell_hun_bestial_wrath : public SpellScript } }; +class spell_hun_furious_howl : public SpellScript +{ + PrepareSpellScript(spell_hun_furious_howl); + + bool Load() override + { + return GetCaster()->IsPet(); + } + + void FilterTargets(std::list& targets) + { + targets.remove_if([&](WorldObject const* target) -> bool + { + return target != GetCaster() && target != GetCaster()->ToPet()->GetOwner(); + }); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); + } +}; + void AddSC_hunter_spell_scripts() { RegisterSpellScript(spell_hun_check_pet_los); @@ -1338,4 +1361,5 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_lock_and_load); RegisterSpellScript(spell_hun_intimidation); RegisterSpellScript(spell_hun_bestial_wrath); + RegisterSpellScript(spell_hun_furious_howl); } From a7969472b46f64ff1d8a050ba784f35ea78b6b31 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Sep 2023 00:32:43 +0000 Subject: [PATCH 115/340] chore(DB): import pending files Referenced commit(s): e67a0b1a82a0173c6100921b1bcf91b8834c9308 --- .../rev_1695604876617457700.sql => db_world/2023_09_26_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695604876617457700.sql => db_world/2023_09_26_00.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1695604876617457700.sql b/data/sql/updates/db_world/2023_09_26_00.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1695604876617457700.sql rename to data/sql/updates/db_world/2023_09_26_00.sql index ba48608ae9b0c9..6e7eea892e870e 100644 --- a/data/sql/updates/pending_db_world/rev_1695604876617457700.sql +++ b/data/sql/updates/db_world/2023_09_26_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_25_08 -> 2023_09_26_00 -- DELETE FROM `spell_script_names` WHERE `spell_id`= -24604 AND `ScriptName` = 'spell_hun_furious_howl'; INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES From a8e514ea39590d2ee3a66b9e419e641fb2f910a6 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 26 Sep 2023 17:30:35 -0300 Subject: [PATCH 116/340] =?UTF-8?q?fix(Core/Unit):=20Threat=20from=20energ?= =?UTF-8?q?ize=20effects=20should=20be=20proportional=20t=E2=80=A6=20(#173?= =?UTF-8?q?52)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Unit): Threat from energize effects should be proportional to the amount of power gained --- src/server/game/Entities/Unit/Unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b95b31962f009c..c7964a1ff91767 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11255,12 +11255,12 @@ void Unit::SendEnergizeSpellLog(Unit* victim, uint32 spellID, uint32 damage, Pow void Unit::EnergizeBySpell(Unit* victim, uint32 spellID, uint32 damage, Powers powerType) { - victim->ModifyPower(powerType, damage, false); + int32 gainedPower = victim->ModifyPower(powerType, damage, false); - if (powerType != POWER_HAPPINESS) + if (powerType != POWER_HAPPINESS && gainedPower) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID); - victim->getHostileRefMgr().threatAssist(this, float(damage) * 0.5f, spellInfo); + victim->getHostileRefMgr().threatAssist(this, float(gainedPower) * 0.5f, spellInfo); } SendEnergizeSpellLog(victim, spellID, damage, powerType); From c05acf4f96e22d12826e3710fbf274c278ed94a9 Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Tue, 26 Sep 2023 21:15:18 +0000 Subject: [PATCH 117/340] fix(Script/Karazhan): Netherspite resets threat after portal phase (#17362) * Update boss_netherspite.cpp * Update boss_netherspite.cpp * Update boss_netherspite.cpp --- .../scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index f16654cfba7df9..0adb88ffbc9a60 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -50,7 +50,7 @@ enum Portals enum Groups { PORTAL_PHASE = 0, - VANISH_PHASE = 1 + BANISH_PHASE = 1 }; const float PortalCoord[3][3] = @@ -192,7 +192,7 @@ struct boss_netherspite : public BossAI Talk(EMOTE_PHASE_PORTAL); } - scheduler.CancelGroup(VANISH_PHASE); + scheduler.CancelGroup(BANISH_PHASE); me->RemoveAurasDueToSpell(SPELL_BANISH_ROOT); me->RemoveAurasDueToSpell(SPELL_BANISH_VISUAL); SummonPortals(); @@ -236,8 +236,9 @@ struct boss_netherspite : public BossAI scheduler.Schedule(30s, [this](TaskContext) { SwitchToPortalPhase(); + DoResetThreatList(); return; - }).Schedule(10s, VANISH_PHASE, [this](TaskContext context) + }).Schedule(10s, BANISH_PHASE, [this](TaskContext context) { DoCastRandomTarget(SPELL_NETHERBREATH, 0, 40.0f, true); context.Repeat(5s, 7s); From ae99ce586a57e64c921437f8d6c01c20af002a97 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:27:23 -0300 Subject: [PATCH 118/340] fix(Scripts/Karazhan): Fix Aran combat movement behavior (#17359) * fix(Scripts/Karazhan): Fix Aran combat movement behavior * Update SmartScript.cpp --- src/server/game/Entities/Creature/Creature.cpp | 18 ++++++++++++++++++ src/server/game/Entities/Creature/Creature.h | 6 ++++++ .../Karazhan/boss_shade_of_aran.cpp | 15 ++++++++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f8a41cc57aa811..8340fbc72625a4 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -3707,6 +3707,24 @@ uint32 Creature::GetPlayerDamageReq() const return _playerDamageReq; } +bool Creature::CanCastSpell(uint32 spellID) const +{ + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID); + int32 currentPower = GetPower(getPowerType()); + + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED) || IsSpellProhibited(spellInfo->GetSchoolMask())) + { + return false; + } + + if (spellInfo && (currentPower < spellInfo->CalcPowerCost(this, spellInfo->GetSchoolMask()))) + { + return false; + } + + return true; +} + std::string Creature::GetDebugInfo() const { std::stringstream sstr; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index c7c3102a1167a9..d0a6b8b720b6d9 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -399,6 +399,12 @@ class Creature : public Unit, public GridObject, public MovableMapObje * */ void ResumeChasingVictim() { GetMotionMaster()->MoveChase(GetVictim()); }; + /** + * @brief Returns true if the creature is able to cast the spell. + * + * */ + bool CanCastSpell(uint32 spellID) const; + std::string GetDebugInfo() const override; protected: diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index fa75f1d3d207df..df45f50f1cae26 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -256,7 +256,20 @@ struct boss_shade_of_aran : public BossAI if (AvailableSpells) { CurrentNormalSpell = Spells[rand() % AvailableSpells]; - DoCast(target, CurrentNormalSpell); + + if (!me->CanCastSpell(CurrentNormalSpell)) + { + me->SetWalk(false); + me->ResumeChasingVictim(); + } + else + { + DoCast(target, CurrentNormalSpell); + if (me->GetVictim()) + { + me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f); + } + } } } context.Repeat(2s); From 2d620f20ddbe707c4dda7336141d99cf187ac722 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 26 Sep 2023 23:50:44 +0200 Subject: [PATCH 119/340] fix(DB/Creature): make Malchezaar interrupt immune (#17363) initial --- .../updates/pending_db_world/malchezaar-interrupt-immune.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql diff --git a/data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql b/data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql new file mode 100644 index 00000000000000..5ae03f969763ff --- /dev/null +++ b/data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 15690; From 6649ad08d7154d5e1614b8f7382f241ce63b054d Mon Sep 17 00:00:00 2001 From: Ludwig Date: Tue, 26 Sep 2023 23:51:59 +0200 Subject: [PATCH 120/340] fix(Scripts/Midsummer): Make beam target Ribbon Pole top (#17358) * fix(Scripts/Midsummer): Make beam target Ribbon Pole top progress #12145 * refactor(Scripts/Midsummer): shorten spell_midsummer_ribbon_pole_visual::UpdateTarget --- .../rev_1695647577303392800.sql | 4 +++ src/server/scripts/Events/midsummer.cpp | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695647577303392800.sql diff --git a/data/sql/updates/pending_db_world/rev_1695647577303392800.sql b/data/sql/updates/pending_db_world/rev_1695647577303392800.sql new file mode 100644 index 00000000000000..63d4b5270398cb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695647577303392800.sql @@ -0,0 +1,4 @@ +-- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual +DELETE FROM acore_world.spell_script_names WHERE spell_id = 29172; +INSERT INTO acore_world.spell_script_names (spell_id, ScriptName) VALUES +(29172, 'spell_midsummer_ribbon_pole_visual'); diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index d428e1747019cf..8c9b251bb1d6bf 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -253,6 +253,39 @@ class spell_midsummer_ribbon_pole : public AuraScript } }; +class spell_midsummer_ribbon_pole_visual : public SpellScript +{ + PrepareSpellScript(spell_midsummer_ribbon_pole_visual) + + void UpdateTarget(WorldObject*& target) + { + if (!target) + return; + + // find NPC at ribbon pole top as target + // trap 181604 also spawns NPCs at pole bottom - ignore those + std::list crList; + target->GetCreaturesWithEntryInRange(crList, 30.0f, NPC_RIBBON_POLE_DEBUG_TARGET); + if (crList.empty()) + return; + + for (std::list::const_iterator itr = crList.begin(); itr != crList.end(); ++itr) + { + // NPC on ribbon pole top is no tempsummon + if (!(*itr)->ToTempSummon()) + { + target = *itr; + return; + } + } + } + + void Register() override + { + OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_midsummer_ribbon_pole_visual::UpdateTarget, EFFECT_0, TARGET_UNIT_NEARBY_ENTRY); + } +}; + class spell_midsummer_torch_quest : public AuraScript { PrepareAuraScript(spell_midsummer_torch_quest) @@ -514,6 +547,7 @@ void AddSC_event_midsummer_scripts() // Spells RegisterSpellScript(spell_gen_crab_disguise); RegisterSpellScript(spell_midsummer_ribbon_pole); + RegisterSpellScript(spell_midsummer_ribbon_pole_visual); RegisterSpellScript(spell_midsummer_torch_quest); RegisterSpellScript(spell_midsummer_fling_torch); RegisterSpellScript(spell_midsummer_juggling_torch); From 501399cd0eb87a24ac10ac6966a00ae70855f1da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Sep 2023 21:52:08 +0000 Subject: [PATCH 121/340] chore(DB): import pending files Referenced commit(s): 2d620f20ddbe707c4dda7336141d99cf187ac722 --- .../2023_09_26_01.sql} | 1 + .../rev_1695647577303392800.sql => db_world/2023_09_26_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/malchezaar-interrupt-immune.sql => db_world/2023_09_26_01.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1695647577303392800.sql => db_world/2023_09_26_02.sql} (85%) diff --git a/data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql b/data/sql/updates/db_world/2023_09_26_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql rename to data/sql/updates/db_world/2023_09_26_01.sql index 5ae03f969763ff..dc0500e06e2fa2 100644 --- a/data/sql/updates/pending_db_world/malchezaar-interrupt-immune.sql +++ b/data/sql/updates/db_world/2023_09_26_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_26_00 -> 2023_09_26_01 -- UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 15690; diff --git a/data/sql/updates/pending_db_world/rev_1695647577303392800.sql b/data/sql/updates/db_world/2023_09_26_02.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1695647577303392800.sql rename to data/sql/updates/db_world/2023_09_26_02.sql index 63d4b5270398cb..fc823837d2874a 100644 --- a/data/sql/updates/pending_db_world/rev_1695647577303392800.sql +++ b/data/sql/updates/db_world/2023_09_26_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_26_01 -> 2023_09_26_02 -- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual DELETE FROM acore_world.spell_script_names WHERE spell_id = 29172; INSERT INTO acore_world.spell_script_names (spell_id, ScriptName) VALUES From 8d7461eb2cbeb92f534e32723eb088afe2504283 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:23:26 +0200 Subject: [PATCH 122/340] refactor(Scripts/SSC): Lady Vashj boss script updated (#17083) * initial * whitespace1 * fix timers repeat maxtimer needs work. average is skewed because the max is very high. I took the average timer as maxtimer now * fixes --- .../SerpentShrine/boss_lady_vashj.cpp | 344 +++++++++--------- 1 file changed, 171 insertions(+), 173 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 4ecb9e585d82bf..b496d3e25f384b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -64,20 +64,6 @@ enum Misc ITEM_TAINTED_CORE = 31088, POINT_HOME = 1, - - EVENT_SPELL_SHOCK_BLAST = 1, - EVENT_SPELL_STATIC_CHARGE = 2, - EVENT_SPELL_ENTANGLE = 3, - EVENT_CHECK_HEALTH = 4, - EVENT_SPELL_FORKED_LIGHTNING = 5, - EVENT_SUMMON_A = 6, - EVENT_SUMMON_B = 7, - EVENT_SUMMON_C = 8, - EVENT_SUMMON_D = 9, - EVENT_CHECK_HEALTH2 = 10, - EVENT_SUMMON_SPOREBAT = 11, - - EVENT_KILL_TALK = 20 }; class startFollow : public BasicEvent @@ -88,215 +74,223 @@ class startFollow : public BasicEvent bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override { if (InstanceScript* instance = _owner->GetInstanceScript()) + { if (Creature* vashj = ObjectAccessor::GetCreature(*_owner, instance->GetGuidData(NPC_LADY_VASHJ))) + { _owner->GetMotionMaster()->MoveFollow(vashj, 3.0f, vashj->GetAngle(_owner), MOTION_SLOT_CONTROLLED); + } + } return true; } - private: Unit* _owner; }; -class boss_lady_vashj : public CreatureScript +struct boss_lady_vashj : public BossAI { -public: - boss_lady_vashj() : CreatureScript("boss_lady_vashj") { } + boss_lady_vashj(Creature* creature) : BossAI(creature, DATA_LADY_VASHJ) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + + _intro = false; + } - CreatureAI* GetAI(Creature* creature) const override + void Reset() override { - return GetSerpentShrineAI(creature); + _count = 0; + _recentlySpoken = false; + _batTimer = 20s; + BossAI::Reset(); + + ScheduleHealthCheckEvent(70, [&]{ + Talk(SAY_PHASE2); + me->SetReactState(REACT_PASSIVE); + me->GetMotionMaster()->MovePoint(POINT_HOME, me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ(), true, true); + }); } - struct boss_lady_vashjAI : public BossAI + void KilledUnit(Unit* /*victim*/) override { - boss_lady_vashjAI(Creature* creature) : BossAI(creature, DATA_LADY_VASHJ) + if(!_recentlySpoken) { - intro = false; + Talk(SAY_SLAY); + _recentlySpoken = true; } + scheduler.Schedule(6s, [this](TaskContext) + { + _recentlySpoken = false; + }); + } - bool intro; - int32 count; + void JustDied(Unit* killer) override + { + Talk(SAY_DEATH); + BossAI::JustDied(killer); + } - void Reset() override - { - count = 0; - BossAI::Reset(); - } + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + Talk(SAY_AGGRO); + DoCastSelf(SPELL_REMOVE_TAINTED_CORES, true); - void KilledUnit(Unit* /*victim*/) override - { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) - { - Talk(SAY_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); - } - } + ScheduleSpells(); + } - void JustDied(Unit* killer) override + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + if (summon->GetEntry() == WORLD_TRIGGER) { - Talk(SAY_DEATH); - BossAI::JustDied(killer); + summon->CastSpell(summon, SPELL_MAGIC_BARRIER); } - - void JustEngagedWith(Unit* who) override + else if (summon->GetEntry() == NPC_ENCHANTED_ELEMENTAL) { - BossAI::JustEngagedWith(who); - Talk(SAY_AGGRO); - - me->CastSpell(me, SPELL_REMOVE_TAINTED_CORES, true); - events.ScheduleEvent(EVENT_SPELL_SHOCK_BLAST, 10000); - events.ScheduleEvent(EVENT_SPELL_STATIC_CHARGE, 15000); - events.ScheduleEvent(EVENT_SPELL_ENTANGLE, 20000); - events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000); + summon->SetWalk(true); + summon->m_Events.AddEvent(new startFollow(summon), summon->m_Events.CalculateTime(0)); } - - void JustSummoned(Creature* summon) override + else if (summon->GetEntry() == NPC_TOXIC_SPOREBAT) { - summons.Summon(summon); - if (summon->GetEntry() == WORLD_TRIGGER) - summon->CastSpell(summon, SPELL_MAGIC_BARRIER, false); - else if (summon->GetEntry() == NPC_ENCHANTED_ELEMENTAL) - { - summon->SetWalk(true); - summon->m_Events.AddEvent(new startFollow(summon), summon->m_Events.CalculateTime(0)); - } - else if (summon->GetEntry() == NPC_TOXIC_SPOREBAT) - summon->GetMotionMaster()->MoveRandom(30.0f); - else if (summon->GetEntry() != NPC_TAINTED_ELEMENTAL) - summon->GetMotionMaster()->MovePoint(POINT_HOME, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), true, true); + summon->GetMotionMaster()->MoveRandom(30.0f); } - - void MoveInLineOfSight(Unit* who) override + else if (summon->GetEntry() != NPC_TAINTED_ELEMENTAL) { - if (!intro && who->GetTypeId() == TYPEID_PLAYER) - { - intro = true; - Talk(SAY_INTRO); - } - - BossAI::MoveInLineOfSight(who); + summon->GetMotionMaster()->MovePoint(POINT_HOME, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), true, true); } + } - void MovementInform(uint32 type, uint32 id) override + void ScheduleSpells() + { + scheduler.Schedule(14550ms, [this](TaskContext context) { - if (type != POINT_MOTION_TYPE || id != POINT_HOME) - return; + DoCastVictim(SPELL_SHOCK_BLAST); + context.Repeat(10850ms, 25100ms); + }).Schedule(18150ms, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_STATIC_CHARGE); + context.Repeat(7250ms, 27050ms); + }).Schedule(25450ms, [this](TaskContext context) + { + DoCastSelf(SPELL_ENTANGLE); + context.Repeat(18200ms, 51500ms); + }); + } - me->SetFacingTo(me->GetHomePosition().GetOrientation()); - instance->SetData(DATA_ACTIVATE_SHIELD, 0); - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_FORKED_LIGHTNING, 3000); - events.ScheduleEvent(EVENT_SUMMON_A, 0); - events.ScheduleEvent(EVENT_SUMMON_B, 45000); - events.ScheduleEvent(EVENT_SUMMON_C, 60000); - events.ScheduleEvent(EVENT_SUMMON_D, 50000); - events.ScheduleEvent(EVENT_CHECK_HEALTH2, 1000); + void MoveInLineOfSight(Unit* who) override + { + if (!_intro && who->GetTypeId() == TYPEID_PLAYER) + { + _intro = true; + Talk(SAY_INTRO); } - void UpdateAI(uint32 diff) override + BossAI::MoveInLineOfSight(who); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type != POINT_MOTION_TYPE || id != POINT_HOME) { - if (!UpdateVictim()) - return; + return; + } - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + me->SetFacingTo(me->GetHomePosition().GetOrientation()); + instance->SetData(DATA_ACTIVATE_SHIELD, 0); + scheduler.CancelAll(); - switch (events.ExecuteEvent()) + scheduler.Schedule(2400ms, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_FORKED_LIGHTNING); + context.Repeat(2400ms, 12450ms); + }).Schedule(0s, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_ENCHANTED_ELEMENTAL, true); + context.Repeat(2500ms); + }).Schedule(45s, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_COILFANG_ELITE, true); + context.Repeat(45s); + }).Schedule(60s, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_COILFANG_STRIDER, true); + context.Repeat(60s); + }).Schedule(50s, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_TAINTED_ELEMENTAL, true); + context.Repeat(50s); + }).Schedule(1s, [this](TaskContext context) + { + if (!me->HasAura(SPELL_MAGIC_BARRIER)) { - case EVENT_SPELL_SHOCK_BLAST: - me->CastSpell(me->GetVictim(), SPELL_SHOCK_BLAST, false); - events.ScheduleEvent(EVENT_SPELL_SHOCK_BLAST, urand(10000, 20000)); - break; - case EVENT_SPELL_STATIC_CHARGE: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f)) - me->CastSpell(target, SPELL_STATIC_CHARGE, false); - events.ScheduleEvent(EVENT_SPELL_STATIC_CHARGE, 20000); - break; - case EVENT_SPELL_ENTANGLE: - me->CastSpell(me, SPELL_ENTANGLE, false); - events.ScheduleEvent(EVENT_SPELL_ENTANGLE, 30000); - break; - case EVENT_CHECK_HEALTH: - if (me->HealthBelowPct(71)) - { - Talk(SAY_PHASE2); - me->SetReactState(REACT_PASSIVE); - me->GetMotionMaster()->MovePoint(POINT_HOME, me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ(), true, true); - break; - } - events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000); - break; - case EVENT_SPELL_FORKED_LIGHTNING: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f)) - me->CastSpell(target, SPELL_FORKED_LIGHTNING, false); - events.ScheduleEvent(EVENT_SPELL_FORKED_LIGHTNING, urand(2500, 5000)); - break; - case EVENT_SUMMON_A: - me->CastSpell(me, SPELL_SUMMON_ENCHANTED_ELEMENTAL, true); - events.ScheduleEvent(EVENT_SUMMON_A, 2500); - break; - case EVENT_SUMMON_B: - me->CastSpell(me, SPELL_SUMMON_COILFANG_ELITE, true); - events.ScheduleEvent(EVENT_SUMMON_B, 45000); - break; - case EVENT_SUMMON_C: - me->CastSpell(me, SPELL_SUMMON_COILFANG_STRIDER, true); - events.ScheduleEvent(EVENT_SUMMON_C, 60000); - break; - case EVENT_SUMMON_D: - me->CastSpell(me, SPELL_SUMMON_TAINTED_ELEMENTAL, true); - events.ScheduleEvent(EVENT_SUMMON_D, 50000); - break; - case EVENT_CHECK_HEALTH2: - if (!me->HasAura(SPELL_MAGIC_BARRIER)) - { - Talk(SAY_PHASE3); - me->SetReactState(REACT_AGGRESSIVE); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_SHOCK_BLAST, 10000); - events.ScheduleEvent(EVENT_SPELL_STATIC_CHARGE, 15000); - events.ScheduleEvent(EVENT_SPELL_ENTANGLE, 20000); - events.ScheduleEvent(EVENT_SUMMON_SPOREBAT, 5000); - break; - } - events.ScheduleEvent(EVENT_CHECK_HEALTH2, 1000); - break; - case EVENT_SUMMON_SPOREBAT: - me->CastSpell(me, SPELL_SUMMON_TOXIC_SPOREBAT, true); - events.ScheduleEvent(EVENT_SUMMON_SPOREBAT, 20000 - 1000 * std::min(count++, 16)); - break; - } + Talk(SAY_PHASE3); + me->SetReactState(REACT_AGGRESSIVE); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + scheduler.CancelAll(); - if (me->GetReactState() != REACT_AGGRESSIVE || !me->isAttackReady()) - return; - - if (!me->IsWithinMeleeRange(me->GetVictim())) - { - me->resetAttackTimer(); - me->SetSheath(SHEATH_STATE_RANGED); - me->CastSpell(me->GetVictim(), roll_chance_i(33) ? SPELL_MULTI_SHOT : SPELL_SHOOT, false); - if (roll_chance_i(15)) - Talk(SAY_BOWSHOT); + ScheduleSpells(); + scheduler.Schedule(5s, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_TOXIC_SPOREBAT, true); + _batTimer = 20s - static_cast(std::min(_count++, 16)); + context.Repeat(_batTimer); + }); } else { - me->SetSheath(SHEATH_STATE_MELEE); - DoMeleeAttackIfReady(); + context.Repeat(1s); } + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + scheduler.Update(diff); + + if (me->GetReactState() != REACT_AGGRESSIVE || !me->isAttackReady()) + { + return; } - bool CheckEvadeIfOutOfCombatArea() const override + if (!me->IsWithinMeleeRange(me->GetVictim())) { - return me->GetHomePosition().GetExactDist2d(me) > 80.0f || !SelectTargetFromPlayerList(100.0f); + me->resetAttackTimer(); + me->SetSheath(SHEATH_STATE_RANGED); + me->CastSpell(me->GetVictim(), roll_chance_i(33) ? SPELL_MULTI_SHOT : SPELL_SHOOT, false); + if (roll_chance_i(15)) + { + Talk(SAY_BOWSHOT); + } } - }; + else + { + me->SetSheath(SHEATH_STATE_MELEE); + DoMeleeAttackIfReady(); + } + } + + bool CheckEvadeIfOutOfCombatArea() const override + { + return me->GetHomePosition().GetExactDist2d(me) > 80.0f || !SelectTargetFromPlayerList(100.0f); + } + +private: + bool _recentlySpoken; + bool _intro; + int32 _count; + std::chrono::seconds _batTimer; }; + /* //Toxic Sporebat //Toxic Spores: Used in Phase 3 by the Spore Bats, it creates a contaminated green patch of ground, dealing about 2775-3225 nature damage every second to anyone who stands in it. +//deprecated -- adds do work class npc_toxic_sporebat : public CreatureScript { public: @@ -433,7 +427,9 @@ class spell_lady_vashj_remove_tainted_cores : public SpellScriptLoader { PreventHitDefaultEffect(effIndex); if (Player* target = GetHitPlayer()) + { target->DestroyItemCount(ITEM_TAINTED_CORE, -1, true); + } } void Register() override @@ -488,7 +484,9 @@ class spell_lady_vashj_spore_drop_effect : public SpellScriptLoader { PreventHitDefaultEffect(effIndex); if (Unit* target = GetHitUnit()) + { target->CastSpell(target, SPELL_TOXIC_SPORES, true, nullptr, nullptr, GetCaster()->GetGUID()); + } } void Register() override @@ -505,7 +503,7 @@ class spell_lady_vashj_spore_drop_effect : public SpellScriptLoader void AddSC_boss_lady_vashj() { - new boss_lady_vashj(); + RegisterSerpentShrineAI(boss_lady_vashj); new spell_lady_vashj_magic_barrier(); new spell_lady_vashj_remove_tainted_cores(); new spell_lady_vashj_summon_sporebat(); From 39ee52f9cb17051d950a351659f728bd05500287 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:03:00 -0300 Subject: [PATCH 123/340] chore: fix sql (#17365) --- data/sql/updates/db_world/2023_09_26_02.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/sql/updates/db_world/2023_09_26_02.sql b/data/sql/updates/db_world/2023_09_26_02.sql index fc823837d2874a..5d9b41a93fbf4a 100644 --- a/data/sql/updates/db_world/2023_09_26_02.sql +++ b/data/sql/updates/db_world/2023_09_26_02.sql @@ -1,5 +1,5 @@ -- DB update 2023_09_26_01 -> 2023_09_26_02 -- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual -DELETE FROM acore_world.spell_script_names WHERE spell_id = 29172; -INSERT INTO acore_world.spell_script_names (spell_id, ScriptName) VALUES +DELETE FROM `spell_script_names` WHERE `spell_id` = 29172; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29172, 'spell_midsummer_ribbon_pole_visual'); From 4b85e3ed98c674fbb165bc9a5c24a6514cbb7d0d Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 27 Sep 2023 01:07:04 +0200 Subject: [PATCH 124/340] refactor(Scripts/SSC): Fathomlord Karathress boss script updated (#17079) --- .../updates/pending_db_world/fathomguards.sql | 21 + .../boss_fathomlord_karathress.cpp | 536 +++++++++++++++--- .../SerpentShrine/instance_serpent_shrine.cpp | 16 + .../SerpentShrine/serpent_shrine.h | 5 + 4 files changed, 489 insertions(+), 89 deletions(-) create mode 100644 data/sql/updates/pending_db_world/fathomguards.sql diff --git a/data/sql/updates/pending_db_world/fathomguards.sql b/data/sql/updates/pending_db_world/fathomguards.sql new file mode 100644 index 00000000000000..0cb4856fb06d41 --- /dev/null +++ b/data/sql/updates/pending_db_world/fathomguards.sql @@ -0,0 +1,21 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (22486, 22487); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22091, 22486, 22487); +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`, `event_param6`, `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 +(22091, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3000, 3000, 0, 0, 11, 38296, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Spitfire Totem - In Combat - Cast Attack'), +(22091, 0, 1, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 0, 9, 21965, 0, 100, 1, 0, 0, 0, 0, 'Spitfire Totem - On Death - Do Action on Fathom-Guard Tidalvess'), +(22486, 0, 0, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 223, 2, 0, 0, 0, 0, 0, 9, 21965, 0, 100, 1, 0, 0, 0, 0, 'Greater Earthbind Totem - On Death - Do Action on Fathom-Guard Tidalvess'), +(22487, 0, 0, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 223, 3, 0, 0, 0, 0, 0, 9, 21965, 0, 100, 1, 0, 0, 0, 0, 'Greater Poison Cleansing Totem - On Death - Do Action on Fathom-Guard Tidalvess'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21964, 21965, 21966) AND `source_type` = 0; + +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'boss_fathomguard_caribdis' WHERE `entry` = 21964; +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'boss_fathomguard_tidalvess' WHERE `entry` = 21965; +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'boss_fathomguard_sharkkis' WHERE `entry` = 21966; + +DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (22091, 22486, 22487); +INSERT INTO `creature_template_movement` (`CreatureId`, `Flight`, `Rooted`) VALUES +(22091, 1, 1), +(22486, 1, 1), +(22487, 1, 1); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index ef979b2c9296d9..832a11dcf6419e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "serpent_shrine.h" +#include "TaskScheduler.h" enum Talk { @@ -32,26 +33,41 @@ enum Talk enum Spells { + //Fathomlord Karathress SPELL_CATACLYSMIC_BOLT = 38441, SPELL_SEAR_NOVA = 38445, SPELL_ENRAGE = 24318, - SPELL_BLESSING_OF_THE_TIDES = 38449 + SPELL_BLESSING_OF_THE_TIDES = 38449, + //Fathomguard Sharkkis + SPELL_HURL_TRIDENT = 38374, + SPELL_LEECHING_THROW = 29436, + SPELL_MULTI_TOSS = 38366, + SPELL_SUMMON_FATHOM_SPOREBAT = 38431, + SPELL_SUMMON_FATHOM_LURKER = 38433, + SPELL_THE_BEAST_WITHIN = 38373, + SPELL_BESTIAL_WRATH = 38371, + SPELL_POWER_OF_SHARKKIS = 38455, + //Fathomguard Tidalvess + SPELL_FROST_SHOCK = 38234, + SPELL_EARTHBIND_TOTEM = 38304, + SPELL_POISON_CLEANSING_TOTEM = 38306, + SPELL_SPITFIRE_TOTEM = 38236, + SPELL_POWER_OF_TIDALVESS = 38452, + //Fathomguard Caribdis + SPELL_SUMMON_CYCLONE = 38337, + SPELL_WATER_BOLT_VOLLEY = 38335, + SPELL_TIDAL_SURGE = 38358, + SPELL_HEALING_WAVE = 38330, + SPELL_POWER_OF_CARIBDIS = 38451, + //Spitfire Totem + SPELL_ATTACK = 38296 }; enum Misc { MAX_ADVISORS = 3, - NPC_FATHOM_GUARD_CARIBDIS = 21964, - NPC_FATHOM_GUARD_TIDALVESS = 21965, - NPC_FATHOM_GUARD_SHARKKIS = 21966, NPC_SEER_OLUM = 22820, GO_CAGE = 185952, - - EVENT_SPELL_CATACLYSMIC_BOLT = 1, - EVENT_SPELL_ENRAGE = 2, - EVENT_SPELL_SEAR_NOVA = 3, - EVENT_HEALTH_CHECK = 4, - EVENT_KILL_TALK = 5 }; const Position advisorsPosition[MAX_ADVISORS + 2] = @@ -63,124 +79,463 @@ const Position advisorsPosition[MAX_ADVISORS + 2] = {457.37f, -544.71f, -7.54f, 0.00f} }; -class boss_fathomlord_karathress : public CreatureScript +struct boss_fathomlord_karathress : public BossAI { -public: - boss_fathomlord_karathress() : CreatureScript("boss_fathomlord_karathress") { } + boss_fathomlord_karathress(Creature* creature) : BossAI(creature, DATA_FATHOM_LORD_KARATHRESS) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } - CreatureAI* GetAI(Creature* creature) const override + void Reset() override { - return GetSerpentShrineAI(creature); + BossAI::Reset(); + _recentlySpoken = false; + + me->SummonCreature(NPC_FATHOM_GUARD_TIDALVESS, advisorsPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); + me->SummonCreature(NPC_FATHOM_GUARD_SHARKKIS, advisorsPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); + me->SummonCreature(NPC_FATHOM_GUARD_CARIBDIS, advisorsPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); + + ScheduleHealthCheckEvent(75, [&]{ + for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr) + { + if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr)) + { + if (summon->GetMaxHealth() > 500000) + { + summon->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); + } + } + } + if (me->HasAura(SPELL_BLESSING_OF_THE_TIDES)) + { + Talk(SAY_GAIN_BLESSING); + } + }); } - struct boss_fathomlord_karathressAI : public BossAI + void JustSummoned(Creature* summon) override { - boss_fathomlord_karathressAI(Creature* creature) : BossAI(creature, DATA_FATHOM_LORD_KARATHRESS) + summons.Summon(summon); + if (summon->GetEntry() == NPC_SEER_OLUM) { + summon->SetWalk(true); + summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS + 1], false); } + } + + void SummonedCreatureDies(Creature* summon, Unit*) override + { + summons.Despawn(summon); + if (summon->GetEntry() == NPC_FATHOM_GUARD_TIDALVESS) + Talk(SAY_GAIN_ABILITY1); + if (summon->GetEntry() == NPC_FATHOM_GUARD_SHARKKIS) + Talk(SAY_GAIN_ABILITY2); + if (summon->GetEntry() == NPC_FATHOM_GUARD_CARIBDIS) + Talk(SAY_GAIN_ABILITY3); + } - void Reset() override + void KilledUnit(Unit* /*victim*/) override + { + if (!_recentlySpoken) { - BossAI::Reset(); + Talk(SAY_SLAY); + _recentlySpoken = true; + } + scheduler.Schedule(6s, [this](TaskContext) + { + _recentlySpoken = false; + }); + } - me->SummonCreature(NPC_FATHOM_GUARD_TIDALVESS, advisorsPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_SHARKKIS, advisorsPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_CARIBDIS, advisorsPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); + void JustDied(Unit* killer) override + { + Talk(SAY_DEATH); + BossAI::JustDied(killer); + me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS], TEMPSUMMON_TIMED_DESPAWN, 3600000); + if (GameObject* gobject = me->FindNearestGameObject(GO_CAGE, 100.0f)) + { + gobject->SetGoState(GO_STATE_ACTIVE); } + } + + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + Talk(SAY_AGGRO); - void JustSummoned(Creature* summon) override + instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard) { + fathomguard->SetInCombatWithZone(); + }); + + scheduler.Schedule(10s, [this](TaskContext context) { - summons.Summon(summon); - if (summon->GetEntry() == NPC_SEER_OLUM) + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 50.0f, true))) { - summon->SetWalk(true); - summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS + 1], false); + me->CastSpell(target, SPELL_CATACLYSMIC_BOLT); } - } + context.Repeat(6s); + }).Schedule(25s, [this](TaskContext context) + { + DoCastSelf(SPELL_SEAR_NOVA); + context.Repeat(20s, 40s); + }).Schedule(10min, [this](TaskContext) + { + DoCastSelf(SPELL_ENRAGE, true); + }); + } +private: + bool _recentlySpoken; +}; + +struct LeechingThrowSelector +{ +public: + explicit LeechingThrowSelector(WorldObject const* source) : _source(source) { } + + bool operator() (Unit* unit) const + { + return unit->getPowerType() == POWER_MANA && _source->GetDistance(unit) < 50.0f; + } +private: + WorldObject const* _source; +}; - void SummonedCreatureDies(Creature* summon, Unit*) override +struct boss_fathomguard_sharkkis : public ScriptedAI +{ + boss_fathomguard_sharkkis(Creature* creature) : ScriptedAI(creature), summons(creature) + { + summons.clear(); + + _instance = creature->GetInstanceScript(); + + _scheduler.SetValidator([this] { - summons.Despawn(summon); - if (summon->GetEntry() == NPC_FATHOM_GUARD_TIDALVESS) - Talk(SAY_GAIN_ABILITY1); - if (summon->GetEntry() == NPC_FATHOM_GUARD_SHARKKIS) - Talk(SAY_GAIN_ABILITY2); - if (summon->GetEntry() == NPC_FATHOM_GUARD_CARIBDIS) - Talk(SAY_GAIN_ABILITY3); - } + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + SummonList summons; + + void Reset() override + { + _scheduler.CancelAll(); + + summons.DespawnAll(); + } + + void JustSummoned(Creature* summon) override + { + summon->SetInCombatWithZone(); + summons.Summon(summon); + } - void KilledUnit(Unit* /*victim*/) override + void JustEngagedWith(Unit* /*who*/) override + { + _scheduler.Schedule(2500ms, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_HURL_TRIDENT); + context.Repeat(5s); + }).Schedule(20650ms, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_MULTI_TOSS); + context.Repeat(12150ms, 26350ms); + }).Schedule(6050ms, [this](TaskContext context) { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, LeechingThrowSelector(me))) { - Talk(SAY_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); + me->CastSpell(target, SPELL_LEECHING_THROW); } + context.Repeat(6050ms, 22250ms); + }).Schedule(41250ms, [this](TaskContext context) + { + DoCastSelf(SPELL_THE_BEAST_WITHIN); + summons.DoForAllSummons([&](WorldObject* summon) + { + me->CastSpell(summon->ToCreature(), SPELL_BESTIAL_WRATH, true); + }); + context.Repeat(39950ms, 46050ms); + }).Schedule(14550ms, [this](TaskContext context) + { + DoCastSelf(urand(0, 1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT); + context.Repeat(30300ms); + }); + } + + void JustDied(Unit* /*killer*/) override + { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS); } + } - void JustDied(Unit* killer) override + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) { - Talk(SAY_DEATH); - BossAI::JustDied(killer); - me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS], TEMPSUMMON_TIMED_DESPAWN, 3600000); - if (GameObject* gobject = me->FindNearestGameObject(GO_CAGE, 100.0f)) - gobject->SetGoState(GO_STATE_ACTIVE); + return; } - void JustEngagedWith(Unit* who) override + _scheduler.Update(diff); + + DoMeleeAttackIfReady(); + } + +private: + TaskScheduler _scheduler; + InstanceScript* _instance; +}; + +enum NPCTotems +{ + NPC_SPITFIRE_TOTEM = 22091, + NPC_GREATER_EARTHBIND_TOTEM = 22486, + NPC_GREATER_POISON_CLEANSING_TOTEM = 22487 +}; + +enum TidalActions +{ + ACTION_REMOVE_SPITFIRE = 1, + ACTION_REMOVE_EARTHBIND = 2, + ACTION_REMOVE_CLEANSING = 3 +}; + +enum TotemChoice +{ + SPITFIRE = 1, + EARTHBIND = 2, + CLEANSING = 3 +}; + +struct boss_fathomguard_tidalvess : public ScriptedAI +{ + boss_fathomguard_tidalvess(Creature* creature) : ScriptedAI(creature), summons(creature) + { + _instance = creature->GetInstanceScript(); + + _scheduler.SetValidator([this] { - BossAI::JustEngagedWith(who); - Talk(SAY_AGGRO); - me->CallForHelp(10.0f); + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + SummonList summons; + + std::list entryList; + + void Reset() override + { + _scheduler.CancelAll(); + _choice = 0; + + summons.DespawnAll(); + + entryList.clear(); + + entryList = {NPC_SPITFIRE_TOTEM, NPC_GREATER_EARTHBIND_TOTEM, NPC_GREATER_POISON_CLEANSING_TOTEM}; + } - events.ScheduleEvent(EVENT_SPELL_CATACLYSMIC_BOLT, 10000); - events.ScheduleEvent(EVENT_SPELL_ENRAGE, 600000); - events.ScheduleEvent(EVENT_SPELL_SEAR_NOVA, 25000); - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + summon->Attack(me->GetVictim(), false); + summon->SetInCombatWithZone(); + } + + void ScheduleRemoval(uint32 entry) + { + std::chrono::seconds timer = 0s; + int32 action = 0; + uint8 group = 0; + + switch(entry) + { + case NPC_SPITFIRE_TOTEM: + timer = 59s; + action = ACTION_REMOVE_SPITFIRE; + group = SPITFIRE; + break; + case NPC_GREATER_EARTHBIND_TOTEM: + timer = 44s; + action = ACTION_REMOVE_EARTHBIND; + group = EARTHBIND; + break; + case NPC_GREATER_POISON_CLEANSING_TOTEM: + timer = 29s; + action = ACTION_REMOVE_CLEANSING; + group = CLEANSING; + break; + default: + timer = 29s; } + _totemScheduler.Schedule(timer, group, [this, action](TaskContext) + { + me->AI()->DoAction(action); + }); + } - void UpdateAI(uint32 diff) override + void DoAction(int32 action) override + { + switch (action) { - if (!UpdateVictim()) + case ACTION_REMOVE_SPITFIRE: + _totemScheduler.CancelGroup(SPITFIRE); + entryList.push_back(NPC_SPITFIRE_TOTEM); + break; + case ACTION_REMOVE_EARTHBIND: + _totemScheduler.CancelGroup(EARTHBIND); + entryList.push_back(NPC_GREATER_EARTHBIND_TOTEM); + break; + case ACTION_REMOVE_CLEANSING: + _totemScheduler.CancelGroup(CLEANSING); + entryList.push_back(NPC_GREATER_POISON_CLEANSING_TOTEM); + break; + default: return; + } + } - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) + void SummonTotem(uint32 entry) + { + switch(entry) + { + case NPC_SPITFIRE_TOTEM: + DoCastSelf(SPELL_SPITFIRE_TOTEM); + break; + case NPC_GREATER_EARTHBIND_TOTEM: + DoCastSelf(SPELL_EARTHBIND_TOTEM); + break; + case NPC_GREATER_POISON_CLEANSING_TOTEM: + DoCastSelf(SPELL_POISON_CLEANSING_TOTEM); + break; + default: return; + } + } - switch (events.ExecuteEvent()) + void JustEngagedWith(Unit* /*who*/) override + { + _scheduler.Schedule(10900ms, [this](TaskContext context) + { + DoCastVictim(SPELL_FROST_SHOCK); + context.Repeat(10900ms, 14700ms); + }).Schedule(15800ms, [this](TaskContext context) + { + if (entryList.size() != 0) //don't summon when all totems are up { - case EVENT_SPELL_ENRAGE: - me->CastSpell(me, SPELL_ENRAGE, true); - break; - case EVENT_SPELL_CATACLYSMIC_BOLT: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 50.0f, true))) - me->CastSpell(target, SPELL_CATACLYSMIC_BOLT, false); - events.ScheduleEvent(EVENT_SPELL_CATACLYSMIC_BOLT, 6000); - break; - case EVENT_SPELL_SEAR_NOVA: - me->CastSpell(me, SPELL_SEAR_NOVA, false); - events.ScheduleEvent(EVENT_SPELL_SEAR_NOVA, 20000 + urand(0, 20000)); - break; - case EVENT_HEALTH_CHECK: - if (me->HealthBelowPct(76)) - { - for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr) - if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr)) - if (summon->GetMaxHealth() > 500000) - summon->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); - - if (me->HasAura(SPELL_BLESSING_OF_THE_TIDES)) - Talk(SAY_GAIN_BLESSING); - break; - } - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); - break; + uint32 totemEntry = entryList.front(); + entryList.pop_front(); + SummonTotem(totemEntry); + ScheduleRemoval(totemEntry); } + context.Repeat(13350ms, 24250ms); + }); + } - DoMeleeAttackIfReady(); + void JustDied(Unit* /*killer*/) override + { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS); } - }; + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff); + _totemScheduler.Update(diff); + + DoMeleeAttackIfReady(); + } + +private: + TaskScheduler _scheduler; + TaskScheduler _totemScheduler; + InstanceScript* _instance; + uint8 _choice; +}; + +struct boss_fathomguard_caribdis : public ScriptedAI +{ + boss_fathomguard_caribdis(Creature* creature) : ScriptedAI(creature), summons(creature) + { + _instance = creature->GetInstanceScript(); + + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + SummonList summons; + + void Reset() override + { + _scheduler.CancelAll(); + + summons.DespawnAll(); + } + + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + } + + void JustEngagedWith(Unit* /*who*/) override + { + _scheduler.Schedule(27900ms, [this](TaskContext context) + { + DoCastSelf(SPELL_WATER_BOLT_VOLLEY); + context.Repeat(6050ms, 19750ms); + }).Schedule(23050ms, [this](TaskContext context) + { + DoCastSelf(SPELL_TIDAL_SURGE); + context.Repeat(24250ms, 33250ms); + }).Schedule(15750ms, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_SUMMON_CYCLONE); + context.Repeat(47250ms, 51550ms); + }).Schedule(20s, [this](TaskContext context) + { + if (Unit* target = DoSelectLowestHpFriendly(60.0f, 150000)) + { + DoCast(target, SPELL_HEALING_WAVE); + } + context.Repeat(20s); + }); + } + + void JustDied(Unit* /*killer*/) override + { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS); + } + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff); + + DoMeleeAttackIfReady(); + } + +private: + TaskScheduler _scheduler; + InstanceScript* _instance; }; class spell_karathress_power_of_caribdis : public SpellScriptLoader @@ -213,6 +568,9 @@ class spell_karathress_power_of_caribdis : public SpellScriptLoader void AddSC_boss_fathomlord_karathress() { - new boss_fathomlord_karathress(); + RegisterSerpentShrineAI(boss_fathomlord_karathress); + RegisterSerpentShrineAI(boss_fathomguard_sharkkis); + RegisterSerpentShrineAI(boss_fathomguard_tidalvess); + RegisterSerpentShrineAI(boss_fathomguard_caribdis); new spell_karathress_power_of_caribdis(); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index d22cd4c470dc59..90d4c5e6c3d11b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -29,6 +29,20 @@ DoorData const doorData[] = { GO_COILFANG_BRIDGE3, DATA_BRIDGE_EMERGED, DOOR_TYPE_PASSAGE } }; +ObjectData const creatureData[] = +{ + { NPC_FATHOM_LORD_KARATHRESS, DATA_FATHOM_LORD_KARATHRESS }, + { 0, 0 } +}; + +MinionData const minionData[] = +{ + { NPC_FATHOM_GUARD_SHARKKIS, DATA_FATHOM_LORD_KARATHRESS }, + { NPC_FATHOM_GUARD_TIDALVESS, DATA_FATHOM_LORD_KARATHRESS }, + { NPC_FATHOM_GUARD_CARIBDIS, DATA_FATHOM_LORD_KARATHRESS }, + { 0, 0, } +}; + class instance_serpent_shrine : public InstanceMapScript { public: @@ -45,6 +59,8 @@ class instance_serpent_shrine : public InstanceMapScript SetHeaders(DataHeader); SetBossNumber(MAX_ENCOUNTERS); LoadDoorData(doorData); + LoadObjectData(creatureData, nullptr); + LoadMinionData(minionData); AliveKeepersCount = 0; } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index 3963cb6c2494bf..8e10302b953451 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -53,8 +53,13 @@ enum SSNPCs NPC_THE_LURKER_BELOW = 21217, NPC_LEOTHERAS_THE_BLIND = 21215, NPC_CYCLONE_KARATHRESS = 22104, + NPC_FATHOM_LORD_KARATHRESS = 21214, NPC_LADY_VASHJ = 21212, + NPC_FATHOM_GUARD_SHARKKIS = 21966, + NPC_FATHOM_GUARD_TIDALVESS = 21965, + NPC_FATHOM_GUARD_CARIBDIS = 21964, + NPC_COILFANG_SHATTERER = 21301, NPC_COILFANG_PRIESTESS = 21220, From 0db63275c8a5b9daae46a507833ebff2d2e05e25 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Sep 2023 23:08:12 +0000 Subject: [PATCH 125/340] chore(DB): import pending files Referenced commit(s): 4b85e3ed98c674fbb165bc9a5c24a6514cbb7d0d --- .../fathomguards.sql => db_world/2023_09_26_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/fathomguards.sql => db_world/2023_09_26_03.sql} (97%) diff --git a/data/sql/updates/pending_db_world/fathomguards.sql b/data/sql/updates/db_world/2023_09_26_03.sql similarity index 97% rename from data/sql/updates/pending_db_world/fathomguards.sql rename to data/sql/updates/db_world/2023_09_26_03.sql index 0cb4856fb06d41..29deae6229ab30 100644 --- a/data/sql/updates/pending_db_world/fathomguards.sql +++ b/data/sql/updates/db_world/2023_09_26_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_26_02 -> 2023_09_26_03 -- UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (22486, 22487); From 2e77820153b12f40738a7950b6a87c1fa2281be8 Mon Sep 17 00:00:00 2001 From: samsam1993 <136090818+samsam1993@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:45:07 +0300 Subject: [PATCH 126/340] fix(DB/reference_loot_template): Corrected Shadow Labyrinth gem drops (#17190) * fix(DB/reference_loot_template): Corrected Shadow Labyrinth gem drops Heroic Shadow Labyrinth bosses dropped incorrect gem. They had a chance to drop Glinting Fire Opal, but this fix corrects them to drop Etched Fire Opal instead. * Update data/sql/updates/pending_db_world/SL_gem_loot_fix.sql * Update data/sql/updates/pending_db_world/SL_gem_loot_fix.sql --------- Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> --- data/sql/updates/pending_db_world/SL_gem_loot_fix.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/SL_gem_loot_fix.sql diff --git a/data/sql/updates/pending_db_world/SL_gem_loot_fix.sql b/data/sql/updates/pending_db_world/SL_gem_loot_fix.sql new file mode 100644 index 00000000000000..f7e3a95b492998 --- /dev/null +++ b/data/sql/updates/pending_db_world/SL_gem_loot_fix.sql @@ -0,0 +1,2 @@ +-- +UPDATE `reference_loot_template` SET `Item` = 30559, `Comment` = 'Etched Fire Opal' WHERE `Entry` = 43010 AND `Item` = 30556; From 26c583c24ab7dbbf1fecf3dcd737c1ad543c8b33 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Sep 2023 08:46:16 +0000 Subject: [PATCH 127/340] chore(DB): import pending files Referenced commit(s): 2e77820153b12f40738a7950b6a87c1fa2281be8 --- .../SL_gem_loot_fix.sql => db_world/2023_09_27_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/SL_gem_loot_fix.sql => db_world/2023_09_27_00.sql} (74%) diff --git a/data/sql/updates/pending_db_world/SL_gem_loot_fix.sql b/data/sql/updates/db_world/2023_09_27_00.sql similarity index 74% rename from data/sql/updates/pending_db_world/SL_gem_loot_fix.sql rename to data/sql/updates/db_world/2023_09_27_00.sql index f7e3a95b492998..f7627aad79a702 100644 --- a/data/sql/updates/pending_db_world/SL_gem_loot_fix.sql +++ b/data/sql/updates/db_world/2023_09_27_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_26_03 -> 2023_09_27_00 -- UPDATE `reference_loot_template` SET `Item` = 30559, `Comment` = 'Etched Fire Opal' WHERE `Entry` = 43010 AND `Item` = 30556; From 4ef15158b48d738c9941cc5753a8d6c771e31082 Mon Sep 17 00:00:00 2001 From: Sven Bledt Date: Wed, 27 Sep 2023 17:10:42 +0200 Subject: [PATCH 128/340] fix(DB/Vendor): NPC Arcanist Ivrenne remove Heirlooms (#17371) * fix(DB): NPC Arcanist Ivrenne Remove the Heirlooms from Arcanist Ivrenne. Information from wowhead: https://www.wowhead.com/wotlk/guide/heirlooms-overview * fix(DB): follow the standards --- data/sql/updates/pending_db_world/npc_vendor_fix.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/npc_vendor_fix.sql diff --git a/data/sql/updates/pending_db_world/npc_vendor_fix.sql b/data/sql/updates/pending_db_world/npc_vendor_fix.sql new file mode 100644 index 00000000000000..59543e450cf99e --- /dev/null +++ b/data/sql/updates/pending_db_world/npc_vendor_fix.sql @@ -0,0 +1 @@ +DELETE FROM `npc_vendor` WHERE `entry` = 31580 AND `item` IN(42943, 42944, 42945, 42946, 42947, 42948, 42949, 42950, 42951, 42952, 42984, 42985, 42991, 42992, 48677, 48683, 48685, 48687, 48689, 48691, 48716, 48718); From 85297f3b956c3083926f4ae39c4afcae82f62a84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Sep 2023 15:11:55 +0000 Subject: [PATCH 129/340] chore(DB): import pending files Referenced commit(s): 4ef15158b48d738c9941cc5753a8d6c771e31082 --- .../npc_vendor_fix.sql => db_world/2023_09_27_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/npc_vendor_fix.sql => db_world/2023_09_27_01.sql} (83%) diff --git a/data/sql/updates/pending_db_world/npc_vendor_fix.sql b/data/sql/updates/db_world/2023_09_27_01.sql similarity index 83% rename from data/sql/updates/pending_db_world/npc_vendor_fix.sql rename to data/sql/updates/db_world/2023_09_27_01.sql index 59543e450cf99e..78786bdecc6bb7 100644 --- a/data/sql/updates/pending_db_world/npc_vendor_fix.sql +++ b/data/sql/updates/db_world/2023_09_27_01.sql @@ -1 +1,2 @@ +-- DB update 2023_09_27_00 -> 2023_09_27_01 DELETE FROM `npc_vendor` WHERE `entry` = 31580 AND `item` IN(42943, 42944, 42945, 42946, 42947, 42948, 42949, 42950, 42951, 42952, 42984, 42985, 42991, 42992, 48677, 48683, 48685, 48687, 48689, 48691, 48716, 48718); From dcf5816f5dcd97928ba973c6f48acd34009d3325 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 27 Sep 2023 21:45:00 +0200 Subject: [PATCH 130/340] fix(Scripts/SSC): Morogrim Tidewalker now summons the water globules again (#17373) change to bigint --- .../SerpentShrine/boss_morogrim_tidewalker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 34411df6a33aa6..e16d84e75b6dcb 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -112,7 +112,7 @@ struct boss_morogrim_tidewalker : public BossAI else { Talk(EMOTE_WATERY_GLOBULES); - for (uint8 waterGlobuleId : waterGlobuleIds) + for (uint32 waterGlobuleId : waterGlobuleIds) { DoCastSelf(waterGlobuleId, true); } From b80aaebb5aff3d8c4ad80b89ccf1c7a932a5385c Mon Sep 17 00:00:00 2001 From: Sven Bledt Date: Wed, 27 Sep 2023 22:05:28 +0200 Subject: [PATCH 131/340] fix(Core/Quest): AllowableRaces to uint32 for custom Racemasks (#17372) * fix(Core/Quest): AllowableRaces to uint32 for custom Racemasks * Update data/sql/updates/pending_db_world/uint32_quest_template.sql * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- data/sql/updates/pending_db_world/uint32_quest_template.sql | 2 ++ src/server/game/Quests/QuestDef.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/uint32_quest_template.sql diff --git a/data/sql/updates/pending_db_world/uint32_quest_template.sql b/data/sql/updates/pending_db_world/uint32_quest_template.sql new file mode 100644 index 00000000000000..081c2646cfa341 --- /dev/null +++ b/data/sql/updates/pending_db_world/uint32_quest_template.sql @@ -0,0 +1,2 @@ +-- +ALTER TABLE `quest_template` MODIFY COLUMN `AllowableRaces` INT UNSIGNED NOT NULL DEFAULT 0; diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index d14ddb3c33d698..aba9f1509f1422 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -38,7 +38,7 @@ Quest::Quest(Field* questRecord) Type = questRecord[5].Get(); SuggestedPlayers = questRecord[6].Get(); TimeAllowed = questRecord[7].Get(); - AllowableRaces = questRecord[8].Get(); + AllowableRaces = questRecord[8].Get(); RequiredFactionId1 = questRecord[9].Get(); RequiredFactionId2 = questRecord[10].Get(); RequiredFactionValue1 = questRecord[11].Get(); From e9b888fda7c5f19805fb88f429de7067c3b6e294 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Sep 2023 20:06:46 +0000 Subject: [PATCH 132/340] chore(DB): import pending files Referenced commit(s): b80aaebb5aff3d8c4ad80b89ccf1c7a932a5385c --- .../uint32_quest_template.sql => db_world/2023_09_27_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/uint32_quest_template.sql => db_world/2023_09_27_02.sql} (68%) diff --git a/data/sql/updates/pending_db_world/uint32_quest_template.sql b/data/sql/updates/db_world/2023_09_27_02.sql similarity index 68% rename from data/sql/updates/pending_db_world/uint32_quest_template.sql rename to data/sql/updates/db_world/2023_09_27_02.sql index 081c2646cfa341..503859d21009f5 100644 --- a/data/sql/updates/pending_db_world/uint32_quest_template.sql +++ b/data/sql/updates/db_world/2023_09_27_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_27_01 -> 2023_09_27_02 -- ALTER TABLE `quest_template` MODIFY COLUMN `AllowableRaces` INT UNSIGNED NOT NULL DEFAULT 0; From f44e658342f727d1ed5034657c74128724d7cd28 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:31:08 +0200 Subject: [PATCH 133/340] fix(Scripts/Karazhan): allow Aran to cast pyroblast also when interrupted (#17375) * initial * add scheduling --- .../EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index df45f50f1cae26..7d7239de874719 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -382,9 +382,14 @@ struct boss_shade_of_aran : public BossAI me->SetReactState(REACT_AGGRESSIVE); me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); DoCastSelf(SPELL_POTION, false); - DoCastSelf(SPELL_AOE_PYROBLAST, false); _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinking = false; + _drinkScheduler.Schedule(1s, [this](TaskContext) + { + DoCastSelf(SPELL_AOE_PYROBLAST, false); + }).Schedule(3s, [this](TaskContext) + { + _drinking = false; + }); } else { context.Repeat(500ms); From 57841f7213ba40cfd7adab381b5e12dcb5e3385e Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Wed, 27 Sep 2023 19:39:17 -0300 Subject: [PATCH 134/340] fix(Scripts/Karazhan): Update Aran script to use boss states (#17376) --- .../EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 7d7239de874719..e8413ef4858f94 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -198,8 +198,7 @@ struct boss_shade_of_aran : public BossAI void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - - instance->SetData(DATA_ARAN, DONE); + _JustDied(); if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) { @@ -210,12 +209,9 @@ struct boss_shade_of_aran : public BossAI void JustEngagedWith(Unit* /*who*/) override { + _JustEngagedWith(); Talk(SAY_AGGRO); - instance->SetData(DATA_ARAN, IN_PROGRESS); - - DoZoneInCombat(); - //handle timed closing door scheduler.Schedule(15s, [this](TaskContext) { From 52c7edaa5cacf95dc868e8a035a694fa096042d3 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 28 Sep 2023 02:38:29 -0300 Subject: [PATCH 135/340] fix(Scripts/Karazhan): Clear Netherspite portal targets on transition (#17377) --- .../EasternKingdoms/Karazhan/boss_netherspite.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 0adb88ffbc9a60..78c548127e7cf7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -101,6 +101,12 @@ struct boss_netherspite : public BossAI BossAI::Reset(); berserk = false; HandleDoors(true); + + for (int i = 0; i < 3; ++i) + { + PortalGUID[i].Clear(); + BeamTarget[i].Clear(); + } } void SummonPortals() @@ -233,6 +239,12 @@ struct boss_netherspite : public BossAI summons.DespawnEntry(id); } + for (int i = 0; i < 3; ++i) + { + PortalGUID[i].Clear(); + BeamTarget[i].Clear(); + } + scheduler.Schedule(30s, [this](TaskContext) { SwitchToPortalPhase(); From 29af6cc88662ab2565bdcedcf60e12f0cc87cecf Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:48:40 +0200 Subject: [PATCH 136/340] fix(Scripts/Magtheridon): make the timers of Quake and Blast Nova independent from each other (#17364) * initial * fix timers * add delay for duration * Update boss_magtheridon.cpp 10s --- .../MagtheridonsLair/boss_magtheridon.cpp | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index c9602b38b33c8c..baee4273231504 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -166,7 +166,7 @@ struct boss_magtheridon : public BossAI { me->CastCustomSpell(SPELL_BLAZE, SPELLVALUE_MAX_TARGETS, 1); context.Repeat(11s, 39s); - }).Schedule(40s, [this](TaskContext context) + }).Schedule(28300ms, [this](TaskContext context) { DoCastSelf(SPELL_QUAKE); _castingQuake = true; @@ -175,29 +175,33 @@ struct boss_magtheridon : public BossAI me->SetOrientation(me->GetAngle(me->GetVictim())); me->SetTarget(ObjectGuid::Empty); scheduler.DelayAll(6999ms); - scheduler.Schedule(7s, [this](TaskContext /*context*/) + scheduler.Schedule(7s, [this](TaskContext) { _castingQuake = false; me->SetReactState(REACT_AGGRESSIVE); me->GetMotionMaster()->MoveChase(me->GetVictim()); - DoCastSelf(SPELL_BLAST_NOVA); + }); + context.Repeat(56300ms, 64300ms); + }).Schedule(55650ms, [this](TaskContext context) + { + DoCastSelf(SPELL_BLAST_NOVA); + scheduler.DelayAll(10s); - _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) - { - if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) - { - Talk(SAY_BANISH); - me->InterruptNonMeleeSpells(true); - scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - } - else - context.Repeat(50ms); - }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) + { + if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) { - _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - }); + Talk(SAY_BANISH); + me->InterruptNonMeleeSpells(true); + scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); + } + else + context.Repeat(50ms); + }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + { + _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); }); - context.Repeat(53s, 56s); + context.Repeat(54350ms, 55400ms); }).Schedule(22min, [this](TaskContext /*context*/) { DoCastSelf(SPELL_BERSERK, true); From 2779833768bbe9967006d6d16888dace05b4bcb6 Mon Sep 17 00:00:00 2001 From: AG <43139552+AGandrup@users.noreply.github.com> Date: Thu, 28 Sep 2023 22:28:28 +0200 Subject: [PATCH 137/340] feat(Core/Grids): Implement visibility notifier (#15919) * Cherry-picked from TrinityCore (unable to find author) --- .../apps/worldserver/worldserver.conf.dist | 25 +- .../Battlegrounds/Zones/BattlegroundAB.cpp | 2 +- .../game/Entities/Creature/Creature.cpp | 18 +- src/server/game/Entities/Object/Object.cpp | 27 +- src/server/game/Entities/Object/Object.h | 17 +- .../game/Entities/Object/ObjectDefines.h | 5 +- src/server/game/Entities/Player/Player.h | 2 +- .../game/Entities/Player/PlayerUpdates.cpp | 33 +- src/server/game/Entities/Unit/Unit.cpp | 169 +--- src/server/game/Entities/Unit/Unit.h | 10 +- src/server/game/Grids/Grid.h | 6 + src/server/game/Grids/GridStates.cpp | 65 ++ src/server/game/Grids/GridStates.h | 56 ++ src/server/game/Grids/NGrid.cpp | 29 + src/server/game/Grids/NGrid.h | 69 +- .../game/Grids/Notifiers/GridNotifiers.cpp | 110 ++- .../game/Grids/Notifiers/GridNotifiers.h | 45 +- .../game/Grids/Notifiers/GridNotifiersImpl.h | 3 - src/server/game/Grids/ObjectGridLoader.cpp | 40 + src/server/game/Grids/ObjectGridLoader.h | 17 + src/server/game/Instances/InstanceSaveMgr.cpp | 1 + src/server/game/Maps/Map.cpp | 854 ++++++++++++++---- src/server/game/Maps/Map.h | 67 +- src/server/game/Maps/MapInstanced.cpp | 10 +- src/server/game/Maps/MapInstanced.h | 17 +- src/server/game/Maps/MapMgr.cpp | 9 +- src/server/game/Maps/MapMgr.h | 10 + .../game/Spells/Auras/SpellAuraEffects.cpp | 9 +- src/server/game/World/IWorld.h | 1 + src/server/game/World/World.cpp | 16 + src/server/game/World/World.h | 8 + src/server/scripts/Events/midsummer.cpp | 2 - .../Outland/TempestKeep/Eye/boss_alar.cpp | 2 - 33 files changed, 1249 insertions(+), 505 deletions(-) create mode 100644 src/server/game/Grids/GridStates.cpp create mode 100644 src/server/game/Grids/GridStates.h create mode 100644 src/server/game/Grids/NGrid.cpp diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 2bef3eb52bc27a..9770e459e6a571 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -939,6 +939,13 @@ ClientCacheVersion = 0 SessionAddDelay = 10000 +# +# GridCleanUpDelay +# Description: Time (in milliseconds) grid clean up delay. +# Default: 300000 - (5 minutes) + +GridCleanUpDelay = 300000 + # # CloseIdleConnections # Description: Automatically close idle connections. @@ -1244,17 +1251,17 @@ Visibility.GroupMode = 1 # Visibility.Distance.Instances # Visibility.Distance.BGArenas # Description: Visibility distance to see other players or gameobjects. -# Visibility on continents on retail ~90 yards. In BG/Arenas ~180. -# For instances default ~120. -# Max limited by active player zone: ~ 333 +# Visibility on continents on retail ~100 yards. In BG/Arenas ~533. +# For instances default ~170. +# Max limited by grid size: 533.33333 # Min limit is max aggro radius (45) * Rate.Creature.Aggro -# Default: 90 - (Visibility.Distance.Continents) -# 120 - (Visibility.Distance.Instances) -# 180 - (Visibility.Distance.BGArenas) +# Default: 100 - (Visibility.Distance.Continents) +# 170 - (Visibility.Distance.Instances) +# 533 - (Visibility.Distance.BGArenas) -Visibility.Distance.Continents = 90 -Visibility.Distance.Instances = 120 -Visibility.Distance.BGArenas = 180 +Visibility.Distance.Continents = 100 +Visibility.Distance.Instances = 170 +Visibility.Distance.BGArenas = 533 # # Visibility.Notify.Period.OnContinents diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 4cc94a60dae84c..0360ea47b5ff00 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -551,6 +551,6 @@ void BattlegroundAB::ApplyPhaseMask() for (auto const& itr : bgPlayerMap) { itr.second->SetPhaseMask(phaseMask, false); - itr.second->UpdateObjectVisibility(true, false); + itr.second->UpdateObjectVisibility(true); } } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 8340fbc72625a4..f64bf3a3e55772 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -365,17 +365,15 @@ void Creature::RemoveCorpse(bool setSpawnTime, bool skipVisibility) //SaveRespawnTime(); } - float x, y, z, o; - GetRespawnPosition(x, y, z, &o); - SetHomePosition(x, y, z, o); - SetPosition(x, y, z, o); - - // xinef: relocate notifier - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - // pussywizard: if corpse was removed during falling then the falling will continue after respawn, so stop falling is such case if (IsFalling()) StopMoving(); + + float x, y, z, o; + GetRespawnPosition(x, y, z, &o); + UpdateAllowedPositionZ(x, y, z); + SetHomePosition(x, y, z, o); + GetMap()->CreatureRelocation(this, x, y, z, o); } /** @@ -2077,9 +2075,7 @@ void Creature::Respawn(bool force) m_respawnedTime = GameTime::GetGameTime().count(); } m_respawnedTime = GameTime::GetGameTime().count(); - // xinef: relocate notifier, fixes npc appearing in corpse position after forced respawn (instead of spawn) - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - UpdateObjectVisibility(false); + UpdateObjectVisibility(); } void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index fef69d6ef3d544..c0584ef005a6e8 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -65,7 +65,7 @@ constexpr float VisibilityDistances[AsUnderlyingType(VisibilityDistanceType::Max VISIBILITY_DISTANCE_SMALL, VISIBILITY_DISTANCE_LARGE, VISIBILITY_DISTANCE_GIGANTIC, - VISIBILITY_DISTANCE_INFINITE + MAX_VISIBILITY_DISTANCE }; Object::Object() : m_PackGUID(sizeof(uint64) + 1) @@ -2922,7 +2922,7 @@ void WorldObject::DestroyForNearbyPlayers() } } -void WorldObject::UpdateObjectVisibility(bool /*forced*/, bool /*fromUpdate*/) +void WorldObject::UpdateObjectVisibility(bool /*forced*/) { //updates object's visibility for nearby players Acore::VisibleChangesNotifier notifier(*this); @@ -2931,28 +2931,7 @@ void WorldObject::UpdateObjectVisibility(bool /*forced*/, bool /*fromUpdate*/) void WorldObject::AddToNotify(uint16 f) { - if (!(m_notifyflags & f)) - if (Unit* u = ToUnit()) - { - if (f & NOTIFY_VISIBILITY_CHANGED) - { - uint32 EVENT_VISIBILITY_DELAY = u->FindMap() ? DynamicVisibilityMgr::GetVisibilityNotifyDelay(u->FindMap()->GetEntry()->map_type) : 1000; - - uint32 diff = getMSTimeDiff(u->m_last_notify_mstime, GameTime::GetGameTimeMS().count()); - if (diff >= EVENT_VISIBILITY_DELAY / 2) - EVENT_VISIBILITY_DELAY /= 2; - else - EVENT_VISIBILITY_DELAY -= diff; - u->m_delayed_unit_relocation_timer = EVENT_VISIBILITY_DELAY; - u->m_last_notify_mstime = GameTime::GetGameTimeMS().count() + EVENT_VISIBILITY_DELAY - 1; - } - else if (f & NOTIFY_AI_RELOCATION) - { - u->m_delayed_unit_ai_notify_timer = u->FindMap() ? DynamicVisibilityMgr::GetAINotifyDelay(u->FindMap()->GetEntry()->map_type) : 500; - } - - m_notifyflags |= f; - } + m_notifyflags |= f; } struct WorldObjectChangeAccumulator diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 8a75f3d87e88c9..adaf92899d8887 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -379,14 +379,23 @@ class MovableMapObject template friend class RandomMovementGenerator; protected: - MovableMapObject() = default; + MovableMapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) + { + _newPosition.Relocate(0.0f, 0.0f, 0.0f, 0.0f); + } private: + Cell _currentCell; [[nodiscard]] Cell const& GetCurrentCell() const { return _currentCell; } void SetCurrentCell(Cell const& cell) { _currentCell = cell; } - Cell _currentCell; - MapObjectCellMoveState _moveState{MAP_OBJECT_CELL_MOVE_NONE}; + MapObjectCellMoveState _moveState; + Position _newPosition; + void SetNewCellPosition(float x, float y, float z, float o) + { + _moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + _newPosition.Relocate(x, y, z, o); + } }; class WorldObject : public Object, public WorldLocation @@ -538,7 +547,7 @@ class WorldObject : public Object, public WorldLocation void GetDeadCreatureListInGrid(std::list& lList, float maxSearchRange, bool alive = false) const; void DestroyForNearbyPlayers(); - virtual void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false); + virtual void UpdateObjectVisibility(bool forced = true); void BuildUpdate(UpdateDataMapType& data_map, UpdatePlayerSet& player_set) override; void GetCreaturesWithEntryInRange(std::list& creatureList, float radius, uint32 entry); diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 55c4826339ab93..5d809c05f58b58 100644 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -28,16 +28,15 @@ #define VISIBILITY_INC_FOR_GOBJECTS 30.0f // pussywizard #define SPELL_SEARCHER_COMPENSATION 30.0f // increase searchers size in case we have large npc near cell border #define TRADE_DISTANCE 11.11f -#define MAX_VISIBILITY_DISTANCE 250.0f // max distance for visible objects, experimental +#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects, experimental #define SIGHT_RANGE_UNIT 50.0f #define MAX_SEARCHER_DISTANCE 150.0f // pussywizard: replace the use of MAX_VISIBILITY_DISTANCE in searchers, because MAX_VISIBILITY_DISTANCE is quite too big for this purpose -#define VISIBILITY_DISTANCE_INFINITE 533.0f #define VISIBILITY_DISTANCE_GIGANTIC 400.0f #define VISIBILITY_DISTANCE_LARGE 200.0f #define VISIBILITY_DISTANCE_NORMAL 100.0f #define VISIBILITY_DISTANCE_SMALL 50.0f #define VISIBILITY_DISTANCE_TINY 25.0f -#define DEFAULT_VISIBILITY_DISTANCE 100.0f // default visible distance, 100 yards on continents +#define DEFAULT_VISIBILITY_DISTANCE VISIBILITY_DISTANCE_NORMAL // default visible distance, 100 yards on continents #define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards #define VISIBILITY_DIST_WINTERGRASP 175.0f #define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index cffcaf7dfb1330..49b85e860c0a16 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2349,7 +2349,7 @@ class Player : public Unit, public GridObject bool IsVisibleGloballyFor(Player const* player) const; void GetInitialVisiblePackets(Unit* target); - void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false) override; + void UpdateObjectVisibility(bool forced = true) override; void UpdateVisibilityForPlayer(bool mapChange = false); void UpdateVisibilityOf(WorldObject* target); void UpdateTriggerVisibility(); diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 4e703b43392d63..17c1319f9a4090 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -412,14 +412,6 @@ void Player::Update(uint32 p_time) SetHasDelayedTeleport(false); TeleportTo(teleportStore_dest, teleportStore_options); } - - if (!IsBeingTeleported() && bRequestForcedVisibilityUpdate) - { - bRequestForcedVisibilityUpdate = false; - UpdateObjectVisibility(true, true); - m_delayed_unit_relocation_timer = 0; - RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); - } } void Player::UpdateMirrorTimers() @@ -1550,23 +1542,13 @@ void Player::UpdateVisibilityForPlayer(bool mapChange) m_seer = this; } - Acore::VisibleNotifier notifierNoLarge( - *this, mapChange, - false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(m_seer, notifierNoLarge, - GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - notifierNoLarge.SendToSelf(); - - Acore::VisibleNotifier notifierLarge( - *this, mapChange, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(m_seer, notifierLarge, GetSightRange()); - notifierLarge.SendToSelf(); - - if (mapChange) - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); + // updates visibility of all objects around point of view for current player + Acore::VisibleNotifier notifier(*this, mapChange); + Cell::VisitAllObjects(m_seer, notifier, GetSightRange()); + notifier.SendToSelf(); // send gathered data } -void Player::UpdateObjectVisibility(bool forced, bool fromUpdate) +void Player::UpdateObjectVisibility(bool forced) { // Prevent updating visibility if player is not in world (example: LoadFromDB sets drunkstate which updates invisibility while player is not in map) if (!IsInWorld()) @@ -1576,11 +1558,6 @@ void Player::UpdateObjectVisibility(bool forced, bool fromUpdate) AddToNotify(NOTIFY_VISIBILITY_CHANGED); else if (!isBeingLoaded()) { - if (!fromUpdate) // pussywizard: - { - bRequestForcedVisibilityUpdate = true; - return; - } Unit::UpdateObjectVisibility(true); UpdateVisibilityForPlayer(); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c7964a1ff91767..9c7d6030bbf9b5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -317,12 +317,6 @@ Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject), m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE); - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - m_last_notify_mstime = 0; - m_delayed_unit_relocation_timer = 0; - m_delayed_unit_ai_notify_timer = 0; - bRequestForcedVisibilityUpdate = false; - m_applyResilience = false; _instantCast = false; @@ -411,32 +405,6 @@ void Unit::Update(uint32 p_time) if (!IsInWorld()) return; - // pussywizard: - if (GetTypeId() != TYPEID_PLAYER || (!ToPlayer()->IsBeingTeleported() && !bRequestForcedVisibilityUpdate)) - { - if (m_delayed_unit_relocation_timer) - { - if (m_delayed_unit_relocation_timer <= p_time) - { - m_delayed_unit_relocation_timer = 0; - //ExecuteDelayedUnitRelocationEvent(); - FindMap()->i_objectsForDelayedVisibility.insert(this); - } - else - m_delayed_unit_relocation_timer -= p_time; - } - if (m_delayed_unit_ai_notify_timer) - { - if (m_delayed_unit_ai_notify_timer <= p_time) - { - m_delayed_unit_ai_notify_timer = 0; - ExecuteDelayedUnitAINotifyEvent(); - } - else - m_delayed_unit_ai_notify_timer -= p_time; - } - } - _UpdateSpells( p_time ); if (CanHaveThreatList() && GetThreatMgr().isNeedUpdateToClient(p_time)) @@ -17524,13 +17492,17 @@ void Unit::SetContestedPvP(Player* attackedPlayer, bool lookForNearContestedGuar player->AddUnitState(UNIT_STATE_ATTACK_PLAYER); player->SetPlayerFlag(PLAYER_FLAGS_CONTESTED_PVP); // call MoveInLineOfSight for nearby contested guards - AddToNotify(NOTIFY_AI_RELOCATION); + Acore::AIRelocationNotifier notifier(*this); + Cell::VisitWorldObjects(this, notifier, GetVisibilityRange()); } - if (!HasUnitState(UNIT_STATE_ATTACK_PLAYER)) + for (Unit* unit : m_Controlled) { - AddUnitState(UNIT_STATE_ATTACK_PLAYER); - // call MoveInLineOfSight for nearby contested guards - AddToNotify(NOTIFY_AI_RELOCATION); + if (!unit->HasUnitState(UNIT_STATE_ATTACK_PLAYER)) + { + unit->AddUnitState(UNIT_STATE_ATTACK_PLAYER); + Acore::AIRelocationNotifier notifier(*unit); + Cell::VisitWorldObjects(this, notifier, GetVisibilityRange()); + } } } @@ -19377,7 +19349,7 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update) } } -void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/) +void Unit::UpdateObjectVisibility(bool forced) { if (!forced) AddToNotify(NOTIFY_VISIBILITY_CHANGED); @@ -19385,8 +19357,7 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/) { WorldObject::UpdateObjectVisibility(true); Acore::AIRelocationNotifier notifier(*this); - float radius = 60.0f; - Cell::VisitAllObjects(this, notifier, radius); + Cell::VisitAllObjects(this, notifier, GetVisibilityRange()); } } @@ -20743,124 +20714,6 @@ bool ConflagrateAuraStateDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time return true; } -void Unit::ExecuteDelayedUnitRelocationEvent() -{ - this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); - if (!this->IsInWorld() || this->IsDuringRemoveFromWorld()) - return; - - if (this->HasSharedVision()) - for (SharedVisionList::const_iterator itr = this->GetSharedVisionList().begin(); itr != this->GetSharedVisionList().end(); ++itr) - if (Player* player = (*itr)) - { - if (player->IsOnVehicle(this) || !player->IsInWorld() || player->IsDuringRemoveFromWorld()) // players on vehicles have their own event executed (due to passenger relocation) - continue; - WorldObject* viewPoint = player; - if (player->m_seer && player->m_seer->IsInWorld()) - viewPoint = player->m_seer; - if (!viewPoint->IsPositionValid() || !player->IsPositionValid()) - continue; - - if (Unit* active = viewPoint->ToUnit()) - { - //if (active->IsVehicle()) // always check original unit here, last notify position is not relocated - // active = player; - - float dx = active->m_last_notify_position.GetPositionX() - active->GetPositionX(); - float dy = active->m_last_notify_position.GetPositionY() - active->GetPositionY(); - float dz = active->m_last_notify_position.GetPositionZ() - active->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(active->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - continue; - - // this will be relocated below sharedvision! - //active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ()); - } - - Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(viewPoint, relocateNoLarge, player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - relocateNoLarge.SendToSelf(); - Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(viewPoint, relocateLarge, MAX_VISIBILITY_DISTANCE); - relocateLarge.SendToSelf(); - } - - if (Player* player = this->ToPlayer()) - { - WorldObject* viewPoint = player; - if (player->m_seer && player->m_seer->IsInWorld()) - viewPoint = player->m_seer; - - if (viewPoint->GetMapId() != player->GetMapId() || !viewPoint->IsPositionValid() || !player->IsPositionValid()) - return; - - if (Unit* active = viewPoint->ToUnit()) - { - if (active->IsVehicle()) - active = player; - - if (!player->GetFarSightDistance()) - { - float dx = active->m_last_notify_position.GetPositionX() - active->GetPositionX(); - float dy = active->m_last_notify_position.GetPositionY() - active->GetPositionY(); - float dz = active->m_last_notify_position.GetPositionZ() - active->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(active->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - return; - - active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ()); - } - } - - Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(viewPoint, relocateNoLarge, player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - relocateNoLarge.SendToSelf(); - - if (!player->GetFarSightDistance()) - { - Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(viewPoint, relocateLarge, MAX_VISIBILITY_DISTANCE); - relocateLarge.SendToSelf(); - } - - this->AddToNotify(NOTIFY_AI_RELOCATION); - } - else if (Creature* unit = this->ToCreature()) - { - if (!unit->IsPositionValid()) - return; - - float dx = unit->m_last_notify_position.GetPositionX() - unit->GetPositionX(); - float dy = unit->m_last_notify_position.GetPositionY() - unit->GetPositionY(); - float dz = unit->m_last_notify_position.GetPositionZ() - unit->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(unit->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - return; - - unit->m_last_notify_position.Relocate(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()); - - Acore::CreatureRelocationNotifier relocate(*unit); - Cell::VisitAllObjects(unit, relocate, unit->GetVisibilityRange() + VISIBILITY_COMPENSATION); - - this->AddToNotify(NOTIFY_AI_RELOCATION); - } -} - -void Unit::ExecuteDelayedUnitAINotifyEvent() -{ - this->RemoveFromNotify(NOTIFY_AI_RELOCATION); - if (!this->IsInWorld() || this->IsDuringRemoveFromWorld()) - return; - - Acore::AIRelocationNotifier notifier(*this); - float radius = 60.0f; - Cell::VisitAllObjects(this, notifier, radius); -} - void Unit::SetInFront(WorldObject const* target) { if (!HasUnitState(UNIT_STATE_CANNOT_TURN)) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 87cfccca04d323..5fe385fb78858f 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2143,7 +2143,7 @@ class Unit : public WorldObject // common function for visibility checks for player/creatures with detection code [[nodiscard]] uint32 GetPhaseByAuras() const; void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite WorldObject::SetPhaseMask - void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false) override; + void UpdateObjectVisibility(bool forced = true) override; SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY]; uint32 m_lastSanctuaryTime; @@ -2417,14 +2417,6 @@ class Unit : public WorldObject void AddPointedBy(SafeUnitPointer* sup) { SafeUnitPointerSet.insert(sup); } void RemovePointedBy(SafeUnitPointer* sup) { SafeUnitPointerSet.erase(sup); } static void HandleSafeUnitPointersOnDelete(Unit* thisUnit); - // Relocation Nofier optimization - Position m_last_notify_position; - uint32 m_last_notify_mstime; - uint16 m_delayed_unit_relocation_timer; - uint16 m_delayed_unit_ai_notify_timer; - bool bRequestForcedVisibilityUpdate; - void ExecuteDelayedUnitRelocationEvent(); - void ExecuteDelayedUnitAINotifyEvent(); // cooldowns [[nodiscard]] virtual bool HasSpellCooldown(uint32 /*spell_id*/) const { return false; } diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h index b9cafdbe0cd487..d67b9ca3180b38 100644 --- a/src/server/game/Grids/Grid.h +++ b/src/server/game/Grids/Grid.h @@ -96,6 +96,12 @@ class Grid visitor.Visit(i_objects); } + template + uint32 GetWorldObjectCountInGrid() const + { + return i_objects.template Count(); + } + /** Inserts a container type object into the grid. */ template void AddGridObject(SPECIFIC_OBJECT* obj) diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp new file mode 100644 index 00000000000000..eb0183b78383ec --- /dev/null +++ b/src/server/game/Grids/GridStates.cpp @@ -0,0 +1,65 @@ +/* + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "GridStates.h" +#include "GridNotifiers.h" +#include "Log.h" +#include "Map.h" +#include "ObjectGridLoader.h" + +void InvalidState::Update(Map&, NGridType&, GridInfo&, uint32) const +{ +} + +void ActiveState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const +{ + // Only check grid activity every (grid_expiry/10) ms, because it's really useless to do it every cycle + info.UpdateTimeTracker(diff); + if (info.getTimeTracker().Passed()) + { + if (!grid.GetWorldObjectCountInNGrid() && !map.ActiveObjectsNearGrid(grid)) + { + ObjectGridStoper worker; + TypeContainerVisitor visitor(worker); + grid.VisitAllGrids(visitor); + grid.SetGridState(GRID_STATE_IDLE); + LOG_DEBUG("maps", "Grid[{}, {}] on map {} moved to IDLE state", grid.getX(), grid.getY(), map.GetId()); + } + else + map.ResetGridExpiry(grid, 0.1f); + } +} + +void IdleState::Update(Map& map, NGridType& grid, GridInfo&, uint32) const +{ + map.ResetGridExpiry(grid); + grid.SetGridState(GRID_STATE_REMOVAL); + LOG_DEBUG("maps", "Grid[{}, {}] on map {} moved to REMOVAL state", grid.getX(), grid.getY(), map.GetId()); +} + +void RemovalState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const +{ + if (!info.getUnloadLock()) + { + info.UpdateTimeTracker(diff); + if (info.getTimeTracker().Passed() && !map.UnloadGrid(grid, false)) + { + LOG_DEBUG("maps", "Grid[{}, {}] for map {} differed unloading due to players or active objects nearby", grid.getX(), grid.getY(), map.GetId()); + map.ResetGridExpiry(grid); + } + } +} diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h new file mode 100644 index 00000000000000..5b0aec3d9e2f82 --- /dev/null +++ b/src/server/game/Grids/GridStates.h @@ -0,0 +1,56 @@ +/* + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 ACORE_GRIDSTATES_H +#define ACORE_GRIDSTATES_H + +#include "GridDefines.h" +#include "NGrid.h" + +class Map; + +class AC_GAME_API GridState +{ + public: + virtual ~GridState() { }; + virtual void Update(Map &, NGridType&, GridInfo &, uint32 t_diff) const = 0; +}; + +class AC_GAME_API InvalidState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API ActiveState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API IdleState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API RemovalState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; +#endif diff --git a/src/server/game/Grids/NGrid.cpp b/src/server/game/Grids/NGrid.cpp new file mode 100644 index 00000000000000..c20bf555824898 --- /dev/null +++ b/src/server/game/Grids/NGrid.cpp @@ -0,0 +1,29 @@ +/* + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "NGrid.h" +#include "Random.h" + +GridInfo::GridInfo() : i_timer(0), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), +i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) +{ +} + +GridInfo::GridInfo(std::chrono::seconds expiry, bool unload /*= true */) : i_timer(expiry.count()), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), +i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) +{ +} diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index ff1f1ed813d020..a49a299194cd99 100644 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -26,6 +26,42 @@ #include "Timer.h" #include "Util.h" +#define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000 + +class AC_GAME_API GridInfo +{ +public: + GridInfo(); + GridInfo(std::chrono::seconds expiry, bool unload = true); + TimeTracker const& getTimeTracker() const { return i_timer; } + bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; } + void setUnloadExplicitLock(bool on) { i_unloadExplicitLock = on; } + void setUnloadReferenceLock(bool on) { i_unloadReferenceLock = on; } + void incUnloadActiveLock() { ++i_unloadActiveLockCount; } + void decUnloadActiveLock() { if (i_unloadActiveLockCount) --i_unloadActiveLockCount; } + + void setTimer(TimeTracker const& pTimer) { i_timer = pTimer; } + void ResetTimeTracker(time_t interval) { i_timer.Reset(interval); } + void UpdateTimeTracker(time_t diff) { i_timer.Update(diff); } + PeriodicTimer& getRelocationTimer() { return vis_Update; } +private: + TimeTracker i_timer; + PeriodicTimer vis_Update; + + uint16 i_unloadActiveLockCount : 16; // lock from active object spawn points (prevent clone loading) + bool i_unloadExplicitLock : 1; // explicit manual lock or config setting + bool i_unloadReferenceLock : 1; // lock from instance map copy +}; + +typedef enum +{ + GRID_STATE_INVALID = 0, + GRID_STATE_ACTIVE = 1, + GRID_STATE_IDLE = 2, + GRID_STATE_REMOVAL = 3, + MAX_GRID_STATE = 4 +} grid_state_t; + template < uint32 N, @@ -37,10 +73,10 @@ class NGrid { public: typedef Grid GridType; - NGrid(uint32 id, int32 x, int32 y) - : i_gridId(id), i_x(x), i_y(y), i_GridObjectDataLoaded(false) - { - } + NGrid(uint32 id, int32 x, int32 y, std::chrono::seconds expiry, bool unload = true) : + i_gridId(id), i_GridInfo(GridInfo(expiry, unload)), i_x(x), i_y(y), + i_cellstate(GRID_STATE_INVALID), i_GridObjectDataLoaded(false) + { } GridType& GetGridType(const uint32 x, const uint32 y) { @@ -55,6 +91,9 @@ class NGrid } [[nodiscard]] uint32 GetGridId() const { return i_gridId; } + void SetGridId(uint32 id) { i_gridId = id; } + [[nodiscard]] grid_state_t GetGridState() const { return i_cellstate; } + void SetGridState(grid_state_t s) { i_cellstate = s; } [[nodiscard]] int32 getX() const { return i_x; } [[nodiscard]] int32 getY() const { return i_y; } @@ -65,6 +104,16 @@ class NGrid [[nodiscard]] bool isGridObjectDataLoaded() const { return i_GridObjectDataLoaded; } void setGridObjectDataLoaded(bool pLoaded) { i_GridObjectDataLoaded = pLoaded; } + GridInfo* getGridInfoRef() { return &i_GridInfo; } + TimeTracker const& getTimeTracker() const { return i_GridInfo.getTimeTracker(); } + bool getUnloadLock() const { return i_GridInfo.getUnloadLock(); } + void setUnloadExplicitLock(bool on) { i_GridInfo.setUnloadExplicitLock(on); } + void setUnloadReferenceLock(bool on) { i_GridInfo.setUnloadReferenceLock(on); } + void incUnloadActiveLock() { i_GridInfo.incUnloadActiveLock(); } + void decUnloadActiveLock() { i_GridInfo.decUnloadActiveLock(); } + void ResetTimeTracker(std::chrono::seconds interval) { i_GridInfo.ResetTimeTracker(interval.count()); } + void UpdateTimeTracker(std::chrono::seconds diff) { i_GridInfo.UpdateTimeTracker(diff.count()); } + /* template void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj) { @@ -103,11 +152,23 @@ class NGrid GetGridType(x, y).Visit(visitor); } + template + uint32 GetWorldObjectCountInNGrid() const + { + uint32 count = 0; + for (uint32 x = 0; x < N; ++x) + for (uint32 y = 0; y < N; ++y) + count += i_cells[x][y].template GetWorldObjectCountInGrid(); + return count; + } + private: uint32 i_gridId; + GridInfo i_GridInfo; GridReference > i_Reference; int32 i_x; int32 i_y; + grid_state_t i_cellstate; GridType i_cells[N][N]; bool i_GridObjectDataLoaded; }; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index 7b25ab1bdd5f22..c9e9bd73522f3c 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -16,6 +16,7 @@ */ #include "GridNotifiers.h" +#include "GridNotifiersImpl.h" #include "Map.h" #include "ObjectAccessor.h" #include "SpellInfo.h" @@ -23,22 +24,10 @@ #include "Transport.h" #include "UpdateData.h" #include "WorldPacket.h" +#include "CellImpl.h" using namespace Acore; -void VisibleNotifier::Visit(GameObjectMapType& m) -{ - for (GameObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter) - { - GameObject* go = iter->GetSource(); - if (i_largeOnly != go->IsVisibilityOverridden()) - continue; - - vis_guids.erase(go->GetGUID()); - i_player.UpdateVisibilityOf(go, i_data, i_visibleNow); - } -} - void VisibleNotifier::SendToSelf() { // at this moment i_clientGUIDs have guids that not iterate at grid level checks @@ -46,9 +35,6 @@ void VisibleNotifier::SendToSelf() if (Transport* transport = i_player.GetTransport()) for (Transport::PassengerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr) { - if (i_largeOnly != (*itr)->IsVisibilityOverridden()) - continue; - if (vis_guids.find((*itr)->GetGUID()) != vis_guids.end()) { vis_guids.erase((*itr)->GetGUID()); @@ -65,6 +51,9 @@ void VisibleNotifier::SendToSelf() case TYPEID_UNIT: i_player.UpdateVisibilityOf((*itr)->ToCreature(), i_data, i_visibleNow); break; + case TYPEID_DYNAMICOBJECT: + i_player.UpdateVisibilityOf((*itr)->ToDynObject(), i_data, i_visibleNow); + break; default: break; } @@ -73,12 +62,6 @@ void VisibleNotifier::SendToSelf() for (GuidUnorderedSet::const_iterator it = vis_guids.begin(); it != vis_guids.end(); ++it) { - if (WorldObject* obj = ObjectAccessor::GetWorldObject(i_player, *it)) - { - if (i_largeOnly != obj->IsVisibilityOverridden()) - continue; - } - // pussywizard: static transports are removed only in RemovePlayerFromMap and here if can no longer detect (eg. phase changed) if ((*it).IsTransport()) if (GameObject* staticTrans = i_player.GetMap()->GetGameObject(*it)) @@ -105,9 +88,6 @@ void VisibleNotifier::SendToSelf() for (std::vector::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it) { - if (i_largeOnly != (*it)->IsVisibilityOverridden()) - continue; - i_player.GetInitialVisiblePackets(*it); } } @@ -178,6 +158,23 @@ void PlayerRelocationNotifier::Visit(PlayerMapType& m) } } +void PlayerRelocationNotifier::Visit(CreatureMapType& m) +{ + bool relocated_for_ai = (&i_player == i_player.m_seer); + + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* c = iter->GetSource(); + + vis_guids.erase(c->GetGUID()); + + i_player.UpdateVisibilityOf(c, i_data, i_visibleNow); + + if (relocated_for_ai && !c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + CreatureUnitRelocationWorker(c, &i_player); + } +} + void CreatureRelocationNotifier::Visit(PlayerMapType& m) { for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) @@ -194,6 +191,58 @@ void CreatureRelocationNotifier::Visit(PlayerMapType& m) } } +void CreatureRelocationNotifier::Visit(CreatureMapType& m) +{ + if (!i_creature.IsAlive()) + return; + + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* c = iter->GetSource(); + CreatureUnitRelocationWorker(&i_creature, c); + + if (!c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + CreatureUnitRelocationWorker(c, &i_creature); + } +} + +void DelayedUnitRelocation::Visit(CreatureMapType& m) +{ + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* unit = iter->GetSource(); + if (!unit->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + continue; + + CreatureRelocationNotifier relocate(*unit); + + TypeContainerVisitor c2world_relocation(relocate); + TypeContainerVisitor c2grid_relocation(relocate); + + cell.Visit(p, c2world_relocation, i_map, *unit, i_radius); + cell.Visit(p, c2grid_relocation, i_map, *unit, i_radius); + } +} + +void DelayedUnitRelocation::Visit(PlayerMapType& m) +{ + for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Player* player = iter->GetSource(); + WorldObject const* viewPoint = player->m_seer; + + if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + continue; + + if (player != viewPoint && !viewPoint->IsPositionValid()) + continue; + + PlayerRelocationNotifier relocate(*player); + Cell::VisitAllObjects(viewPoint, relocate, i_radius, false); + relocate.SendToSelf(); + } +} + void AIRelocationNotifier::Visit(CreatureMapType& m) { bool self = isCreature && !((Creature*)(&i_unit))->IsMoveInLineOfSightStrictlyDisabled(); @@ -341,14 +390,9 @@ void MessageDistDelivererToHostile::Visit(DynamicObjectMapType& m) template void ObjectUpdater::Visit(GridRefMgr& m) { - T* obj; - for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ) - { - obj = iter->GetSource(); - ++iter; - if (obj->IsInWorld() && (i_largeOnly == obj->IsVisibilityOverridden())) - obj->Update(i_timeDiff); - } + for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) + if (iter->GetSource()->IsInWorld()) + iter->GetSource()->Update(i_timeDiff); } bool AnyDeadUnitObjectInRangeCheck::operator()(Player* u) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index e06b9091f31690..c634fe9e35f3f6 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -44,16 +44,14 @@ namespace Acore GuidUnorderedSet vis_guids; std::vector& i_visibleNow; bool i_gobjOnly; - bool i_largeOnly; UpdateData i_data; - VisibleNotifier(Player& player, bool gobjOnly, bool largeOnly) : - i_player(player), vis_guids(player.m_clientGUIDs), i_visibleNow(player.m_newVisible), i_gobjOnly(gobjOnly), i_largeOnly(largeOnly) + VisibleNotifier(Player& player, bool gobjOnly) : + i_player(player), vis_guids(player.m_clientGUIDs), i_visibleNow(player.m_newVisible), i_gobjOnly(gobjOnly) { i_visibleNow.clear(); } - void Visit(GameObjectMapType&); template void Visit(GridRefMgr& m); void SendToSelf(void); }; @@ -71,9 +69,10 @@ namespace Acore struct PlayerRelocationNotifier : public VisibleNotifier { - PlayerRelocationNotifier(Player& player, bool largeOnly): VisibleNotifier(player, false, largeOnly) { } + PlayerRelocationNotifier(Player& player) : VisibleNotifier(player, false) { } template void Visit(GridRefMgr& m) { VisibleNotifier::Visit(m); } + void Visit(CreatureMapType&); void Visit(PlayerMapType&); }; @@ -82,6 +81,20 @@ namespace Acore Creature& i_creature; CreatureRelocationNotifier(Creature& c) : i_creature(c) {} template void Visit(GridRefMgr&) {} + void Visit(CreatureMapType&); + void Visit(PlayerMapType&); + }; + + struct DelayedUnitRelocation + { + Map& i_map; + Cell& cell; + CellCoord& p; + const float i_radius; + DelayedUnitRelocation(Cell& c, CellCoord& pair, Map& map, float radius) : + i_map(map), cell(c), p(pair), i_radius(radius) { } + template void Visit(GridRefMgr&) { } + void Visit(CreatureMapType&); void Visit(PlayerMapType&); }; @@ -94,6 +107,25 @@ namespace Acore void Visit(CreatureMapType&); }; + struct GridUpdater + { + GridType& i_grid; + uint32 i_timeDiff; + GridUpdater(GridType& grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) { } + + template void updateObjects(GridRefMgr& m) + { + for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) + iter->GetSource()->Update(i_timeDiff); + } + + void Visit(PlayerMapType& m) { updateObjects(m); } + void Visit(CreatureMapType& m) { updateObjects(m); } + void Visit(GameObjectMapType& m) { updateObjects(m); } + void Visit(DynamicObjectMapType& m) { updateObjects(m); } + void Visit(CorpseMapType& m) { updateObjects(m); } + }; + struct MessageDistDeliverer { WorldObject const* i_source; @@ -154,8 +186,7 @@ namespace Acore struct ObjectUpdater { uint32 i_timeDiff; - bool i_largeOnly; - explicit ObjectUpdater(const uint32 diff, bool largeOnly) : i_timeDiff(diff), i_largeOnly(largeOnly) {} + explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) {} template void Visit(GridRefMgr& m); void Visit(PlayerMapType&) {} void Visit(CorpseMapType&) {} diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index 3cd1b77dcf3ad3..00d967880c94e0 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -38,9 +38,6 @@ inline void Acore::VisibleNotifier::Visit(GridRefMgr& m) for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) { - if (i_largeOnly != iter->GetSource()->IsVisibilityOverridden()) - continue; - vis_guids.erase(iter->GetSource()->GetGUID()); i_player.UpdateVisibilityOf(iter->GetSource(), i_data, i_visibleNow); } diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 628189ae4b43b0..c0d9e78c08e91d 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -26,6 +26,35 @@ #include "Transport.h" #include "Vehicle.h" +void ObjectGridEvacuator::Visit(CreatureMapType& m) +{ + // creature in unloading grid can have respawn point in another grid + // if it will be unloaded then it will not respawn in original grid until unload/load original grid + // move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn. + for (CreatureMapType::iterator iter = m.begin(); iter != m.end();) + { + Creature* c = iter->GetSource(); + ++iter; + + ASSERT(!c->IsPet() && "ObjectGridRespawnMover must not be called for pets"); + c->GetMap()->CreatureRespawnRelocation(c, true); + } +} + +void ObjectGridEvacuator::Visit(GameObjectMapType& m) +{ + // gameobject in unloading grid can have respawn point in another grid + // if it will be unloaded then it will not respawn in original grid until unload/load original grid + // move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn. + for (GameObjectMapType::iterator iter = m.begin(); iter != m.end();) + { + GameObject* go = iter->GetSource(); + ++iter; + + go->GetMap()->GameObjectRespawnRelocation(go, true); + } +} + // for loading world object at grid loading (Corpses) //TODO: to implement npc on transport, also need to load npcs at grid loading class ObjectWorldLoader @@ -229,6 +258,17 @@ void ObjectGridUnloader::Visit(GridRefMgr& m) } } +void ObjectGridStoper::Visit(CreatureMapType& m) +{ + // stop any fights at grid de-activation and remove dynobjects created at cast by creatures + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + iter->GetSource()->RemoveAllDynObjects(); + if (iter->GetSource()->IsInCombat()) + iter->GetSource()->CombatStop(); + } +} + template void ObjectGridCleaner::Visit(GridRefMgr& m) { diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index 863e5f15f5f8a9..d16c3c5bc4fbd5 100644 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -53,6 +53,23 @@ class ObjectGridLoader uint32 i_corpses; }; +//Stop the creatures before unloading the NGrid +class AC_GAME_API ObjectGridStoper +{ +public: + void Visit(CreatureMapType& m); + template void Visit(GridRefMgr&) { } +}; + +//Move the foreign creatures back to respawn positions before unloading the NGrid +class AC_GAME_API ObjectGridEvacuator +{ +public: + void Visit(CreatureMapType& m); + void Visit(GameObjectMapType& m); + template void Visit(GridRefMgr&) { } +}; + //Clean up and remove from world class ObjectGridCleaner { diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index ec6854ede84bfa..66927f642062dd 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -20,6 +20,7 @@ #include "Config.h" #include "GameTime.h" #include "GridNotifiers.h" +#include "GridStates.h" #include "Group.h" #include "InstanceScript.h" #include "Log.h" diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5f6a1418ed0e92..e66ef5c9b988d3 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -24,6 +24,8 @@ #include "GameTime.h" #include "Geometry.h" #include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "GridStates.h" #include "Group.h" #include "InstanceScript.h" #include "LFGMgr.h" @@ -56,6 +58,8 @@ u_map_magic MapLiquidMagic = { {'M', 'L', 'I', 'Q'} }; static uint16 const holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 }; static uint16 const holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 }; +GridState* si_GridStates[MAX_GRID_STATE]; + ZoneDynamicInfo::ZoneDynamicInfo() : MusicId(0), WeatherId(WEATHER_STATE_FINE), WeatherGrade(0.0f), OverrideLightId(0), LightFadeInTime(0) { } @@ -188,6 +192,7 @@ void Map::LoadMap(int gx, int gy, bool reload) // load grid map for base map m_parentMap->EnsureGridCreated(GridCoord(63 - gx, 63 - gy)); + ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy)); GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy]; return; } @@ -232,11 +237,14 @@ void Map::LoadMapAndVMap(int gx, int gy) } } -Map::Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : +Map::Map(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : + _creatureToMoveLock(false), _gameObjectsToMoveLock(false), _dynamicObjectsToMoveLock(false), i_mapEntry(sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), - m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), - _instanceResetPeriod(0), m_activeNonPlayersIter(m_activeNonPlayers.end()), - _transportsUpdateIter(_transports.end()), i_scriptLock(false), _defaultLight(GetDefaultMapLight(id)) + m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), _instanceResetPeriod(0), + m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD), + m_activeNonPlayersIter(m_activeNonPlayers.end()), _transportsUpdateIter(_transports.end()), + i_gridExpiry(expiry), + i_scriptLock(false), _defaultLight(GetDefaultMapLight(id)) { m_parentMap = (_parent ? _parent : this); for (unsigned int idx = 0; idx < MAX_NUMBER_OF_GRIDS; ++idx) @@ -259,6 +267,7 @@ void Map::InitVisibilityDistance() { //init visibility for continents m_VisibleDistance = World::GetMaxVisibleDistanceOnContinents(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodOnContinents(); switch (GetId()) { @@ -431,8 +440,6 @@ void Map::DeleteFromWorld(Player* player) void Map::EnsureGridCreated(const GridCoord& p) { - if (getNGrid(p.x_coord, p.y_coord)) // pussywizard - return; std::lock_guard guard(GridLock); EnsureGridCreated_i(p); } @@ -443,11 +450,14 @@ void Map::EnsureGridCreated_i(const GridCoord& p) { if (!getNGrid(p.x_coord, p.y_coord)) { - // pussywizard: moved setNGrid to the end of the function - NGridType* ngt = new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord); + LOG_DEBUG("maps", "Creating grid[{}, {}] for map {} instance {}", p.x_coord, p.y_coord, GetId(), i_InstanceId); + + setNGrid(new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry), p.x_coord, p.y_coord); // build a linkage between this map and NGridType - buildNGridLinkage(ngt); // pussywizard: getNGrid(x, y) changed to: ngt + buildNGridLinkage(getNGrid(p.x_coord, p.y_coord)); + + getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE); //z coord int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord; @@ -457,9 +467,22 @@ void Map::EnsureGridCreated_i(const GridCoord& p) { LoadMapAndVMap(gx, gy); } + } +} - // pussywizard: moved here - setNGrid(ngt, p.x_coord, p.y_coord); +//Load NGrid and make it active +void Map::EnsureGridLoadedForActiveObject(const Cell& cell, WorldObject* object) +{ + EnsureGridLoaded(cell); + NGridType* grid = getNGrid(cell.GridX(), cell.GridY()); + ASSERT(grid != nullptr); + + // refresh grid state & timer + if (grid->GetGridState() != GRID_STATE_ACTIVE) + { + LOG_DEBUG("maps", "Active object {} triggers loading of grid [{}, {}] on map {}", object->GetGUID().ToString().c_str(), cell.GridX(), cell.GridY(), GetId()); + ResetGridExpiry(*grid, 0.1f); + grid->SetGridState(GRID_STATE_ACTIVE); } } @@ -489,6 +512,29 @@ bool Map::EnsureGridLoaded(const Cell& cell) return false; } +void Map::GridMarkNoUnload(uint32 x, uint32 y) +{ + // First make sure this grid is loaded + float gX = ((float(x) - 0.5f - CENTER_GRID_ID) * SIZE_OF_GRIDS) + (CENTER_GRID_OFFSET * 2); + float gY = ((float(y) - 0.5f - CENTER_GRID_ID) * SIZE_OF_GRIDS) + (CENTER_GRID_OFFSET * 2); + Cell cell = Cell(gX, gY); + EnsureGridLoaded(cell); + + // Mark as don't unload + NGridType* grid = getNGrid(x, y); + grid->setUnloadExplicitLock(true); +} + +void Map::GridUnmarkNoUnload(uint32 x, uint32 y) +{ + // If grid is loaded, clear unload lock + if (IsGridLoaded(GridCoord(x, y))) + { + NGridType* grid = getNGrid(x, y); + grid->setUnloadExplicitLock(false); + } +} + void Map::LoadGrid(float x, float y) { EnsureGridLoaded(Cell(x, y)); @@ -501,6 +547,22 @@ void Map::LoadAllCells() LoadGrid((cellX + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL, (cellY + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL); } +void Map::InitStateMachine() +{ + si_GridStates[GRID_STATE_INVALID] = new InvalidState(); + si_GridStates[GRID_STATE_ACTIVE] = new ActiveState(); + si_GridStates[GRID_STATE_IDLE] = new IdleState(); + si_GridStates[GRID_STATE_REMOVAL] = new RemovalState(); +} + +void Map::DeleteStateMachine() +{ + delete si_GridStates[GRID_STATE_INVALID]; + delete si_GridStates[GRID_STATE_ACTIVE]; + delete si_GridStates[GRID_STATE_IDLE]; + delete si_GridStates[GRID_STATE_REMOVAL]; +} + bool Map::AddPlayerToMap(Player* player) { CellCoord cellCoord = Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); @@ -512,7 +574,7 @@ bool Map::AddPlayerToMap(Player* player) } Cell cell(cellCoord); - EnsureGridLoaded(cell); + EnsureGridLoadedForActiveObject(cell, player); AddToGrid(player, cell); // Check if we are adding to correct map @@ -540,15 +602,15 @@ void Map::InitializeObject(T* /*obj*/) } template<> -void Map::InitializeObject(Creature* /*obj*/) +void Map::InitializeObject(Creature* obj) { - //obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; } template<> -void Map::InitializeObject(GameObject* /*obj*/) +void Map::InitializeObject(GameObject* obj) { - //obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; } template @@ -576,7 +638,7 @@ bool Map::AddToMap(T* obj, bool checkTransport) Cell cell(cellCoord); if (obj->isActiveObject()) - EnsureGridLoaded(cell); + EnsureGridLoadedForActiveObject(cell, obj); else EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY())); @@ -658,45 +720,8 @@ bool Map::IsGridLoaded(const GridCoord& p) const return (getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord)); } -void Map::VisitNearbyCellsOfPlayer(Player* player, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor) -{ - // check for valid position - if (!player->IsPositionValid()) - return; - - // check normal grid activation range of the player - VisitNearbyCellsOf(player, gridVisitor, worldVisitor, largeGridVisitor, largeWorldVisitor); - - // check maximum visibility distance for large creatures - CellArea area = Cell::CalculateCellArea(player->GetPositionX(), player->GetPositionY(), MAX_VISIBILITY_DISTANCE); - - for (uint32 x = area.low_bound.x_coord; x <= area.high_bound.x_coord; ++x) - { - for (uint32 y = area.low_bound.y_coord; y <= area.high_bound.y_coord; ++y) - { - // marked cells are those that have been visited - // don't visit the same cell twice - uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; - if (isCellMarkedLarge(cell_id)) - continue; - - markCellLarge(cell_id); - CellCoord pair(x, y); - Cell cell(pair); - - Visit(cell, largeGridVisitor); - Visit(cell, largeWorldVisitor); - } - } -} - void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor) + TypeContainerVisitor& worldVisitor) { // Check for valid position if (!obj->IsPositionValid()) @@ -725,13 +750,6 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitorGetSource(); - - if (!player || !player->IsInWorld()) - continue; - - // update players at tick - player->Update(s_diff); - } - - HandleDelayedVisibility(); - return; - } - /// update active cells around players and active objects resetMarkedCells(); - resetMarkedCellsLarge(); - Acore::ObjectUpdater updater(t_diff, false); + Acore::ObjectUpdater updater(t_diff); // for creature TypeContainerVisitor grid_object_update(updater); // for pets TypeContainerVisitor world_object_update(updater); - // for large creatures - Acore::ObjectUpdater largeObjectUpdater(t_diff, true); - TypeContainerVisitor grid_large_object_update(largeObjectUpdater); - TypeContainerVisitor world_large_object_update(largeObjectUpdater); - // pussywizard: container for far creatures in combat with players std::vector updateList; updateList.reserve(10); @@ -800,7 +795,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) if (!obj || !obj->IsInWorld()) continue; - VisitNearbyCellsOf(obj, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(obj, grid_object_update, world_object_update); } // the player iterator is stored in the map object @@ -815,20 +810,11 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) // update players at tick player->Update(s_diff); - VisitNearbyCellsOfPlayer(player, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(player, grid_object_update, world_object_update); // If player is using far sight, visit that object too if (WorldObject* viewPoint = player->GetViewpoint()) - { - if (Creature* viewCreature = viewPoint->ToCreature()) - { - VisitNearbyCellsOf(viewCreature, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); - } - else if (DynamicObject* viewObject = viewPoint->ToDynObject()) - { - VisitNearbyCellsOf(viewObject, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); - } - } + VisitNearbyCellsOf(viewPoint, grid_object_update, world_object_update); // handle updates for creatures in combat with player and are more than X yards away if (player->IsInCombat()) @@ -846,7 +832,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) ref = ref->next(); } for (std::vector::const_iterator itr = updateList.begin(); itr != updateList.end(); ++itr) - VisitNearbyCellsOf(*itr, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(*itr, grid_object_update, world_object_update); } } @@ -875,7 +861,8 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) MoveAllGameObjectsInMoveList(); MoveAllDynamicObjectsInMoveList(); - HandleDelayedVisibility(); + if (!m_mapRefMgr.IsEmpty() || !m_activeNonPlayers.empty()) + ProcessRelocationNotifies(t_diff); sScriptMgr->OnMapUpdate(this, t_diff); @@ -888,15 +875,6 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) METRIC_TAG("map_instanceid", std::to_string(GetInstanceId()))); } -void Map::HandleDelayedVisibility() -{ - if (i_objectsForDelayedVisibility.empty()) - return; - for (std::unordered_set::iterator itr = i_objectsForDelayedVisibility.begin(); itr != i_objectsForDelayedVisibility.end(); ++itr) - (*itr)->ExecuteDelayedUnitRelocationEvent(); - i_objectsForDelayedVisibility.clear(); -} - struct ResetNotifier { templateinline void resetNotify(GridRefMgr& m) @@ -909,6 +887,83 @@ struct ResetNotifier void Visit(PlayerMapType& m) { resetNotify(m);} }; +void Map::ProcessRelocationNotifies(uint32 diff) +{ + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end(); ++i) + { + NGridType* grid = i->GetSource(); + + if (grid->GetGridState() != GRID_STATE_ACTIVE) + continue; + + grid->getGridInfoRef()->getRelocationTimer().TUpdate(diff); + if (!grid->getGridInfoRef()->getRelocationTimer().TPassed()) + continue; + + uint32 gx = grid->getX(), gy = grid->getY(); + + CellCoord cell_min(gx * MAX_NUMBER_OF_CELLS, gy * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x) + { + for (uint32 y = cell_min.y_coord; y < cell_max.y_coord; ++y) + { + uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; + if (!isCellMarked(cell_id)) + continue; + + CellCoord pair(x, y); + Cell cell(pair); + cell.SetNoCreate(); + + Acore::DelayedUnitRelocation cell_relocation(cell, pair, *this, MAX_VISIBILITY_DISTANCE); + TypeContainerVisitor grid_object_relocation(cell_relocation); + TypeContainerVisitor world_object_relocation(cell_relocation); + Visit(cell, grid_object_relocation); + Visit(cell, world_object_relocation); + } + } + } + + ResetNotifier reset; + TypeContainerVisitor grid_notifier(reset); + TypeContainerVisitor world_notifier(reset); + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end(); ++i) + { + NGridType* grid = i->GetSource(); + + if (grid->GetGridState() != GRID_STATE_ACTIVE) + continue; + + if (!grid->getGridInfoRef()->getRelocationTimer().TPassed()) + continue; + + grid->getGridInfoRef()->getRelocationTimer().TReset(diff, m_VisibilityNotifyPeriod); + + uint32 gx = grid->getX(), gy = grid->getY(); + + CellCoord cell_min(gx * MAX_NUMBER_OF_CELLS, gy * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x) + { + for (uint32 y = cell_min.y_coord; y < cell_max.y_coord; ++y) + { + uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; + if (!isCellMarked(cell_id)) + continue; + + CellCoord pair(x, y); + Cell cell(pair); + cell.SetNoCreate(); + Visit(cell, grid_notifier); + Visit(cell, world_notifier); + } + } + } +} + void Map::RemovePlayerFromMap(Player* player, bool remove) { player->getHostileRefMgr().deleteReferences(true); // pussywizard: multithreading crashfix @@ -1000,15 +1055,19 @@ void Map::RemoveFromMap(MotionTransport* obj, bool remove) void Map::PlayerRelocation(Player* player, float x, float y, float z, float o) { + ASSERT(player); + Cell old_cell(player->GetPositionX(), player->GetPositionY()); Cell new_cell(x, y); if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { + LOG_DEBUG("maps", "Player {} relocation grid[{}, {}]cell[{}, {}]->grid[{}, {}]cell[{}, {}]", player->GetName().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + player->RemoveFromGrid(); if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); + EnsureGridLoadedForActiveObject(new_cell, player); AddToGrid(player, new_cell); } @@ -1030,10 +1089,15 @@ void Map::CreatureRelocation(Creature* creature, float x, float y, float z, floa if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddCreatureToMoveList(creature); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", creature->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddCreatureToMoveList(creature, x, y, z, o); } else + { RemoveCreatureFromMoveList(creature); + } creature->Relocate(x, y, z, o); if (creature->IsVehicle()) @@ -1052,10 +1116,15 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddGameObjectToMoveList(go); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddGameObjectToMoveList(go, x, y, z, o); } else + { RemoveGameObjectFromMoveList(go); + } go->Relocate(x, y, z, o); go->UpdateModelPosition(); @@ -1073,61 +1142,85 @@ void Map::DynamicObjectRelocation(DynamicObject* dynObj, float x, float y, float if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddDynamicObjectToMoveList(dynObj); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", dynObj->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddDynamicObjectToMoveList(dynObj, x, y, z, o); } else + { RemoveDynamicObjectFromMoveList(dynObj); + } dynObj->Relocate(x, y, z, o); dynObj->SetPositionDataUpdate(); dynObj->UpdateObjectVisibility(false); } -void Map::AddCreatureToMoveList(Creature* c) +void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang) { + if (_creatureToMoveLock) //can this happen? + return; + if (c->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _creaturesToMove.push_back(c); - c->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + c->SetNewCellPosition(x, y, z, ang); } void Map::RemoveCreatureFromMoveList(Creature* c) { + if (_creatureToMoveLock) //can this happen? + return; + if (c->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) c->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } -void Map::AddGameObjectToMoveList(GameObject* go) +void Map::AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang) { + if (_gameObjectsToMoveLock) //can this happen? + return; + if (go->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _gameObjectsToMove.push_back(go); - go->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + go->SetNewCellPosition(x, y, z, ang); } void Map::RemoveGameObjectFromMoveList(GameObject* go) { + if (_gameObjectsToMoveLock) //can this happen? + return; + if (go->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) go->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } -void Map::AddDynamicObjectToMoveList(DynamicObject* dynObj) +void Map::AddDynamicObjectToMoveList(DynamicObject* dynObj, float x, float y, float z, float ang) { + if (_dynamicObjectsToMoveLock) //can this happen? + return; + if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _dynamicObjectsToMove.push_back(dynObj); - dynObj->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + dynObj->SetNewCellPosition(x, y, z, ang); } void Map::RemoveDynamicObjectFromMoveList(DynamicObject* dynObj) { + if (_dynamicObjectsToMoveLock) //can this happen? + return; + if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) dynObj->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } void Map::MoveAllCreaturesInMoveList() { + _creatureToMoveLock = true; for (std::vector::iterator itr = _creaturesToMove.begin(); itr != _creaturesToMove.end(); ++itr) { Creature* c = *itr; - if (c->FindMap() != this) + if (c->FindMap() != this) //pet is teleported to another map continue; if (c->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1140,23 +1233,51 @@ void Map::MoveAllCreaturesInMoveList() if (!c->IsInWorld()) continue; - Cell const& old_cell = c->GetCurrentCell(); - Cell new_cell(c->GetPositionX(), c->GetPositionY()); - - c->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(c, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (CreatureCellRelocation(c, Cell(c->_newPosition.m_positionX, c->_newPosition.m_positionY))) + { + // update pos + c->Relocate(c->_newPosition); + if (c->IsVehicle()) + c->GetVehicleKit()->RelocatePassengers(); + //CreatureRelocationNotify(c, new_cell, new_cell.cellCoord()); + c->UpdatePositionData(); + c->UpdateObjectVisibility(false); + } + else + { + // if creature can't be move in new cell/grid (not loaded) move it to repawn cell/grid + // creature coordinates will be updated and notifiers send + if (!CreatureRespawnRelocation(c, false)) + { + // ... or unload (if respawn grid also not loaded) +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} cannot be move to unloaded respawn grid.", c->GetGUID().ToString().c_str()); +#endif + //AddObjectToRemoveList(Pet*) should only be called in Pet::Remove + //This may happen when a player just logs in and a pet moves to a nearby unloaded cell + //To avoid this, we can load nearby cells when player log in + //But this check is always needed to ensure safety + /// @todo pets will disappear if this is outside CreatureRespawnRelocation + //need to check why pet is frequently relocated to an unloaded cell + if (c->IsPet()) + ((Pet*)c)->Remove(PET_SAVE_NOT_IN_SLOT, true); + else + AddObjectToRemoveList(c); + } + } } _creaturesToMove.clear(); + _creatureToMoveLock = false; } void Map::MoveAllGameObjectsInMoveList() { + _gameObjectsToMoveLock = true; for (std::vector::iterator itr = _gameObjectsToMove.begin(); itr != _gameObjectsToMove.end(); ++itr) { GameObject* go = *itr; - if (go->FindMap() != this) + if (go->FindMap() != this) //transport is teleported to another map continue; if (go->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1169,23 +1290,40 @@ void Map::MoveAllGameObjectsInMoveList() if (!go->IsInWorld()) continue; - Cell const& old_cell = go->GetCurrentCell(); - Cell new_cell(go->GetPositionX(), go->GetPositionY()); - - go->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(go, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (GameObjectCellRelocation(go, Cell(go->_newPosition.m_positionX, go->_newPosition.m_positionY))) + { + // update pos + go->Relocate(go->_newPosition); + go->UpdateModelPosition(); + go->UpdatePositionData(); + go->UpdateObjectVisibility(false); + } + else + { + // if GameObject can't be move in new cell/grid (not loaded) move it to repawn cell/grid + // GameObject coordinates will be updated and notifiers send + if (!GameObjectRespawnRelocation(go, false)) + { + // ... or unload (if respawn grid also not loaded) +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} cannot be move to unloaded respawn grid.", go->GetGUID().ToString().c_str()); +#endif + AddObjectToRemoveList(go); + } + } } _gameObjectsToMove.clear(); + _gameObjectsToMoveLock = false; } void Map::MoveAllDynamicObjectsInMoveList() { + _dynamicObjectsToMoveLock = true; for (std::vector::iterator itr = _dynamicObjectsToMove.begin(); itr != _dynamicObjectsToMove.end(); ++itr) { DynamicObject* dynObj = *itr; - if (dynObj->FindMap() != this) + if (dynObj->FindMap() != this) //transport is teleported to another map continue; if (dynObj->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1198,60 +1336,344 @@ void Map::MoveAllDynamicObjectsInMoveList() if (!dynObj->IsInWorld()) continue; - Cell const& old_cell = dynObj->GetCurrentCell(); - Cell new_cell(dynObj->GetPositionX(), dynObj->GetPositionY()); - - dynObj->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(dynObj, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (DynamicObjectCellRelocation(dynObj, Cell(dynObj->_newPosition.m_positionX, dynObj->_newPosition.m_positionY))) + { + // update pos + dynObj->Relocate(dynObj->_newPosition); + dynObj->UpdatePositionData(); + dynObj->UpdateObjectVisibility(false); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} cannot be moved to unloaded grid.", dynObj->GetGUID().ToString().c_str()); +#endif + } } + _dynamicObjectsToMove.clear(); + _dynamicObjectsToMoveLock = false; } -bool Map::UnloadGrid(NGridType& ngrid) +bool Map::CreatureCellRelocation(Creature* c, Cell new_cell) { - // pussywizard: UnloadGrid only done when whole map is unloaded, no need to worry about moving npcs between grids, etc. + Cell const& old_cell = c->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif - const uint32 x = ngrid.getX(); - const uint32 y = ngrid.getY(); + c->RemoveFromGrid(); + AddToGrid(c, new_cell); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved in same grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif + } + return true; + } + + // in diff. grids but active creature + if (c->isActiveObject()) { - ObjectGridCleaner worker; - TypeContainerVisitor visitor(worker); - ngrid.VisitAllGrids(visitor); + EnsureGridLoadedForActiveObject(new_cell, c); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active creature {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + c->RemoveFromGrid(); + AddToGrid(c, new_cell); + + return true; } - RemoveAllObjectsInRemoveList(); + if (c->GetCharmerOrOwnerGUID().IsPlayer()) + EnsureGridLoaded(new_cell); + // in diff. loaded grid normal creature + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) { - ObjectGridUnloader worker; - TypeContainerVisitor visitor(worker); - ngrid.VisitAllGrids(visitor); +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + c->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(c, new_cell); + + return true; } - ASSERT(i_objectsToRemove.empty()); + // fail to move: normal creature attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} - delete &ngrid; - setNGrid(nullptr, x, y); +bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell) +{ + Cell const& old_cell = go->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif - int gx = (MAX_NUMBER_OF_GRIDS - 1) - x; - int gy = (MAX_NUMBER_OF_GRIDS - 1) - y; + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved in same grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif + } - if (i_InstanceId == 0) + return true; + } + + // in diff. grids but active GameObject + if (go->isActiveObject()) { - if (GridMaps[gx][gy]) + EnsureGridLoadedForActiveObject(new_cell, go); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active GameObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + + return true; + } + + // in diff. loaded grid normal GameObject + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(go, new_cell); + + return true; + } + + // fail to move: normal GameObject attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} + +bool Map::DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell) +{ + Cell const& old_cell = go->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + } + else { - GridMaps[gx][gy]->unloadData(); - delete GridMaps[gx][gy]; +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved in same grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif } - // x and y are swapped - VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(GetId(), gx, gy); - MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(GetId(), gx, gy); + + return true; } - GridMaps[gx][gy] = nullptr; + // in diff. grids but active GameObject + if (go->isActiveObject()) + { + EnsureGridLoadedForActiveObject(new_cell, go); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active DynamicObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + + return true; + } + + // in diff. loaded grid normal GameObject + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(go, new_cell); + + return true; + } + + // fail to move: normal GameObject attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} + +bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly) +{ + float resp_x, resp_y, resp_z, resp_o; + c->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o); + Cell resp_cell(resp_x, resp_y); + + //creature will be unloaded with grid + if (diffGridOnly && !c->GetCurrentCell().DiffGrid(resp_cell)) + return true; + + c->CombatStop(); + c->GetMotionMaster()->Clear(); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved from grid[{}, {}]cell[{}, {}] to respawn grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); +#endif + + // teleport it to respawn point (like normal respawn if player see) + if (CreatureCellRelocation(c, resp_cell)) + { + c->Relocate(resp_x, resp_y, resp_z, resp_o); + c->GetMotionMaster()->Initialize(); // prevent possible problems with default move generators + //CreatureRelocationNotify(c, resp_cell, resp_cell.GetCellCoord()); + c->UpdatePositionData(); + c->UpdateObjectVisibility(false); + return true; + } + return false; +} + +bool Map::GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly) +{ + float resp_x, resp_y, resp_z, resp_o; + go->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o); + Cell resp_cell(resp_x, resp_y); + + //GameObject will be unloaded with grid + if (diffGridOnly && !go->GetCurrentCell().DiffGrid(resp_cell)) + return true; + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved from grid[{}, {}]cell[{}, {}] to respawn grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), go->GetCurrentCell().GridX(), go->GetCurrentCell().GridY(), go->GetCurrentCell().CellX(), go->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); +#endif + + // teleport it to respawn point (like normal respawn if player see) + if (GameObjectCellRelocation(go, resp_cell)) + { + go->Relocate(resp_x, resp_y, resp_z, resp_o); + go->UpdatePositionData(); + go->UpdateObjectVisibility(false); + return true; + } + + return false; +} + +bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) +{ + const uint32 x = ngrid.getX(); + const uint32 y = ngrid.getY(); + + { + if (!unloadAll) + { + //pets, possessed creatures (must be active), transport passengers + if (ngrid.GetWorldObjectCountInNGrid()) + return false; + + if (ActiveObjectsNearGrid(ngrid)) + return false; + } + + LOG_DEBUG("maps", "Unloading grid[{}, {}] for map {}", x, y, GetId()); + + if (!unloadAll) + { + // Finish creature moves, remove and delete all creatures with delayed remove before moving to respawn grids + // Must know real mob position before move + MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); + + // move creatures to respawn grids if this is diff.grid or to remove list + ObjectGridEvacuator worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + + // Finish creature moves, remove and delete all creatures with delayed remove before unload + MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); + } + + { + ObjectGridCleaner worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + } + + RemoveAllObjectsInRemoveList(); + + { + ObjectGridUnloader worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + } + + ASSERT(i_objectsToRemove.empty()); + + delete& ngrid; + setNGrid(nullptr, x, y); + } + int gx = (MAX_NUMBER_OF_GRIDS - 1) - x; + int gy = (MAX_NUMBER_OF_GRIDS - 1) - y; + + // delete grid map, but don't delete if it is from parent map (and thus only reference) + //+++if (GridMaps[gx][gy]) don't check for GridMaps[gx][gy], we might have to unload vmaps + { + if (i_InstanceId == 0) + { + if (GridMaps[gx][gy]) + { + GridMaps[gx][gy]->unloadData(); + delete GridMaps[gx][gy]; + } + VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(GetId(), gx, gy); + MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(GetId(), gx, gy); + } + else + ((MapInstanced*)m_parentMap)->RemoveGridMapReference(GridCoord(gx, gy)); + + GridMaps[gx][gy] = nullptr; + } LOG_DEBUG("maps", "Unloading grid[{}, {}] for map {} finished", x, y, GetId()); return true; } @@ -1283,7 +1705,7 @@ void Map::UnloadAll() { NGridType& grid(*i->GetSource()); ++i; - UnloadGrid(grid); // deletes the grid and removes it from the GridRefMgr + UnloadGrid(grid, true); // deletes the grid and removes it from the GridRefMgr } // pussywizard: crashfix, some npc can be left on transport (not a default passenger) @@ -2639,6 +3061,20 @@ void Map::DelayedUpdate(const uint32 t_diff) } RemoveAllObjectsInRemoveList(); + + // Don't unload grids if it's battleground, since we may have manually added GOs, creatures, those doesn't load from DB at grid re-load ! + // This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended + if (!IsBattlegroundOrArena()) + { + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end();) + { + NGridType* grid = i->GetSource(); + GridInfo* info = i->GetSource()->getGridInfoRef(); + ++i; // The update might delete the map and we need the next map before the iterator gets invalid + ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE); + si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, t_diff); + } + } } void Map::AddObjectToRemoveList(WorldObject* obj) @@ -2698,7 +3134,6 @@ void Map::RemoveAllObjectsInRemoveList() { std::unordered_set::iterator itr = i_objectsToRemove.begin(); WorldObject* obj = *itr; - i_objectsToRemove.erase(itr); switch (obj->GetTypeId()) { @@ -2730,6 +3165,8 @@ void Map::RemoveAllObjectsInRemoveList() LOG_ERROR("maps", "Non-grid object (TypeId: {}) is in grid object remove list, ignored.", obj->GetTypeId()); break; } + + i_objectsToRemove.erase(itr); } //LOG_DEBUG("maps", "Object remover 2 check."); @@ -2750,6 +3187,43 @@ void Map::SendToPlayers(WorldPacket const* data) const itr->GetSource()->GetSession()->SendPacket(data); } +bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const +{ + CellCoord cell_min(ngrid.getX() * MAX_NUMBER_OF_CELLS, ngrid.getY() * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + //we must find visible range in cells so we unload only non-visible cells... + float viewDist = GetVisibilityRange(); + int cell_range = (int)ceilf(viewDist / SIZE_OF_GRID_CELL) + 1; + + cell_min.dec_x(cell_range); + cell_min.dec_y(cell_range); + cell_max.inc_x(cell_range); + cell_max.inc_y(cell_range); + + for (MapRefMgr::const_iterator iter = m_mapRefMgr.begin(); iter != m_mapRefMgr.end(); ++iter) + { + Player* player = iter->GetSource(); + + CellCoord p = Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); + if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) && + (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord)) + return true; + } + + for (ActiveNonPlayers::const_iterator iter = m_activeNonPlayers.begin(); iter != m_activeNonPlayers.end(); ++iter) + { + WorldObject* obj = *iter; + + CellCoord p = Acore::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); + if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) && + (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord)) + return true; + } + + return false; +} + template void Map::AddToActive(T* obj) { @@ -2760,6 +3234,22 @@ template <> void Map::AddToActive(Creature* c) { AddToActiveHelper(c); + + // also not allow unloading spawn grid to prevent creating creature clone at load + if (!c->IsPet() && c->GetSpawnId()) + { + float x, y, z; + c->GetRespawnPosition(x, y, z); + GridCoord p = Acore::ComputeGridCoord(x, y); + if (getNGrid(p.x_coord, p.y_coord)) + getNGrid(p.x_coord, p.y_coord)->incUnloadActiveLock(); + else + { + GridCoord p2 = Acore::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); + LOG_ERROR("maps", "Active creature {} added to grid[{}, {}] but spawn grid[{}, {}] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + } + } } template<> @@ -2784,6 +3274,22 @@ template <> void Map::RemoveFromActive(Creature* c) { RemoveFromActiveHelper(c); + + // also allow unloading spawn grid + if (!c->IsPet() && c->GetSpawnId()) + { + float x, y, z; + c->GetRespawnPosition(x, y, z); + GridCoord p = Acore::ComputeGridCoord(x, y); + if (getNGrid(p.x_coord, p.y_coord)) + getNGrid(p.x_coord, p.y_coord)->decUnloadActiveLock(); + else + { + GridCoord p2 = Acore::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); + LOG_ERROR("maps", "Active creature {} removed from grid[{}, {}] but spawn grid[{}, {}] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + } + } } template<> @@ -2810,8 +3316,8 @@ template void Map::RemoveFromMap(DynamicObject*, bool); /* ******* Dungeon Instance Maps ******* */ -InstanceMap::InstanceMap(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) - : Map(id, InstanceId, SpawnMode, _parent), +InstanceMap::InstanceMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) + : Map(id, expiry, InstanceId, SpawnMode, _parent), m_resetAfterUnload(false), m_unloadWhenEmpty(false), instance_data(nullptr), i_script_id(0) { @@ -2840,6 +3346,7 @@ void InstanceMap::InitVisibilityDistance() { //init visibility distance for instances m_VisibleDistance = World::GetMaxVisibleDistanceInInstances(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodInInstances(); // pussywizard: this CAN NOT exceed MAX_VISIBILITY_DISTANCE switch (GetId()) @@ -3219,8 +3726,8 @@ uint32 InstanceMap::GetMaxResetDelay() const /* ******* Battleground Instance Maps ******* */ -BattlegroundMap::BattlegroundMap(uint32 id, uint32 InstanceId, Map* _parent, uint8 spawnMode) - : Map(id, InstanceId, spawnMode, _parent), m_bg(nullptr) +BattlegroundMap::BattlegroundMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, Map* _parent, uint8 spawnMode) + : Map(id, expiry, InstanceId, spawnMode, _parent), m_bg(nullptr) { //lets initialize visibility distance for BG/Arenas BattlegroundMap::InitVisibilityDistance(); @@ -3240,6 +3747,7 @@ void BattlegroundMap::InitVisibilityDistance() { //init visibility distance for BG/Arenas m_VisibleDistance = World::GetMaxVisibleDistanceInBGArenas(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodInBGArenas(); if (IsBattleArena()) // pussywizard: start with 30yd visibility range on arenas to ensure players can't get informations about the opponents in any way m_VisibleDistance = 30.0f; diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 0bf6b9c184d71f..9b607a1afbc90f 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -71,7 +71,6 @@ namespace VMAP namespace Acore { struct ObjectUpdater; - struct LargeObjectUpdater; } struct ScriptAction @@ -312,7 +311,7 @@ class Map : public GridRefMgr { friend class MapReference; public: - Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); + Map(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); ~Map() override; [[nodiscard]] MapEntry const* GetEntry() const { return i_mapEntry; } @@ -337,13 +336,7 @@ class Map : public GridRefMgr template void RemoveFromMap(T*, bool); void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor); - void VisitNearbyCellsOfPlayer(Player* player, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor); + TypeContainerVisitor& worldVisitor); virtual void Update(const uint32, const uint32, bool thread = true); @@ -362,7 +355,7 @@ class Map : public GridRefMgr [[nodiscard]] bool IsRemovalGrid(float x, float y) const { GridCoord p = Acore::ComputeGridCoord(x, y); - return !getNGrid(p.x_coord, p.y_coord); + return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL; } [[nodiscard]] bool IsGridLoaded(float x, float y) const @@ -370,13 +363,26 @@ class Map : public GridRefMgr return IsGridLoaded(Acore::ComputeGridCoord(x, y)); } + bool GetUnloadLock(GridCoord const& p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); } + void SetUnloadLock(GridCoord const& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); } void LoadGrid(float x, float y); void LoadAllCells(); - bool UnloadGrid(NGridType& ngrid); + bool UnloadGrid(NGridType& ngrid, bool pForce); + void GridMarkNoUnload(uint32 x, uint32 y); + void GridUnmarkNoUnload(uint32 x, uint32 y); virtual void UnloadAll(); + void ResetGridExpiry(NGridType& grid, float factor = 1) const + { + grid.ResetTimeTracker(std::chrono::duration_cast(i_gridExpiry * factor)); + } + + [[nodiscard]] std::chrono::seconds GetGridExpiry(void) const { return i_gridExpiry; } [[nodiscard]] uint32 GetId() const { return i_mapEntry->MapID; } + static void InitStateMachine(); + static void DeleteStateMachine(); + static bool ExistMap(uint32 mapid, int gx, int gy); static bool ExistVMap(uint32 mapid, int gx, int gy); @@ -415,6 +421,10 @@ class Map : public GridRefMgr void RemoveAllObjectsInRemoveList(); virtual void RemoveAllPlayers(); + // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader + bool CreatureRespawnRelocation(Creature* c, bool diffGridOnly); + bool GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly); + [[nodiscard]] uint32 GetInstanceId() const { return i_InstanceId; } [[nodiscard]] uint8 GetSpawnMode() const { return (i_spawnMode); } @@ -468,12 +478,10 @@ class Map : public GridRefMgr void resetMarkedCells() { marked_cells.reset(); } bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); } void markCell(uint32 pCellId) { marked_cells.set(pCellId); } - void resetMarkedCellsLarge() { marked_cells_large.reset(); } - bool isCellMarkedLarge(uint32 pCellId) { return marked_cells_large.test(pCellId); } - void markCellLarge(uint32 pCellId) { marked_cells_large.set(pCellId); } [[nodiscard]] bool HavePlayers() const { return !m_mapRefMgr.IsEmpty(); } [[nodiscard]] uint32 GetPlayersCountExceptGMs() const; + [[nodiscard]] bool ActiveObjectsNearGrid(NGridType const& ngrid) const; void AddWorldObject(WorldObject* obj) { i_worldObjects.insert(obj); } void RemoveWorldObject(WorldObject* obj) { i_worldObjects.erase(obj); } @@ -660,20 +668,30 @@ class Map : public GridRefMgr // Load MMap Data void LoadMMap(int gx, int gy); + bool CreatureCellRelocation(Creature* creature, Cell new_cell); + bool GameObjectCellRelocation(GameObject* go, Cell new_cell); + bool DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell); + template void InitializeObject(T* obj); - void AddCreatureToMoveList(Creature* c); + void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang); void RemoveCreatureFromMoveList(Creature* c); - void AddGameObjectToMoveList(GameObject* go); + void AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang); void RemoveGameObjectFromMoveList(GameObject* go); - void AddDynamicObjectToMoveList(DynamicObject* go); + void AddDynamicObjectToMoveList(DynamicObject* go, float x, float y, float z, float ang); void RemoveDynamicObjectFromMoveList(DynamicObject* go); + bool _creatureToMoveLock; std::vector _creaturesToMove; + + bool _gameObjectsToMoveLock; std::vector _gameObjectsToMove; + + bool _dynamicObjectsToMoveLock; std::vector _dynamicObjectsToMove; [[nodiscard]] bool IsGridLoaded(const GridCoord&) const; void EnsureGridCreated_i(const GridCoord&); + void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object); void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); } @@ -695,6 +713,8 @@ class Map : public GridRefMgr void SendObjectUpdates(); protected: + void SetUnloadReferenceLock(GridCoord const& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); } + std::mutex Lock; std::mutex GridLock; std::shared_mutex MMapLock; @@ -710,6 +730,8 @@ class Map : public GridRefMgr MapRefMgr m_mapRefMgr; MapRefMgr::iterator m_mapRefIter; + int32 m_VisibilityNotifyPeriod; + typedef std::set ActiveNonPlayers; ActiveNonPlayers m_activeNonPlayers; ActiveNonPlayers::iterator m_activeNonPlayersIter; @@ -728,6 +750,8 @@ class Map : public GridRefMgr void _ScriptProcessDoor(Object* source, Object* target, const ScriptInfo* scriptInfo) const; GameObject* _FindGameObject(WorldObject* pWorldObject, ObjectGuid::LowType guid) const; + std::chrono::seconds i_gridExpiry; + //used for fast base_map (e.g. MapInstanced class object) search for //InstanceMaps and BattlegroundMaps... Map* m_parentMap; @@ -735,7 +759,10 @@ class Map : public GridRefMgr NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; GridMap* GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset marked_cells; - std::bitset marked_cells_large; + + //these functions used to process player/mob aggro reactions and + //visibility calculations. Highly optimized for massive calculations + void ProcessRelocationNotifies(uint32 diff); bool i_scriptLock; std::unordered_set i_objectsToRemove; @@ -812,7 +839,7 @@ enum InstanceResetMethod class InstanceMap : public Map { public: - InstanceMap(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent); + InstanceMap(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent); ~InstanceMap() override; bool AddPlayerToMap(Player*) override; void RemovePlayerFromMap(Player*, bool) override; @@ -846,7 +873,7 @@ class InstanceMap : public Map class BattlegroundMap : public Map { public: - BattlegroundMap(uint32 id, uint32 InstanceId, Map* _parent, uint8 spawnMode); + BattlegroundMap(uint32 id, std::chrono::seconds, uint32 InstanceId, Map* _parent, uint8 spawnMode); ~BattlegroundMap() override; bool AddPlayerToMap(Player*) override; diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 12c6acf6b5e660..2ce5bbfbc108e4 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -26,10 +26,10 @@ #include "ScriptMgr.h" #include "VMapFactory.h" -MapInstanced::MapInstanced(uint32 id) : Map(id, 0, DUNGEON_DIFFICULTY_NORMAL) +MapInstanced::MapInstanced(uint32 id, std::chrono::seconds expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL) { - // initialize instanced maps list - m_InstancedMaps.clear(); + // fill with zero + memset(&GridMapReference, 0, MAX_NUMBER_OF_GRIDS * MAX_NUMBER_OF_GRIDS * sizeof(uint16)); } void MapInstanced::InitVisibilityDistance() @@ -203,7 +203,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, LOG_DEBUG("maps", "MapInstanced::CreateInstance: {} map instance {} for {} created with difficulty {}", save ? "" : "new ", InstanceId, GetId(), difficulty ? "heroic" : "normal"); - InstanceMap* map = new InstanceMap(GetId(), InstanceId, difficulty, this); + InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this); ASSERT(map->IsDungeon()); map->LoadRespawnTimes(); @@ -237,7 +237,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun else spawnMode = REGULAR_DIFFICULTY; - BattlegroundMap* map = new BattlegroundMap(GetId(), InstanceId, this, spawnMode); + BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattlegroundOrArena()); map->SetBG(bg); bg->SetBgMap(map); diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index f08c5687acbd4e..fd86b8fa612973 100644 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -28,7 +28,7 @@ class MapInstanced : public Map public: using InstancedMaps = std::unordered_map; - MapInstanced(uint32 id); + MapInstanced(uint32 id, std::chrono::seconds expiry); ~MapInstanced() override {} // functions overwrite Map versions @@ -46,6 +46,19 @@ class MapInstanced : public Map } bool DestroyInstance(InstancedMaps::iterator& itr); + void AddGridMapReference(GridCoord const& p) + { + ++GridMapReference[p.x_coord][p.y_coord]; + SetUnloadReferenceLock(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - p.x_coord, (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord), true); + } + + void RemoveGridMapReference(GridCoord const& p) + { + --GridMapReference[p.x_coord][p.y_coord]; + if (!GridMapReference[p.x_coord][p.y_coord]) + SetUnloadReferenceLock(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - p.x_coord, (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord), false); + } + InstancedMaps& GetInstancedMaps() { return m_InstancedMaps; } void InitVisibilityDistance() override; @@ -54,5 +67,7 @@ class MapInstanced : public Map BattlegroundMap* CreateBattleground(uint32 InstanceId, Battleground* bg); InstancedMaps m_InstancedMaps; + + uint16 GridMapReference[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; }; #endif diff --git a/src/server/game/Maps/MapMgr.cpp b/src/server/game/Maps/MapMgr.cpp index 9e89d64e219daa..980b7898fd9737 100644 --- a/src/server/game/Maps/MapMgr.cpp +++ b/src/server/game/Maps/MapMgr.cpp @@ -36,6 +36,7 @@ MapMgr::MapMgr() { + i_gridCleanUpDelay = sWorld->getIntConfig(CONFIG_INTERVAL_GRIDCLEAN); i_timer[3].SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE)); mapUpdateStep = 0; _nextInstanceId = 0; @@ -53,6 +54,8 @@ MapMgr* MapMgr::instance() void MapMgr::Initialize() { + Map::InitStateMachine(); + int num_threads(sWorld->getIntConfig(CONFIG_NUMTHREADS)); // Start mtmaps if needed @@ -81,10 +84,10 @@ Map* MapMgr::CreateBaseMap(uint32 id) ASSERT(entry); if (entry->Instanceable()) - map = new MapInstanced(id); + map = new MapInstanced(id, std::chrono::seconds(i_gridCleanUpDelay)); else { - map = new Map(id, 0, REGULAR_DIFFICULTY); + map = new Map(id, std::chrono::seconds(i_gridCleanUpDelay), 0, REGULAR_DIFFICULTY); map->LoadRespawnTimes(); map->LoadCorpseData(); } @@ -333,6 +336,8 @@ void MapMgr::UnloadAll() if (m_updater.activated()) m_updater.deactivate(); + + Map::DeleteStateMachine(); } void MapMgr::GetNumInstances(uint32& dungeons, uint32& battlegrounds, uint32& arenas) diff --git a/src/server/game/Maps/MapMgr.h b/src/server/game/Maps/MapMgr.h index 828fe548eb5f0f..f8f86e78e0b942 100644 --- a/src/server/game/Maps/MapMgr.h +++ b/src/server/game/Maps/MapMgr.h @@ -24,6 +24,7 @@ #include "MapInstanced.h" #include "MapUpdater.h" #include "Object.h" +#include "GridStates.h" #include @@ -73,6 +74,14 @@ class MapMgr void Initialize(void); void Update(uint32); + void SetGridCleanUpDelay(uint32 t) + { + if (t < MIN_GRID_DELAY) + i_gridCleanUpDelay = MIN_GRID_DELAY; + else + i_gridCleanUpDelay = t; + } + void SetMapUpdateInterval(uint32 t) { if (t < MIN_MAP_UPDATE_DELAY) @@ -170,6 +179,7 @@ class MapMgr MapMgr& operator=(const MapMgr&); std::mutex Lock; + uint32 i_gridCleanUpDelay; MapMapType i_maps; IntervalTimer i_timer[4]; // continents, bgs/arenas, instances, total from the beginning uint8 mapUpdateStep; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 27a3b8971f82a6..ef96f53f430691 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1602,8 +1602,8 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); } - target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true); - target->bRequestForcedVisibilityUpdate = false; + if (target->IsInWorld()) + target->UpdateObjectVisibility(); } void AuraEffect::HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -1676,8 +1676,8 @@ void AuraEffect::HandleModStealth(AuraApplication const* aurApp, uint8 mode, boo target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); } - target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true); - target->bRequestForcedVisibilityUpdate = false; + if (target->IsInWorld()) + target->UpdateObjectVisibility(); } void AuraEffect::HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -1841,7 +1841,6 @@ void AuraEffect::HandlePhase(AuraApplication const* aurApp, uint8 mode, bool app if (!target->GetMap()->Instanceable()) { target->UpdateObjectVisibility(false); - target->m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f); } else target->UpdateObjectVisibility(); diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index f035470e1b12ee..addd4069f0c6ce 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -208,6 +208,7 @@ enum WorldFloatConfigs enum WorldIntConfigs { CONFIG_COMPRESSION = 0, + CONFIG_INTERVAL_GRIDCLEAN, CONFIG_INTERVAL_MAPUPDATE, CONFIG_INTERVAL_CHANGEWEATHER, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index eb4785b61b6bcb..951d327254d26e 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -109,6 +109,10 @@ float World::_maxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE; float World::_maxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE; float World::_maxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS; +int32 World::m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +int32 World::m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +int32 World::m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD; + Realm realm; /// World constructor @@ -666,6 +670,14 @@ void World::LoadConfigSettings(bool reload) LOG_ERROR("server.loading", "PlayerSave.Stats.MinLevel ({}) must be in range 0..80. Using default, do not save character stats (0).", _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]); _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0; } + _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfigMgr->GetOption("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS); + if (_int_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY) + { + LOG_ERROR("server.loading", "GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", _int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); + _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY; + } + if (reload) + sMapMgr->SetGridCleanUpDelay(_int_configs[CONFIG_INTERVAL_GRIDCLEAN]); _int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption("MapUpdateInterval", 10); if (_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY) @@ -1260,6 +1272,10 @@ void World::LoadConfigSettings(bool reload) _maxVisibleDistanceInBGArenas = MAX_VISIBILITY_DISTANCE; } + m_visibility_notify_periodOnContinents = sConfigMgr->GetOption("Visibility.Notify.Period.OnContinents", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + m_visibility_notify_periodInInstances = sConfigMgr->GetOption("Visibility.Notify.Period.InInstances", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + m_visibility_notify_periodInBGArenas = sConfigMgr->GetOption("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + ///- Load the CharDelete related config options _int_configs[CONFIG_CHARDELETE_METHOD] = sConfigMgr->GetOption("CharDelete.Method", 0); _int_configs[CONFIG_CHARDELETE_MIN_LEVEL] = sConfigMgr->GetOption("CharDelete.MinLevel", 0); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index de373358a63d3f..68a349969db9f9 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -322,6 +322,10 @@ class World: public IWorld static float GetMaxVisibleDistanceInInstances() { return _maxVisibleDistanceInInstances; } static float GetMaxVisibleDistanceInBGArenas() { return _maxVisibleDistanceInBGArenas; } + static int32 GetVisibilityNotifyPeriodOnContinents() { return m_visibility_notify_periodOnContinents; } + static int32 GetVisibilityNotifyPeriodInInstances() { return m_visibility_notify_periodInInstances; } + static int32 GetVisibilityNotifyPeriodInBGArenas() { return m_visibility_notify_periodInBGArenas; } + // our: needed for arena spectator subscriptions uint32 GetNextWhoListUpdateDelaySecs() override; @@ -409,6 +413,10 @@ class World: public IWorld static float _maxVisibleDistanceInInstances; static float _maxVisibleDistanceInBGArenas; + static int32 m_visibility_notify_periodOnContinents; + static int32 m_visibility_notify_periodInInstances; + static int32 m_visibility_notify_periodInBGArenas; + std::string _realmName; // CLI command holder to be thread safe diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 8c9b251bb1d6bf..1a26028846b9eb 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -145,8 +145,6 @@ struct npc_midsummer_torch_target : public ScriptedAI int8 num = urand(0, posVec.size() - 1); Position pos; pos.Relocate(posVec.at(num)); - me->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f); - me->m_last_notify_mstime = GameTime::GetGameTimeMS().count() + 10000; me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 726e2523bfadb1..4817b8d86171cc 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -443,8 +443,6 @@ class spell_alar_ember_blast_death : public SpellScriptLoader GetUnitOwner()->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); GetUnitOwner()->SetStandState(UNIT_STAND_STATE_DEAD); - GetUnitOwner()->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f); - GetUnitOwner()->m_delayed_unit_relocation_timer = 1000; } void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) From c25d0b38e8c035faf1a550b42c7b67a032e4ab14 Mon Sep 17 00:00:00 2001 From: KJack Date: Thu, 28 Sep 2023 16:39:57 -0400 Subject: [PATCH 138/340] feat(Core/GameObject): Implement `OnGameObjectModifyHealth()` hook (#17374) --- .../game/Entities/GameObject/GameObject.cpp | 9 ++++++++- .../Scripting/ScriptDefines/GameObjectScript.cpp | 15 +++++++++++++++ src/server/game/Scripting/ScriptMgr.h | 7 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index ef2723897b6855..aa164d4f75f94a 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -2279,7 +2279,14 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/ if (!IsDestructibleBuilding()) return; - if (!m_goValue.Building.MaxHealth || !change) + // if this building doesn't have health, return + if (!m_goValue.Building.MaxHealth) + return; + + sScriptMgr->OnGameObjectModifyHealth(this, attackerOrHealer, change, sSpellMgr->GetSpellInfo(spellId)); + + // if the health isn't being changed, return + if (!change) return; if (!m_allowModifyDestructibleBuilding) diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp index 07b614f9c58a7b..54dc08228cfd19 100644 --- a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp @@ -160,6 +160,21 @@ void ScriptMgr::OnGameObjectDamaged(GameObject* go, Player* player) } } +void ScriptMgr::OnGameObjectModifyHealth(GameObject* go, Unit* attackerOrHealer, int32& change, SpellInfo const* spellInfo) +{ + ASSERT(go); + + ExecuteScript([&](AllGameObjectScript* script) + { + script->OnGameObjectModifyHealth(go, attackerOrHealer, change, spellInfo); + }); + + if (auto tempScript = ScriptRegistry::GetScriptById(go->GetScriptId())) + { + tempScript->OnModifyHealth(go, attackerOrHealer, change, spellInfo); + } +} + void ScriptMgr::OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit) { ASSERT(go); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 088d6b4cc359f2..5827e1612d78f5 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -705,6 +705,9 @@ class AllGameObjectScript : public ScriptObject // Called when the game object is damaged (destructible buildings only). virtual void OnGameObjectDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnGameObjectModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + // Called when the game object loot state is changed. virtual void OnGameObjectLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } @@ -787,6 +790,9 @@ class GameObjectScript : public ScriptObject, public UpdatableScript // Called when the game object is damaged (destructible buildings only). virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + // Called when the game object loot state is changed. virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } @@ -2228,6 +2234,7 @@ class ScriptMgr uint32 GetDialogStatus(Player* player, GameObject* go); void OnGameObjectDestroyed(GameObject* go, Player* player); void OnGameObjectDamaged(GameObject* go, Player* player); + void OnGameObjectModifyHealth(GameObject* go, Unit* attackerOrHealer, int32& change, SpellInfo const* spellInfo); void OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit); void OnGameObjectStateChanged(GameObject* go, uint32 state); void OnGameObjectUpdate(GameObject* go, uint32 diff); From 7a1c303d494fb47c2e95e377a13ab2c9d839fde1 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Fri, 29 Sep 2023 18:30:35 +0200 Subject: [PATCH 139/340] =?UTF-8?q?refactor(Scripts/Midsummer):=20Assign?= =?UTF-8?q?=20enum=20values=20to=20gameobjects=20and=20sp=E2=80=A6=20(#173?= =?UTF-8?q?79)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(Scripts/Midsummer): Assign enum values to gameobjects and spells * rename GO_TORCH_TOSS_TARGET_BUNNY to NPC_TORCH_TOSS_TARGET_BUNNY * add more enum values to enum flingTorch --- src/server/scripts/Events/midsummer.cpp | 41 ++++++++++++++++++------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 1a26028846b9eb..784ae0f70574b1 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -46,6 +46,19 @@ class go_midsummer_bonfire : public GameObjectScript } }; +enum torchToss +{ + GO_TORCH_TARGET_BRAZIER = 187708, + NPC_TORCH_TOSS_TARGET_BUNNY = 25535, + + SPELL_TARGET_INDICATOR_RANK_1 = 43313, + SPELL_TORCH_TOSS_LAND = 46054, + SPELL_BRAZIERS_HIT_VISUAL = 45724, + SPELL_TORCH_TOSS_SUCCESS_A = 45719, + SPELL_TORCH_TOSS_SUCCESS_H = 46651, + SPELL_TORCH_TOSS_TRAINING = 45716, +}; + struct npc_midsummer_torch_target : public ScriptedAI { npc_midsummer_torch_target(Creature* creature) : ScriptedAI(creature) @@ -54,7 +67,7 @@ struct npc_midsummer_torch_target : public ScriptedAI startTimer = 1; posVec.clear(); playerGUID.Clear(); - me->CastSpell(me, 43313, true); + me->CastSpell(me, SPELL_TARGET_INDICATOR_RANK_1, true); counter = 0; maxCount = 0; } @@ -82,12 +95,12 @@ struct npc_midsummer_torch_target : public ScriptedAI if (posVec.empty()) return; // Triggered spell from torch - if (spellInfo->Id == 46054 && caster->GetTypeId() == TYPEID_PLAYER) + if (spellInfo->Id == SPELL_TORCH_TOSS_LAND && caster->GetTypeId() == TYPEID_PLAYER) { - me->CastSpell(me, 45724, true); // hit visual anim + me->CastSpell(me, SPELL_BRAZIERS_HIT_VISUAL, true); // hit visual anim if (++counter >= maxCount) { - caster->CastSpell(caster, (caster->ToPlayer()->GetTeamId() ? 46651 : 45719), true); // quest complete spell + caster->CastSpell(caster, (caster->ToPlayer()->GetTeamId() ? SPELL_TORCH_TOSS_SUCCESS_H : SPELL_TORCH_TOSS_SUCCESS_A), true); // quest complete spell me->DespawnOrUnsummon(1); return; } @@ -129,7 +142,7 @@ struct npc_midsummer_torch_target : public ScriptedAI void FillPositions() { std::list gobjList; - me->GetGameObjectListWithEntryInGrid(gobjList, 187708 /*TORCH_GO*/, 30.0f); + me->GetGameObjectListWithEntryInGrid(gobjList, GO_TORCH_TARGET_BRAZIER, 30.0f); for (std::list::const_iterator itr = gobjList.begin(); itr != gobjList.end(); ++itr) { Position pos; @@ -299,10 +312,10 @@ class spell_midsummer_torch_quest : public AuraScript void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* ar = GetTarget(); - if (Creature* cr = ar->SummonCreature(25535, ar->GetPositionX(), ar->GetPositionY(), ar->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) + if (Creature* cr = ar->SummonCreature(NPC_TORCH_TOSS_TARGET_BUNNY, ar->GetPositionX(), ar->GetPositionY(), ar->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) { torchGUID = cr->GetGUID(); - CAST_AI(npc_midsummer_torch_target, cr->AI())->SetPlayerGUID(ar->GetGUID(), (GetId() == 45716 ? 8 : 20)); + CAST_AI(npc_midsummer_torch_target, cr->AI())->SetPlayerGUID(ar->GetGUID(), (GetId() == SPELL_TORCH_TOSS_TRAINING ? 8 : 20)); } } @@ -327,7 +340,13 @@ enum flingTorch SPELL_FLING_TORCH_DUMMY = 46747, SPELL_MISSED_TORCH = 45676, SPELL_TORCH_COUNTER = 45693, - SPELL_TORCH_SHADOW = 46105 + SPELL_TORCH_SHADOW = 46105, + SPELL_TORCH_CATCH_SUCCESS_A = 46081, + SPELL_TORCH_CATCH_SUCCESS_H = 46654, + SPELL_JUGGLE_TORCH = 45671, + + QUEST_MORE_TORCH_TOSS_A = 11924, + QUEST_MORE_TORCH_TOSS_H = 11925, }; class spell_midsummer_fling_torch : public SpellScript @@ -410,13 +429,13 @@ class spell_midsummer_fling_torch : public SpellScript { aur->ModStackAmount(1); uint8 count = 4; - if (target->GetQuestStatus(target->GetTeamId() ? 11925 : 11924) == QUEST_STATUS_INCOMPLETE) // More Torch Catching quests + if (target->GetQuestStatus(target->GetTeamId() ? QUEST_MORE_TORCH_TOSS_H : QUEST_MORE_TORCH_TOSS_A) == QUEST_STATUS_INCOMPLETE) // More Torch Catching quests count = 10; if (aur->GetStackAmount() >= count) { //target->CastSpell(target, 46711, true); // Set Flag: all torch returning quests are complete - target->CastSpell(target, (target->GetTeamId() ? 46654 : 46081), true); // Quest completion + target->CastSpell(target, (target->GetTeamId() ? SPELL_TORCH_CATCH_SUCCESS_H : SPELL_TORCH_CATCH_SUCCESS_A), true); // Quest completion aur->SetDuration(1); return; } @@ -431,7 +450,7 @@ class spell_midsummer_fling_torch : public SpellScript void Register() override { AfterCast += SpellCastFn(spell_midsummer_fling_torch::HandleFinish); - if (m_scriptSpellId == 45671) + if (m_scriptSpellId == SPELL_JUGGLE_TORCH) { OnCheckCast += SpellCheckCastFn(spell_midsummer_fling_torch::CheckCast); OnEffectHitTarget += SpellEffectFn(spell_midsummer_fling_torch::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); From a997d791e789e3d1d688f9b4737782806121b5e7 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:53:01 -0300 Subject: [PATCH 140/340] =?UTF-8?q?fix(DB/Conditions):=20Archmage=20Leryda?= =?UTF-8?q?=20ring=20retrieve=20gossip=20should=20requi=E2=80=A6=20(#17385?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/Conditions): Archmage Leryda ring retrieve gossip should require having the quest rewarded instead of taken --- data/sql/updates/pending_db_world/rev_1695958565247447300.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695958565247447300.sql diff --git a/data/sql/updates/pending_db_world/rev_1695958565247447300.sql b/data/sql/updates/pending_db_world/rev_1695958565247447300.sql new file mode 100644 index 00000000000000..f0a5f79080c04c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695958565247447300.sql @@ -0,0 +1,2 @@ +-- +UPDATE `conditions` SET `ConditionTypeOrReference` = 8 WHERE `SourceGroup` = 8441 AND `ConditionTypeOrReference` = 9; From b9829b0e94c0746f92cd5babe5bdc69c386663a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 Sep 2023 21:54:17 +0000 Subject: [PATCH 141/340] chore(DB): import pending files Referenced commit(s): a997d791e789e3d1d688f9b4737782806121b5e7 --- .../rev_1695958565247447300.sql => db_world/2023_09_29_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695958565247447300.sql => db_world/2023_09_29_00.sql} (73%) diff --git a/data/sql/updates/pending_db_world/rev_1695958565247447300.sql b/data/sql/updates/db_world/2023_09_29_00.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1695958565247447300.sql rename to data/sql/updates/db_world/2023_09_29_00.sql index f0a5f79080c04c..01f923c0ad8974 100644 --- a/data/sql/updates/pending_db_world/rev_1695958565247447300.sql +++ b/data/sql/updates/db_world/2023_09_29_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_09_27_02 -> 2023_09_29_00 -- UPDATE `conditions` SET `ConditionTypeOrReference` = 8 WHERE `SourceGroup` = 8441 AND `ConditionTypeOrReference` = 9; From 1004dae7e58d5d46050620b211ae3664d7ecc180 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Sat, 30 Sep 2023 09:54:27 +0200 Subject: [PATCH 142/340] refactor(Scripts/Midsummer): Add/Update Validate() for spell checks (#17390) --- src/server/scripts/Events/midsummer.cpp | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 784ae0f70574b1..e74b0a3defeb82 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -180,7 +180,7 @@ class spell_gen_crab_disguise : public AuraScript bool Validate(SpellInfo const* /*spell*/) override { - return ValidateSpellInfo({ SPELL_CRAB_DISGUISE }); + return ValidateSpellInfo({ SPELL_APPLY_DIGUISE, SPELL_FADE_DIGUISE }); } void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) @@ -353,6 +353,19 @@ class spell_midsummer_fling_torch : public SpellScript { PrepareSpellScript(spell_midsummer_fling_torch); + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_FLING_TORCH, + SPELL_TORCH_SHADOW, + SPELL_MISSED_TORCH, + SPELL_TORCH_CATCH_SUCCESS_A, + SPELL_TORCH_CATCH_SUCCESS_H, + SPELL_TORCH_COUNTER + }); + } + bool handled; bool Load() override { handled = false; return true; } @@ -483,6 +496,21 @@ class spell_midsummer_juggling_torch : public SpellScript { PrepareSpellScript(spell_midsummer_juggling_torch); + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_JUGGLE_SELF, + SPELL_JUGGLE_SLOW, + SPELL_JUGGLE_MED, + SPELL_JUGGLE_FAST, + SPELL_TORCH_SHADOW_SELF, + SPELL_TORCH_SHADOW_SLOW, + SPELL_TORCH_SHADOW_MED, + SPELL_TORCH_SHADOW_FAST + }); + } + void HandleFinish() { Unit* caster = GetCaster(); From f583dbe98cbd80ec980bbf3bc94c1f366d609196 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Sep 2023 15:34:18 -0300 Subject: [PATCH 143/340] fix(Scripts/Karazhan): Restore Netherspite DestroyPortals() function (#17392) --- .../Karazhan/boss_netherspite.cpp | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 78c548127e7cf7..80f09e54706bbc 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -101,12 +101,7 @@ struct boss_netherspite : public BossAI BossAI::Reset(); berserk = false; HandleDoors(true); - - for (int i = 0; i < 3; ++i) - { - PortalGUID[i].Clear(); - BeamTarget[i].Clear(); - } + DestroyPortals(); } void SummonPortals() @@ -225,6 +220,24 @@ struct boss_netherspite : public BossAI }); } + void DestroyPortals() + { + for (int i = 0; i < 3; ++i) + { + if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[i])) + { + portal->DisappearAndDie(); + } + if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i])) + { + portal->DisappearAndDie(); + } + + PortalGUID[i].Clear(); + BeamTarget[i].Clear(); + } + } + void SwitchToBanishPhase() { Talk(EMOTE_PHASE_BANISH); @@ -234,16 +247,7 @@ struct boss_netherspite : public BossAI DoCastSelf(SPELL_BANISH_VISUAL, true); DoCastSelf(SPELL_BANISH_ROOT, true); - for (uint32 id : PortalID) - { - summons.DespawnEntry(id); - } - - for (int i = 0; i < 3; ++i) - { - PortalGUID[i].Clear(); - BeamTarget[i].Clear(); - } + DestroyPortals(); scheduler.Schedule(30s, [this](TaskContext) { From 547628fe7014fa0191bb0348d8cde7bfaf9f985d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:59:15 -0300 Subject: [PATCH 144/340] =?UTF-8?q?fix(Scripts/Spells):=20Fix=20Dash=20app?= =?UTF-8?q?lying=20bonuses=20in=20other=20forms=20(restor=E2=80=A6=20(#173?= =?UTF-8?q?93)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Spells): Fix Dash applying bonuses in other forms (restores previous code functionality) --- src/server/scripts/Spells/spell_druid.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 27f3cdece3996e..fafeb286a9123a 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -410,6 +410,26 @@ class spell_dru_dash : public SpellScript } }; +// -1850 - Dash +class spell_dru_dash_aura : public AuraScript +{ + PrepareAuraScript(spell_dru_dash_aura); + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + // do not set speed if not in cat form + if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT) + { + amount = 0; + } + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash_aura::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED); + } +}; + // 5229 - Enrage class spell_dru_enrage : public AuraScript { @@ -1185,7 +1205,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_barkskin); RegisterSpellScript(spell_dru_treant_scaling); RegisterSpellScript(spell_dru_berserk); - RegisterSpellScript(spell_dru_dash); + RegisterSpellAndAuraScriptPair(spell_dru_dash, spell_dru_dash_aura); RegisterSpellScript(spell_dru_enrage); RegisterSpellScript(spell_dru_glyph_of_starfire); RegisterSpellScript(spell_dru_idol_lifebloom); From 7de2405604c0d9da2d76539696ecbab31f4165eb Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Sep 2023 22:13:49 -0300 Subject: [PATCH 145/340] fix(Scripts/Karazhan): Several Aran fixes (#17394) - Fix drinking being interrupted by dots - Fix first super timer - Fix missing Arcane Explosion emote - Fix supers being locked by spell interrupt - Correct drinking to 10% mana down from 20% --- .../rev_1696108618524876800.sql | 4 + .../game/Entities/Creature/Creature.cpp | 8 + src/server/game/Entities/Creature/Creature.h | 1 + .../Karazhan/boss_shade_of_aran.cpp | 202 ++++++++++-------- 4 files changed, 121 insertions(+), 94 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696108618524876800.sql diff --git a/data/sql/updates/pending_db_world/rev_1696108618524876800.sql b/data/sql/updates/pending_db_world/rev_1696108618524876800.sql new file mode 100644 index 00000000000000..088dea281bfbad --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696108618524876800.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_text` WHERE `CreatureId` = 16524 AND `GroupID` = 10; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(16524, 10, 0, '%s begins channelling his mana into a powerful arcane spell.', 16, 0, 100, 13515, 3, 'Shade of Aran EMOTE_ARCANE_EXPLOSION'); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f64bf3a3e55772..d86bc3b4571329 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2748,6 +2748,14 @@ bool Creature::IsSpellProhibited(SpellSchoolMask idSchoolMask) const return false; } +void Creature::ClearProhibitedSpellTimers() +{ + for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) + { + m_ProhibitSchoolTime[i] = 0; + } +} + void Creature::_AddCreatureSpellCooldown(uint32 spell_id, uint16 categoryId, uint32 end_time) { CreatureSpellCooldown spellCooldown; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index d0a6b8b720b6d9..06debd25ec5aa5 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -165,6 +165,7 @@ class Creature : public Unit, public GridObject, public MovableMapObje [[nodiscard]] uint32 GetSpellCooldown(uint32 spell_id) const; void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override; [[nodiscard]] bool IsSpellProhibited(SpellSchoolMask idSchoolMask) const; + void ClearProhibitedSpellTimers(); [[nodiscard]] bool HasSpell(uint32 spellID) const override; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index e8413ef4858f94..01a3c39b56461f 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -24,15 +24,17 @@ enum Texts { - SAY_AGGRO = 0, - SAY_FLAMEWREATH = 1, - SAY_BLIZZARD = 2, - SAY_EXPLOSION = 3, - SAY_DRINK = 4, - SAY_ELEMENTALS = 5, - SAY_KILL = 6, - SAY_TIMEOVER = 7, - SAY_DEATH = 8 + SAY_AGGRO = 0, + SAY_FLAMEWREATH = 1, + SAY_BLIZZARD = 2, + SAY_EXPLOSION = 3, + SAY_DRINK = 4, + SAY_ELEMENTALS = 5, + SAY_KILL = 6, + SAY_TIMEOVER = 7, + SAY_DEATH = 8, + SAY_ATIESH = 9, + EMOTE_ARCANE_EXPLOSION = 10 }; enum Spells @@ -103,19 +105,11 @@ struct boss_shade_of_aran : public BossAI }); } - uint8 LastSuperSpell; - - ObjectGuid FlameWreathTarget[3]; - float FWTargPosX[3]; - float FWTargPosY[3]; - - uint32 CurrentNormalSpell; - void Reset() override { BossAI::Reset(); _drinkScheduler.CancelAll(); - LastSuperSpell = rand() % 3; + _lastSuperSpell = rand() % 3; for (uint8 i = 0; i < 3; ++i) FlameWreathTarget[i].Clear(); @@ -127,9 +121,7 @@ struct boss_shade_of_aran : public BossAI _frostCooledDown = true; _drinking = false; - - // Not in progress - instance->SetData(DATA_ARAN, NOT_STARTED); + _hasDrunk = false; if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) { @@ -207,6 +199,25 @@ struct boss_shade_of_aran : public BossAI } } + void DamageTaken(Unit* doneBy, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override + { + BossAI::DamageTaken(doneBy, damage, damagetype, damageSchoolMask); + + if ((damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE) && _drinking && me->GetReactState() == REACT_PASSIVE) + { + me->RemoveAurasDueToSpell(SPELL_DRINK); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + _drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinkScheduler.Schedule(1s, [this](TaskContext) + { + DoCastSelf(SPELL_AOE_PYROBLAST, false); + _drinking = false; + }); + } + } + void JustEngagedWith(Unit* /*who*/) override { _JustEngagedWith(); @@ -222,11 +233,14 @@ struct boss_shade_of_aran : public BossAI } }).Schedule(1s, [this](TaskContext context) { - if (!me->IsNonMeleeSpellCast(false) && !_drinking) + context.Repeat(2s); + + if (!_drinking) { - Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true); - if (!target) + if (me->IsNonMeleeSpellCast(false)) + { return; + } uint32 Spells[3]; uint8 AvailableSpells = 0; @@ -248,27 +262,69 @@ struct boss_shade_of_aran : public BossAI ++AvailableSpells; } + // Should drink at 10%, need 10% mana for mass polymorph + if (!_hasDrunk && me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 13) + { + _drinking = true; + _hasDrunk = true; + me->InterruptNonMeleeSpells(true); + Talk(SAY_DRINK); + DoCastAOE(SPELL_MASS_POLY); + me->SetReactState(REACT_PASSIVE); + + // Start drinking after conjuring drinks + _drinkScheduler.Schedule(2s, GROUP_DRINKING, [this](TaskContext) + { + DoCastSelf(SPELL_CONJURE); + }).Schedule(4s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_SIT); + DoCastSelf(SPELL_DRINK); + }); + + _drinkScheduler.Schedule(10s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + DoCastSelf(SPELL_AOE_PYROBLAST); + _drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinking = false; + }); + + return; + } + //If no available spells wait 1 second and try again if (AvailableSpells) { CurrentNormalSpell = Spells[rand() % AvailableSpells]; - if (!me->CanCastSpell(CurrentNormalSpell)) - { - me->SetWalk(false); - me->ResumeChasingVictim(); - } - else + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(CurrentNormalSpell)) { - DoCast(target, CurrentNormalSpell); - if (me->GetVictim()) + if (int32(me->GetPower(POWER_MANA)) < spellInfo->CalcPowerCost(me, (SpellSchoolMask)spellInfo->SchoolMask)) { - me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f); + DoCastSelf(SPELL_POTION); + } + else + { + if (!me->CanCastSpell(CurrentNormalSpell)) + { + me->SetWalk(false); + me->ResumeChasingVictim(); + } + else + { + DoCastRandomTarget(CurrentNormalSpell, 0, 100.0f); + if (me->GetVictim()) + { + me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f); + } + } } } } } - context.Repeat(2s); }).Schedule(5s, [this](TaskContext context) { if (!_drinking) @@ -284,13 +340,17 @@ struct boss_shade_of_aran : public BossAI } } context.Repeat(5s, 20s); - }).Schedule(35s, [this](TaskContext context) + }).Schedule(6s, [this](TaskContext context) { if (!_drinking) { + me->ClearProhibitedSpellTimers(); + + DoCastSelf(SPELL_BLINK_CENTER, true); + uint8 Available[2]; - switch (LastSuperSpell) + switch (_lastSuperSpell) { case SUPER_AE: Available[0] = SUPER_FLAME; @@ -306,14 +366,13 @@ struct boss_shade_of_aran : public BossAI break; } - LastSuperSpell = Available[urand(0, 1)]; + _lastSuperSpell = Available[urand(0, 1)]; - switch (LastSuperSpell) + switch (_lastSuperSpell) { case SUPER_AE: Talk(SAY_EXPLOSION); - - DoCastSelf(SPELL_BLINK_CENTER, true); + Talk(EMOTE_ARCANE_EXPLOSION); DoCastSelf(SPELL_PLAYERPULL, true); DoCastSelf(SPELL_MASSSLOW, true); DoCastSelf(SPELL_AEXPLOSION, false); @@ -356,56 +415,6 @@ struct boss_shade_of_aran : public BossAI } } context.Repeat(35s, 40s); - }).Schedule(1s, [this](TaskContext context){ - if (me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 20) - { - _drinking = true; - me->InterruptNonMeleeSpells(true); - Talk(SAY_DRINK); - DoCastSelf(SPELL_MASS_POLY, true); - DoCastSelf(SPELL_CONJURE, false); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SIT); - DoCastSelf(SPELL_DRINK, true); - _currentHealth = me->GetHealth(); - _drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) - { - //check for damage to interrupt - if (me->GetHealth() < _currentHealth) - { - me->RemoveAurasDueToSpell(SPELL_DRINK); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, false); - _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinkScheduler.Schedule(1s, [this](TaskContext) - { - DoCastSelf(SPELL_AOE_PYROBLAST, false); - }).Schedule(3s, [this](TaskContext) - { - _drinking = false; - }); - } else - { - context.Repeat(500ms); - } - }).Schedule(10s, GROUP_DRINKING, [this](TaskContext) - { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, true); - DoCastSelf(SPELL_AOE_PYROBLAST, false); - _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinking = false; - }); - context.Repeat(12s); //semi-arbitrary duration to envelop drinking duration - } - else - { - context.Repeat(1s); - } }).Schedule(12min, [this](TaskContext context) { for (uint32 i = 0; i < 5; ++i) @@ -484,9 +493,6 @@ struct boss_shade_of_aran : public BossAI Spell->Effects[2].Effect != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCast(false)) return; - //Interrupt effect - me->InterruptNonMeleeSpells(false); - //Normally we would set the cooldown equal to the spell duration //but we do not have access to the DurationStore @@ -506,11 +512,19 @@ struct boss_shade_of_aran : public BossAI private: TaskScheduler _drinkScheduler; + uint32 _lastSuperSpell; + + ObjectGuid FlameWreathTarget[3]; + float FWTargPosX[3]; + float FWTargPosY[3]; + + uint32 CurrentNormalSpell; + bool _arcaneCooledDown; bool _fireCooledDown; bool _frostCooledDown; bool _drinking; - uint32 _currentHealth; + bool _hasDrunk; }; void AddSC_boss_shade_of_aran() From c1499cb5c1f50f13eebd262e7bbfe7da9d88d0dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Oct 2023 01:14:57 +0000 Subject: [PATCH 146/340] chore(DB): import pending files Referenced commit(s): 7de2405604c0d9da2d76539696ecbab31f4165eb --- .../rev_1696108618524876800.sql => db_world/2023_10_01_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696108618524876800.sql => db_world/2023_10_01_00.sql} (89%) diff --git a/data/sql/updates/pending_db_world/rev_1696108618524876800.sql b/data/sql/updates/db_world/2023_10_01_00.sql similarity index 89% rename from data/sql/updates/pending_db_world/rev_1696108618524876800.sql rename to data/sql/updates/db_world/2023_10_01_00.sql index 088dea281bfbad..c218082b9ce087 100644 --- a/data/sql/updates/pending_db_world/rev_1696108618524876800.sql +++ b/data/sql/updates/db_world/2023_10_01_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_09_29_00 -> 2023_10_01_00 -- DELETE FROM `creature_text` WHERE `CreatureId` = 16524 AND `GroupID` = 10; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES From 9b403e0d106f9df5a369a5014889586df357ac7d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Sep 2023 23:16:45 -0300 Subject: [PATCH 147/340] fix(Scripts/Karazhan): Fix Curator arcane immunity (#17397) * fix(Scripts/Karazhan): Fix Curator arcane immunity * Update boss_curator.cpp * Update boss_curator.cpp --- .../EasternKingdoms/Karazhan/boss_curator.cpp | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 88da4576c0fb98..c48253a901e946 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -44,12 +44,18 @@ enum Spells struct boss_curator : public BossAI { - boss_curator(Creature* creature) : BossAI(creature, DATA_CURATOR) { } + boss_curator(Creature* creature) : BossAI(creature, DATA_CURATOR) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } void Reset() override { BossAI::Reset(); - me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_MANA_LEECH, true); me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_POWER_BURN, true); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_POWER_BURN, true); @@ -132,18 +138,6 @@ struct boss_curator : public BossAI } summon->SetInCombatWithZone(); } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - scheduler.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - DoMeleeAttackIfReady(); - } }; void AddSC_boss_curator() From af5388763358b361bfd6d4e8e951a4f1cacb3184 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Sep 2023 23:22:55 -0300 Subject: [PATCH 148/340] fix(DB/Creature): Fiendish Portals should not move (#17396) --- data/sql/updates/pending_db_world/rev_1696123533155312100.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696123533155312100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696123533155312100.sql b/data/sql/updates/pending_db_world/rev_1696123533155312100.sql new file mode 100644 index 00000000000000..cebab09fab1d07 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696123533155312100.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_template_movement` WHERE `CreatureId` = 17265; +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Rooted`) VALUES +(17265, 1, 1); From 5385d0bb591de082af08d853ffbabc87dbaa0e56 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Oct 2023 02:24:16 +0000 Subject: [PATCH 149/340] chore(DB): import pending files Referenced commit(s): af5388763358b361bfd6d4e8e951a4f1cacb3184 --- .../rev_1696123533155312100.sql => db_world/2023_10_01_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696123533155312100.sql => db_world/2023_10_01_01.sql} (79%) diff --git a/data/sql/updates/pending_db_world/rev_1696123533155312100.sql b/data/sql/updates/db_world/2023_10_01_01.sql similarity index 79% rename from data/sql/updates/pending_db_world/rev_1696123533155312100.sql rename to data/sql/updates/db_world/2023_10_01_01.sql index cebab09fab1d07..1dc33533db8cb4 100644 --- a/data/sql/updates/pending_db_world/rev_1696123533155312100.sql +++ b/data/sql/updates/db_world/2023_10_01_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_01_00 -> 2023_10_01_01 -- DELETE FROM `creature_template_movement` WHERE `CreatureId` = 17265; INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Rooted`) VALUES From c17a6c0a0e14f00952f798137873825eb4122ef8 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:24:11 -0300 Subject: [PATCH 150/340] =?UTF-8?q?fix(Scripts/Karazhan):=20Fix=20Dorothee?= =?UTF-8?q?=20yell=20once=20Tito=20dies=20and=20clean=20up=20=E2=80=A6=20(?= =?UTF-8?q?#17395)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/Karazhan): Fix Dorothee yell once Tito dies and clean up script * fix dorothee interrupt immunity --- .../rev_1696120539180026700.sql | 2 + .../EasternKingdoms/Karazhan/bosses_opera.cpp | 85 ++----------------- 2 files changed, 7 insertions(+), 80 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696120539180026700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696120539180026700.sql b/data/sql/updates/pending_db_world/rev_1696120539180026700.sql new file mode 100644 index 00000000000000..57a0a63b635240 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696120539180026700.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 17535; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 1c037f381f6952..94e0311267c1e5 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -231,20 +231,12 @@ struct boss_dorothee : public ScriptedAI me->DespawnOrUnsummon(); } - void AttackStart(Unit* who) override + void SummonedCreatureDies(Creature* creature, Unit* /*killer*/) override { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); + if (creature->GetEntry() == NPC_TITO) + { + Talk(SAY_DOROTHEE_TITO_DEATH); + } } void EnterEvadeMode(EvadeReason reason) override @@ -288,8 +280,6 @@ struct npc_tito : public ScriptedAI InstanceScript* instance; - void Reset() override { } - void JustEngagedWith(Unit* /*who*/) override { _scheduler.Schedule(10s, [this](TaskContext context) @@ -299,18 +289,6 @@ struct npc_tito : public ScriptedAI }); } - void JustDied(Unit* /*killer*/) override - { - if (Creature* Dorothee = instance->GetCreature(DATA_DOROTHEE)) - { - if (Dorothee->IsAlive()) - { - Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee); - } - } - me->DespawnOrUnsummon(); - } - void UpdateAI(uint32 diff) override { if (!UpdateVictim()) @@ -351,17 +329,6 @@ struct boss_roar : public ScriptedAI } } - void Reset() override { } - - void MoveInLineOfSight(Unit* who) override - - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -373,14 +340,6 @@ struct boss_roar : public ScriptedAI } } - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_ROAR_AGGRO); @@ -458,24 +417,6 @@ struct boss_strawman : public ScriptedAI } } - void Reset() override { } - - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -601,22 +542,6 @@ struct boss_tinhead : public ScriptedAI me->DespawnOrUnsummon(); } - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); From a23d5ee50dc42063779021c98d01593941079f5f Mon Sep 17 00:00:00 2001 From: KJack <19712078+kjack9@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:25:06 -0400 Subject: [PATCH 151/340] feat(Core/Scripting): Implement `OnBeforeCreatureSelectLevel()` hook (#17391) * Add `OnBeforeCreatureSelectLevel()` hook - allows modules to alter the level of a creature just before it is set * Fix missing class name. * Hook should catch even if the level isn't being changed. * Trim whitespace. * Revert "Trim whitespace." This reverts commit 76768d85c0b9878828b71a008e709c1df7ddadc5. * Fix whitespace --- src/server/game/Entities/Creature/Creature.cpp | 3 +++ .../game/Scripting/ScriptDefines/AllCreatureScript.cpp | 9 +++++++++ src/server/game/Scripting/ScriptMgr.h | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index d86bc3b4571329..d48b8e08751f37 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1486,6 +1486,9 @@ void Creature::SelectLevel(bool changelevel) uint8 minlevel = std::min(cInfo->maxlevel, cInfo->minlevel); uint8 maxlevel = std::max(cInfo->maxlevel, cInfo->minlevel); uint8 level = minlevel == maxlevel ? minlevel : urand(minlevel, maxlevel); + + sScriptMgr->OnBeforeCreatureSelectLevel(cInfo, this, level); + if (changelevel) SetLevel(level); diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp index 89619124248fda..ab588dcdd82749 100644 --- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp @@ -48,6 +48,15 @@ void ScriptMgr::OnCreatureSaveToDB(Creature* creature) }); } +void ScriptMgr::OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level) +{ + ExecuteScript([&](AllCreatureScript* script) + { + script->OnBeforeCreatureSelectLevel(cinfo, creature, level); + }); + +} + void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature) { ExecuteScript([&](AllCreatureScript* script) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 5827e1612d78f5..b933130ee60f8d 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -555,6 +555,9 @@ class AllCreatureScript : public ScriptObject // Called from End of Creature Update. virtual void OnAllCreatureUpdate(Creature* /*creature*/, uint32 /*diff*/) { } + // Called just before the level of the creature is set. + virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/, uint8& /*level*/) { } + // Called from End of Creature SelectLevel. virtual void Creature_SelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { } @@ -2555,6 +2558,7 @@ class ScriptMgr public: /* AllCreatureScript */ //listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate //void OnAllCreatureUpdate(Creature* creature, uint32 diff); + void OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level); void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature); void OnCreatureSaveToDB(Creature* creature); From 93cc0b9bc708f6db5b4693079a8cbd02ec9d2dcc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Oct 2023 05:25:19 +0000 Subject: [PATCH 152/340] chore(DB): import pending files Referenced commit(s): c17a6c0a0e14f00952f798137873825eb4122ef8 --- .../rev_1696120539180026700.sql => db_world/2023_10_01_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696120539180026700.sql => db_world/2023_10_01_02.sql} (71%) diff --git a/data/sql/updates/pending_db_world/rev_1696120539180026700.sql b/data/sql/updates/db_world/2023_10_01_02.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1696120539180026700.sql rename to data/sql/updates/db_world/2023_10_01_02.sql index 57a0a63b635240..2f1cdcc1aa447d 100644 --- a/data/sql/updates/pending_db_world/rev_1696120539180026700.sql +++ b/data/sql/updates/db_world/2023_10_01_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_01_01 -> 2023_10_01_02 -- UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 17535; From 57f5c6fb0c80465cd343f2cd7418e81a03fbd275 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:24:47 +0200 Subject: [PATCH 153/340] refactor(Scripts/SSC): Leotheras the Blind boss script updated (#17080) * initial * remove unused parameter * fix timers * useless commit to revive actions * fixes * weird mistake fixed * browser programming kekW --- .../boss_leotheras_the_blind.cpp | 401 ++++++++---------- 1 file changed, 180 insertions(+), 221 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 79bd3180deda58..1c14da53f07cac 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "serpent_shrine.h" +#include "TaskScheduler.h" enum Talk { @@ -59,18 +60,12 @@ enum Misc NPC_GREYHEART_SPELLBINDER = 21806, NPC_SHADOW_OF_LEOTHERAS = 21875, +}; - EVENT_SPELL_BERSERK = 1, - EVENT_HEALTH_CHECK = 2, - EVENT_SWITCH_TO_DEMON = 3, - EVENT_SPELL_WHIRLWIND = 4, - EVENT_KILL_TALK = 5, - EVENT_SWITCH_TO_ELF = 6, - EVENT_SPELL_INSIDIOUS_WHISPER = 7, - EVENT_SUMMON_DEMON = 8, - EVENT_RESTORE_FIGHT = 9, - - EVENT_SPELL_SHADOW_BOLT = 20 +enum Groups +{ + GROUP_COMBAT = 1, + GROUP_DEMON = 2 }; const Position channelersPos[MAX_CHANNELERS] = @@ -80,267 +75,231 @@ const Position channelersPos[MAX_CHANNELERS] = {362.11f, -437.48f, 29.52f, 0.9f} }; -class boss_leotheras_the_blind : public CreatureScript +struct boss_leotheras_the_blind : public BossAI { -public: - boss_leotheras_the_blind() : CreatureScript("boss_leotheras_the_blind") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_leotheras_the_blind(Creature* creature) : BossAI(creature, DATA_LEOTHERAS_THE_BLIND) { - return GetSerpentShrineAI(creature); + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } - struct boss_leotheras_the_blindAI : public BossAI + void Reset() override { - boss_leotheras_the_blindAI(Creature* creature) : BossAI(creature, DATA_LEOTHERAS_THE_BLIND) - { - } + BossAI::Reset(); + DoCastSelf(SPELL_CLEAR_CONSUMING_MADNESS, true); + DoCastSelf(SPELL_DUAL_WIELD, true); + me->SetStandState(UNIT_STAND_STATE_KNEEL); + me->LoadEquipment(0, true); + me->SetReactState(REACT_PASSIVE); + _recentlySpoken = false; + SummonChannelers(); + + ScheduleHealthCheckEvent(15, [&]{ + if (me->GetDisplayId() != me->GetNativeDisplayId()) + { + //is currently in metamorphosis + DoResetThreatList(); + me->LoadEquipment(); + me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); + + scheduler.RescheduleGroup(GROUP_COMBAT, 10s); + } + scheduler.CancelGroup(GROUP_DEMON); + scheduler.DelayAll(10s); - void Reset() override - { - BossAI::Reset(); - me->CastSpell(me, SPELL_CLEAR_CONSUMING_MADNESS, true); - me->CastSpell(me, SPELL_DUAL_WIELD, true); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->LoadEquipment(0, true); me->SetReactState(REACT_PASSIVE); - } + me->GetMotionMaster()->Clear(); + me->StopMoving(); + Talk(SAY_FINAL_FORM); - void InitializeAI() override - { - BossAI::InitializeAI(); - SummonChannelers(); - } + scheduler.Schedule(4s, [this](TaskContext) + { + DoCastSelf(SPELL_SUMMON_SHADOW_OF_LEOTHERAS); + }).Schedule(6s, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + }); + }); + } - void JustReachedHome() override - { - BossAI::JustReachedHome(); - SummonChannelers(); - } + void SummonChannelers() + { + me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, false); + DoCastSelf(SPELL_BANISH); + me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); - void SummonChannelers() + //probably needs a spell instead + summons.DespawnAll(); + for (uint8 i = 0; i < MAX_CHANNELERS; ++i) { - me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, false); - me->CastSpell(me, SPELL_BANISH, true); - me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); - - summons.DespawnAll(); - for (uint8 i = 0; i < MAX_CHANNELERS; ++i) - me->SummonCreature(NPC_GREYHEART_SPELLBINDER, channelersPos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + me->SummonCreature(NPC_GREYHEART_SPELLBINDER, channelersPos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); } + } - void MoveInLineOfSight(Unit* /*who*/) override { } + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + } - void JustSummoned(Creature* summon) override + void SummonedCreatureDies(Creature* summon, Unit*) override + { + me->SetInCombatWithZone(); + summons.Despawn(summon); + if (summon->GetEntry() == NPC_GREYHEART_SPELLBINDER) { - summons.Summon(summon); - } + if (!summons.HasEntry(NPC_GREYHEART_SPELLBINDER)) + { + me->RemoveAllAuras(); + me->LoadEquipment(); + me->SetReactState(REACT_AGGRESSIVE); + me->SetStandState(UNIT_STAND_STATE_STAND); + Talk(SAY_AGGRO); - void SummonedCreatureDies(Creature* summon, Unit*) override - { - me->SetInCombatWithZone(); - summons.Despawn(summon); - if (summon->GetEntry() == NPC_GREYHEART_SPELLBINDER) - if (!summons.HasEntry(NPC_GREYHEART_SPELLBINDER)) + scheduler.Schedule(10min, [this](TaskContext) { - me->RemoveAllAuras(); - me->LoadEquipment(); - me->SetReactState(REACT_AGGRESSIVE); - me->SetStandState(UNIT_STAND_STATE_STAND); - Talk(SAY_AGGRO); - - events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000); - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); - events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - } - } + DoCastSelf(SPELL_BERSERK); + }); - void KilledUnit(Unit* /*victim*/) override - { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) - { - Talk(me->GetDisplayId() != me->GetNativeDisplayId() ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); + ElfTime(); } } + } - void JustDied(Unit* killer) override - { - me->CastSpell(me, SPELL_CLEAR_CONSUMING_MADNESS, true); - Talk(SAY_DEATH); - BossAI::JustDied(killer); - } - - void JustEngagedWith(Unit* who) override + void ElfTime() + { + scheduler.Schedule(25050ms, 32550ms, GROUP_COMBAT, [this](TaskContext context) { - BossAI::JustEngagedWith(who); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - } - - void AttackStart(Unit* who) override + DoCastSelf(SPELL_WHIRLWIND); + context.Repeat(30250ms, 34900ms); + }).Schedule(60350ms, GROUP_DEMON, [this](TaskContext) { - if (who && me->Attack(who, true)) - me->GetMotionMaster()->MoveChase(who, me->GetDisplayId() == me->GetNativeDisplayId() ? 0.0f : 25.0f); - } + DoResetThreatList(); + Talk(SAY_SWITCH_TO_DEMON); + DemonTime(); + }); + } - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; + void DemonTime() + { + me->LoadEquipment(0, true); + me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f); + DoCastSelf(SPELL_METAMORPHOSIS, true); + + scheduler.CancelGroup(GROUP_COMBAT); + scheduler.Schedule(24250ms, GROUP_DEMON, [this](TaskContext) + { + Talk(SAY_INNER_DEMONS); + me->CastCustomSpell(SPELL_INSIDIOUS_WHISPER, SPELLVALUE_MAX_TARGETS, 5, me, false); + }).Schedule(60s, [this](TaskContext) + { + DoResetThreatList(); + me->LoadEquipment(); + me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f); + me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); + ElfTime(); + }); + } - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; - switch (events.ExecuteEvent()) - { - case EVENT_SPELL_BERSERK: - me->CastSpell(me, SPELL_BERSERK, true); - break; - case EVENT_HEALTH_CHECK: - if (me->HealthBelowPct(15)) - { - if (me->GetDisplayId() != me->GetNativeDisplayId()) - { - DoResetThreatList(); - me->LoadEquipment(); - me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - } - events.CancelEvent(EVENT_SWITCH_TO_DEMON); - events.CancelEvent(EVENT_SPELL_INSIDIOUS_WHISPER); - events.DelayEvents(10000); - events.ScheduleEvent(EVENT_SUMMON_DEMON, 4000); - events.ScheduleEvent(EVENT_RESTORE_FIGHT, 6000); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->SetReactState(REACT_PASSIVE); - me->GetMotionMaster()->Clear(); - me->StopMoving(); - Talk(SAY_FINAL_FORM); - break; - } - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); - break; - case EVENT_SWITCH_TO_DEMON: - DoResetThreatList(); - Talk(SAY_SWITCH_TO_DEMON); - me->LoadEquipment(0, true); - me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f); - me->CastSpell(me, SPELL_METAMORPHOSIS, true); - - events.CancelEvent(EVENT_SPELL_WHIRLWIND); - events.ScheduleEvent(EVENT_SPELL_INSIDIOUS_WHISPER, 25000); - events.ScheduleEvent(EVENT_SWITCH_TO_ELF, 60000); - break; - case EVENT_SWITCH_TO_ELF: - DoResetThreatList(); - me->LoadEquipment(); - me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f); - me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); - events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - break; - case EVENT_SPELL_WHIRLWIND: - me->CastSpell(me, SPELL_WHIRLWIND, false); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 27000); - break; - case EVENT_SPELL_INSIDIOUS_WHISPER: - Talk(SAY_INNER_DEMONS); - me->CastCustomSpell(SPELL_INSIDIOUS_WHISPER, SPELLVALUE_MAX_TARGETS, 5, me, false); - break; - case EVENT_SUMMON_DEMON: - me->CastSpell(me, SPELL_SUMMON_SHADOW_OF_LEOTHERAS, true); - break; - case EVENT_RESTORE_FIGHT: - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - break; - } + scheduler.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - if (me->GetDisplayId() == me->GetNativeDisplayId()) - DoMeleeAttackIfReady(); - else if (me->isAttackReady(BASE_ATTACK)) - { - me->CastSpell(me->GetVictim(), SPELL_CHAOS_BLAST, false); - me->setAttackTimer(BASE_ATTACK, 2000); - } + if (me->GetDisplayId() == me->GetNativeDisplayId()) + { + DoMeleeAttackIfReady(); } - }; + else if (me->isAttackReady(BASE_ATTACK)) + { + me->CastSpell(me->GetVictim(), SPELL_CHAOS_BLAST, false); + me->setAttackTimer(BASE_ATTACK, 2000); + } + } +private: + bool _recentlySpoken; }; -class npc_inner_demon : public CreatureScript +struct npc_inner_demon : public ScriptedAI { -public: - npc_inner_demon() : CreatureScript("npc_inner_demon") { } - - CreatureAI* GetAI(Creature* creature) const override + npc_inner_demon(Creature* creature) : ScriptedAI(creature) { - return GetSerpentShrineAI(creature); + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + + _instance = creature->GetInstanceScript(); } - struct npc_inner_demonAI : public ScriptedAI + void EnterEvadeMode(EvadeReason /*why*/) override { - npc_inner_demonAI(Creature* creature) : ScriptedAI(creature) - { - } - - ObjectGuid ownerGUID; - EventMap events; + me->DespawnOrUnsummon(1); + } - void EnterEvadeMode(EvadeReason /*why*/) override - { - me->DespawnOrUnsummon(1); - } + void IsSummonedBy(WorldObject* summoner) override + { + if (!summoner) + return; - void IsSummonedBy(WorldObject* summoner) override + _scheduler.CancelAll(); + _scheduler.Schedule(4s, [this](TaskContext context) { - if (!summoner) - return; - - ownerGUID = summoner->GetGUID(); - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 4000); - } + DoCastVictim(SPELL_SHADOW_BOLT); + context.Repeat(6s); + }); + } - void JustDied(Unit* /*killer*/) override + void JustDied(Unit* /*killer*/) override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) { - if (Unit* unit = ObjectAccessor::GetUnit(*me, ownerGUID)) - unit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); + leotheras->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); } + } - void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override + void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) { - if (!who || who->GetGUID() != ownerGUID) + if (!who || who->GetGUID() != leotheras->GetGUID()) + { damage = 0; + } } + } - bool CanAIAttack(Unit const* who) const override + bool CanAIAttack(Unit const* who) const override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) { - return who->GetGUID() == ownerGUID; + return who->GetGUID() == leotheras->GetGUID(); } + return false; + } - void UpdateAI(uint32 diff) override + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + return; + } - switch (events.ExecuteEvent()) - { - case EVENT_SPELL_SHADOW_BOLT: - me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false); - events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 6000); - break; - } + _scheduler.Update(diff); - DoMeleeAttackIfReady(); - } - }; + DoMeleeAttackIfReady(); + } +private: + TaskScheduler _scheduler; + InstanceScript* _instance; }; class spell_leotheras_whirlwind : public SpellScriptLoader @@ -516,8 +475,8 @@ class spell_leotheras_clear_consuming_madness : public SpellScriptLoader void AddSC_boss_leotheras_the_blind() { - new boss_leotheras_the_blind(); - new npc_inner_demon(); + RegisterSerpentShrineAI(boss_leotheras_the_blind); + RegisterSerpentShrineAI(npc_inner_demon); new spell_leotheras_whirlwind(); new spell_leotheras_chaos_blast(); new spell_leotheras_insidious_whisper(); From 62c6b158e59a0eb29f860f0f1b7f7a2f672754e2 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:24:57 +0200 Subject: [PATCH 154/340] refactor(Scripts/SSC): The Lurker Below boss script updated (#17082) * initial * restore me->CastSpell() because apparently there is no overload of docastself that has triggerflags if I understand it correctly * fix timers may need some work - comments/thoughts welcome * ms * make kitzunu slightly less sad * fixes * revert * Update boss_lurker_below.cpp Co-authored-by: Angelo Venturini * Update boss_lurker_below.cpp --------- Co-authored-by: Angelo Venturini --- .../SerpentShrine/boss_lurker_below.cpp | 255 +++++++++--------- 1 file changed, 127 insertions(+), 128 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 34349e80ac903d..c2287f8ba7d6f4 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -26,7 +26,10 @@ enum Spells SPELL_GEYSER = 37478, SPELL_SPOUT_VISUAL = 37431, SPELL_SPOUT_PERIODIC = 37430, - SPELL_LURKER_SPAWN_TRIGGER = 54587 // Needed for achievement + SPELL_LURKER_SPAWN_TRIGGER = 54587, // Needed for achievement + + SPELL_CLEAR_ALL_DEBUFFS = 34098, + SPELL_SUBMERGE_VISUAL = 28819, }; enum Misc @@ -37,13 +40,12 @@ enum Misc NPC_COILFANG_GUARDIAN = 21873, NPC_COILFANG_AMBUSHER = 21865, +}; - EVENT_PHASE_1 = 1, - EVENT_PHASE_2 = 2, - EVENT_SPELL_WHIRL = 3, - EVENT_SPELL_SPOUT = 4, - EVENT_SPELL_GEYSER = 5, - EVENT_SPELL_SPOUT_PERIODIC = 6 +enum Groups +{ + GROUP_WHIRL = 1, + GROUP_GEYSER = 2 }; const Position positions[MAX_SUMMONS] = @@ -59,152 +61,149 @@ const Position positions[MAX_SUMMONS] = {42.471519f, -445.115295f, -19.769423f, 0.0f} }; -class boss_the_lurker_below : public CreatureScript +struct boss_the_lurker_below : public BossAI { -public: - boss_the_lurker_below() : CreatureScript("boss_the_lurker_below") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_the_lurker_below(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW) { - return GetSerpentShrineAI(creature); + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } - struct boss_the_lurker_belowAI : public BossAI + void Reset() override { - boss_the_lurker_belowAI(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW) { } + BossAI::Reset(); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SUBMERGED); + me->SetVisible(false); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + } - void Reset() override + void DoAction(int32 action) override + { + if (action == ACTION_START_EVENT) { - BossAI::Reset(); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SUBMERGED); - me->SetVisible(false); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - - // Reset summons - summons.DespawnAll(); + me->SetReactState(REACT_AGGRESSIVE); + me->setAttackTimer(BASE_ATTACK, 6000); + me->SetVisible(true); + me->UpdateObjectVisibility(true); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetInCombatWithZone(); } + } - void JustSummoned(Creature* summon) override + void AttackStart(Unit* who) override + { + if (who && me->GetReactState() == REACT_AGGRESSIVE) { - summon->SetInCombatWithZone(); - summons.Summon(summon); + me->Attack(who, true); } + } - void DoAction(int32 param) override - { - if (param == ACTION_START_EVENT) - { - me->SetReactState(REACT_AGGRESSIVE); - me->setAttackTimer(BASE_ATTACK, 6000); - me->SetVisible(true); - me->UpdateObjectVisibility(true); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetInCombatWithZone(); - } - } + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); - void JustDied(Unit* killer) override - { - BossAI::JustDied(killer); - } + SchedulerPhaseOne(38800ms, 91000ms); + } - void AttackStart(Unit* who) override + void SchedulerPhaseOne(std::chrono::milliseconds spoutTimer, std::chrono::milliseconds p2Timer) + { + scheduler.Schedule(10900ms, GROUP_GEYSER, [this](TaskContext context) { - if (who && me->GetReactState() == REACT_AGGRESSIVE) - me->Attack(who, true); - } - - void JustEngagedWith(Unit* /*who*/) override + DoCastRandomTarget(SPELL_GEYSER); + context.Repeat(10200ms, 54900ms); + }).Schedule(18150ms, GROUP_WHIRL, [this](TaskContext context) { - events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 45000); - events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000); - events.ScheduleEvent(EVENT_PHASE_2, 125000); - } + DoCastSelf(SPELL_WHIRL); + context.Repeat(34150ms, 68550ms); + }).Schedule(spoutTimer, [this](TaskContext context) + { + Talk(EMOTE_TAKE_BREATH); + me->CastSpell(me, SPELL_SPOUT_VISUAL, TRIGGERED_IGNORE_SET_FACING); + me->SetReactState(REACT_PASSIVE); + me->SetFacingToObject(me->GetVictim()); + me->SetTarget(); + scheduler.RescheduleGroup(GROUP_GEYSER, 25s); + scheduler.RescheduleGroup(GROUP_WHIRL, 18s); + scheduler.Schedule(3s, [this](TaskContext) + { + me->InterruptNonMeleeSpells(false); + DoCastSelf(SPELL_SPOUT_PERIODIC, true); + }); + context.Repeat(60s); + }).Schedule(p2Timer, [this](TaskContext) + { + //phase2 + scheduler.CancelAll(); + DoCastSelf(SPELL_SUBMERGE_VISUAL, true); + DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true); + me->SetStandState(UNIT_STAND_STATE_SUBMERGED); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + for (uint8 i = 0; i < MAX_SUMMONS; ++i) + { + //needs sniffed spell probably + me->SummonCreature(i < 6 ? NPC_COILFANG_AMBUSHER : NPC_COILFANG_GUARDIAN, positions[i].GetPositionX(), positions[i].GetPositionY(), positions[i].GetPositionZ(), positions[i].GetAngle(me), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + } + SchedulerPhaseTwo(); + }); + } - void UpdateAI(uint32 diff) override + void SchedulerPhaseTwo() + { + scheduler.Schedule(60s, [this](TaskContext) { - if (!UpdateVictim()) - return; + me->setAttackTimer(BASE_ATTACK, 6000); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + scheduler.CancelAll(); + SchedulerPhaseOne(10000ms, 90750ms); + }); + } - events.Update(diff); + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; - switch (events.ExecuteEvent()) - { - case EVENT_SPELL_WHIRL: - me->CastSpell(me, SPELL_WHIRL, false); - events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000); - break; - case EVENT_SPELL_GEYSER: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - me->CastSpell(target, SPELL_GEYSER, false); - events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000); - break; - case EVENT_SPELL_SPOUT: - Talk(EMOTE_TAKE_BREATH); - me->CastSpell(me, SPELL_SPOUT_VISUAL, TRIGGERED_IGNORE_SET_FACING); - me->SetReactState(REACT_PASSIVE); - me->SetFacingToObject(me->GetVictim()); - me->SetTarget(); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 60000); - events.RescheduleEvent(EVENT_SPELL_WHIRL, 18000); - events.RescheduleEvent(EVENT_SPELL_GEYSER, 25000); - events.ScheduleEvent(EVENT_SPELL_SPOUT_PERIODIC, 3000); - break; - case EVENT_SPELL_SPOUT_PERIODIC: - me->InterruptNonMeleeSpells(false); - me->CastSpell(me, SPELL_SPOUT_PERIODIC, true); - break; - case EVENT_PHASE_2: - events.Reset(); - events.ScheduleEvent(EVENT_PHASE_1, 60000); - me->SetStandState(UNIT_STAND_STATE_SUBMERGED); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - for (uint8 i = 0; i < MAX_SUMMONS; ++i) - me->SummonCreature(i < 6 ? NPC_COILFANG_AMBUSHER : NPC_COILFANG_GUARDIAN, positions[i].GetPositionX(), positions[i].GetPositionY(), positions[i].GetPositionZ(), positions[i].GetAngle(me), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - break; - case EVENT_PHASE_1: - me->setAttackTimer(BASE_ATTACK, 6000); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 10000); - events.ScheduleEvent(EVENT_PHASE_2, 120000); - break; - } + scheduler.Update(diff); - if (me->getStandState() != UNIT_STAND_STATE_STAND || !me->isAttackReady() || me->GetReactState() != REACT_AGGRESSIVE) - return; + if (me->getStandState() != UNIT_STAND_STATE_STAND || !me->isAttackReady() || me->GetReactState() != REACT_AGGRESSIVE) + return; - Unit* target = nullptr; - if (me->IsWithinMeleeRange(me->GetVictim())) - target = me->GetVictim(); - else + Unit* target = nullptr; + if (me->IsWithinMeleeRange(me->GetVictim())) + { + target = me->GetVictim(); + } + else + { + ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); + for (ThreatReference const* ref : t_list) { - ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); - for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) - if (Unit* threatTarget = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid())) - if (me->IsWithinMeleeRange(threatTarget)) - { - target = threatTarget; - break; - } + if (Unit* threatTarget = ObjectAccessor::GetUnit(*me, ref->getUnitGuid())) + { + if (me->IsWithinMeleeRange(threatTarget)) + { + target = threatTarget; + break; + } + } } - - if (target) - me->AttackerStateUpdate(target); - else if ((target = SelectTarget(SelectTargetMethod::Random, 0))) - me->CastSpell(target, SPELL_WATER_BOLT, false); - - me->resetAttackTimer(); } - }; + if (target) + { + me->AttackerStateUpdate(target); + } + else if ((target = SelectTarget(SelectTargetMethod::Random, 0))) + { + me->CastSpell(target, SPELL_WATER_BOLT, false); + } + me->resetAttackTimer(); + } }; class go_strange_pool : public GameObjectScript @@ -315,7 +314,7 @@ class spell_lurker_below_spout_cone : public SpellScriptLoader void AddSC_boss_the_lurker_below() { - new boss_the_lurker_below(); + RegisterSerpentShrineAI(boss_the_lurker_below); new go_strange_pool(); new spell_lurker_below_spout(); new spell_lurker_below_spout_cone(); From 003398a8945a32708a01dee4d504304f52ff370e Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:25:09 +0200 Subject: [PATCH 155/340] fix(DB/SSC): update timers of trash and boss adds in Serpentshrine Cavern with sniffs (#17108) * initial * no space -> jobs happy? * why do I always forget this pepehands * AREA_CASTING * healing spells * remove entries that should be done in SAI * rancid mushroom * remove weird leftovers * comment phases --- .../pending_db_world/update-sai-ssc-trash.sql | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 data/sql/updates/pending_db_world/update-sai-ssc-trash.sql diff --git a/data/sql/updates/pending_db_world/update-sai-ssc-trash.sql b/data/sql/updates/pending_db_world/update-sai-ssc-trash.sql new file mode 100644 index 00000000000000..cee0be6b6dd3ff --- /dev/null +++ b/data/sql/updates/pending_db_world/update-sai-ssc-trash.sql @@ -0,0 +1,94 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21218, 21220, 21221, 21224, 21225, 21226, 21228, 21229, 21230, 21231, 21232, 21251, 21263, 21298, 21299, 21301, 21339, 21806, 21863, 21865, 21873, 21920, 22009, 22055, 22056, 22250) 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`, `event_param6`, `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 +(21218, 0, 0, 0, 0, 0, 100, 0, 16300, 19300, 10090, 19400, 0, 0, 11, 38572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - In Combat - Cast Mortal Cleave'),-- fully sniffed +(21218, 0, 1, 0, 105, 0, 100, 0, 15750, 16850, 15750, 16850, 0, 5, 11, 38576, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Victim Casting - Cast Knockback'),-- fully sniffed +(21218, 0, 2, 3, 2, 0, 100, 1, 0, 50, 0, 0, 0, 0, 11, 38947, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Between Health 0-50% - Cast Frenzy'),-- fully sniffed +(21218, 0, 3, 0, 61, 0, 50, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Between Health 0-50% - Talk'), +(21218, 0, 4, 0, 12, 0, 100, 0, 0, 20, 15000, 15000, 0, 0, 11, 38959, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Target Health 0-20% - Cast Execute'),-- not sniffed thus unchanged +(21220, 0, 0, 0, 0, 0, 100, 0, 4800, 6900, 3650, 14750, 0, 0, 11, 38582, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - In Combat - Cast Holy Smite'),-- fully sniffed +(21220, 0, 1, 0, 0, 0, 100, 0, 6050, 12850, 6050, 17050, 0, 0, 11, 38585, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - In Combat - Cast Holy Fire'),-- fully sniffed +(21220, 0, 2, 0, 14, 0, 100, 0, 25000, 35, 8500, 16100, 0, 0, 11, 38580, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - Friendly Missing Health - Cast Greater Heal'),-- fully sniffed +(21220, 0, 3, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - On Aggro - Call For Help'), +(21221, 0, 0, 0, 0, 0, 100, 0, 0, 2000, 2000, 2000, 0, 0, 11, 38904, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Throw'),-- not sniffed thus unchanged +(21221, 0, 1, 0, 0, 0, 100, 0, 6050, 10850, 6050, 12950, 0, 0, 11, 38474, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Cleave'),-- fully sniffed +(21221, 0, 2, 0, 0, 0, 100, 0, 6050, 7250, 15800, 19200, 0, 0, 11, 38484, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Bestial Wrath'),-- fully sniffed +(21224, 0, 0, 0, 14, 0, 100, 0, 8000, 40, 8000, 10000, 0, 0, 11, 38658, 64, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - Friendly Missing Health - Cast Healing Touch'),-- not sniffed thus unchanged +(21224, 0, 1, 0, 16, 1, 100, 0, 38657, 40, 7000, 10000, 0, 0, 11, 38657, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - Friendly Missing Buff - Cast Rejuvenation'),-- not sniffed thus unchanged +(21224, 0, 2, 0, 0, 0, 100, 0, 8450, 8450, 25000, 35000, 0, 0, 11, 38659, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - In Combat - Cast Tranquility'),-- repeat timer not sniffed +(21224, 0, 3, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - On Aggro - Set Event Phase'), +(21225, 0, 0, 0, 0, 0, 100, 0, 8650, 8850, 18000, 25000, 0, 0, 11, 39070, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Bloodthirst'),-- repeat timer not sniffed +(21225, 0, 1, 0, 0, 0, 100, 0, 10000, 15000, 25000, 30000, 0, 0, 11, 38664, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Enrage'),-- not sniffed thus unchanged +(21225, 0, 2, 0, 0, 0, 100, 0, 3000, 10000, 10000, 15000, 0, 0, 11, 39069, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Uppercut'),-- not sniffed thus unchanged +(21226, 0, 0, 0, 0, 0, 100, 0, 7250, 8850, 3000, 4000, 0, 0, 11, 39065, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Lightning Bolt'),-- repeat timer not sniffed +(21226, 0, 1, 0, 0, 0, 100, 0, 0, 0, 60000, 60000, 0, 0, 11, 39067, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Lightning Shield'),-- not sniffed thus unchanged +(21226, 0, 2, 0, 0, 0, 100, 0, 3000, 10000, 10000, 15000, 0, 0, 11, 39066, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Chain Lightning'),-- not sniffed thus unchanged +(21228, 0, 0, 0, 0, 0, 100, 0, 0, 1000, 2000, 2200, 0, 0, 11, 39064, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - In Combat - Cast FrostBolt'),-- not sniffed correctly thus unchanged +(21228, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 0, 0, 11, 39062, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - In Combat - Cast Frost Shock'),-- not sniffed thus unchanged +(21228, 0, 2, 0, 106, 0, 100, 0, 10000, 15000, 10000, 15000, 0, 10, 11, 39063, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - Within Range 0-10yd - Cast Frost Nova'),-- not sniffed correctly thus unchanged +(21229, 0, 0, 0, 0, 0, 100, 0, 10900, 21200, 120000, 120000, 0, 0, 11, 39027, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Tidecaller - In Combat - Cast Poison Shield'),-- repeat unchanged due to logical timer +(21229, 0, 1, 0, 0, 0, 100, 0, 5200, 11900, 35150, 35150, 0, 0, 11, 38624, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Tidecaller - In Combat - Cast Water Elemental Totem'), +(21230, 0, 0, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 30, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - On Aggro - Set Event Phase Random'), +(21230, 0, 1, 0, 0, 1, 100, 0, 1550, 9550, 2400, 8700, 0, 0, 11, 38641, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Fireball'),-- fully sniffed +(21230, 0, 2, 0, 0, 1, 100, 0, 1200, 2000, 60000, 60000, 0, 0, 11, 38648, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Fire Destruction'),-- repeat timer not sniffed +(21230, 0, 3, 0, 0, 1, 100, 0, 12100, 22000, 10950, 18150, 0, 0, 11, 38635, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Rain of Fire'),-- fully sniffed +(21230, 0, 4, 0, 0, 1, 100, 0, 8500, 12300, 6050, 20850, 0, 0, 11, 38636, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Scorch'),-- fully sniffed +(21230, 0, 5, 0, 0, 2, 100, 0, 4800, 10900, 1200, 6700, 0, 0, 11, 38645, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Frostbolt'),-- fully sniffed +(21230, 0, 6, 0, 0, 2, 100, 0, 1200, 9600, 60000, 60000, 0, 0, 11, 38649, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Frost Destruction'),-- repeat timer not sniffed +(21230, 0, 7, 0, 0, 2, 100, 0, 21750, 35150, 14000, 17000, 0, 0, 11, 38644, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Cone of Cold'),-- repeat timer not sniffed +(21230, 0, 8, 0, 0, 2, 100, 1, 7250, 24250, 0, 0, 0, 0, 11, 38646, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Blizzard'),-- new added spell +(21230, 0, 9, 0, 0, 4, 100, 0, 7250, 12950, 13500, 14900, 0, 0, 11, 38633, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Volley'),-- fully sniffed +(21230, 0, 10, 0, 0, 4, 100, 0, 350, 4650, 60000, 60000, 0, 0, 11, 38647, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Destruction'),-- repeat timer not sniffed +(21230, 0, 11, 0, 0, 4, 100, 0, 17350, 21400, 14550, 15350, 0, 0, 11, 38634, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Lightning'),-- fully sniffed +(21230, 0, 12, 0, 0, 4, 100, 0, 8450, 12550, 12100, 22800, 0, 0, 11, 38642, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Blink'),-- new added spell +(21231, 0, 0, 0, 0, 0, 100, 0, 5000, 12000, 10000, 15000, 0, 0, 11, 38631, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Shield-Bearer - In Combat - Cast Avenger\'s Shield'),-- not sniffed correctly thus unchanged +(21231, 0, 1, 9, 0, 0, 100, 0, 8, 25, 10000, 15000, 0, 0, 11, 38630, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Shield-Bearer - In Combat - Cast Shield Charge'),-- not sniffed correctly thus unchanged +(21232, 0, 0, 0, 25, 0, 100, 257, 0, 0, 0, 0, 0, 0, 11, 29651, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Skulker - On Reset - Cast Dual Wield'), +(21232, 0, 1, 0, 105, 0, 100, 0, 4800, 13100, 4850, 9050, 0, 5, 11, 38625, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Skulker - Victim Casting - Cast Kick'),-- fully sniffed +(21251, 0, 0, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 30, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Aggro - Set Random Phase'), +(21251, 0, 1, 0, 0, 1, 100, 0, 19400, 19400, 13350, 16950, 0, 0, 11, 39031, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Enrage (Phase 1)'),-- fully sniffed +(21251, 0, 2, 0, 0, 1, 100, 1, 0, 0, 0, 0, 0, 0, 11, 39014, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Atrophic Blow (Phase 1)'),-- not sniffed thus unchanged +(21251, 0, 3, 0, 0, 2, 100, 0, 16950, 16950, 25500, 29100, 0, 0, 11, 38971, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Acid Geyser (Phase 2)'),-- fully sniffed +(21251, 0, 4, 0, 0, 2, 100, 0, 25450, 25450, 29150, 29150, 0, 0, 11, 39044, 0, 0, 0, 0, 0, 5, 40, 1, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Serpentshrine Parasite (Phase 2)'),-- fully sniffed +(21251, 0, 5, 0, 0, 4, 100, 0, 19450, 19450, 25450, 25450, 0, 0, 11, 38976, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Spore Quake (Phase 3)'),-- fully sniffed +(21251, 0, 6, 0, 0, 4, 100, 0, 27900, 27900, 29100, 29100, 0, 0, 11, 39032, 0, 0, 0, 0, 0, 5, 40, 1, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Initial Infection (Phase 3)'),-- fully sniffed +(21251, 0, 7, 0, 6, 0, 80, 512, 0, 0, 0, 0, 0, 0, 125, 1, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Death - Run Random Timed Event'), +(21251, 0, 8, 0, 59, 0, 100, 512, 1, 0, 0, 0, 0, 0, 11, 38718, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Toxic Pool'),-- unchanged +(21251, 0, 9, 0, 59, 0, 100, 512, 2, 0, 0, 0, 0, 0, 11, 38922, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Colossus Lurkers'),-- unchanged +(21251, 0, 10, 0, 59, 0, 100, 512, 3, 0, 0, 0, 0, 0, 11, 38928, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Colossus Ragers'),-- unchanged +(21251, 0, 11, 0, 59, 0, 100, 512, 4, 0, 0, 0, 0, 0, 11, 38726, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Serpentshrine Mushroom'),-- unchanged +(21263, 0, 0, 0, 0, 0, 100, 0, 6050, 17850, 7250, 16350, 0, 0, 11, 38995, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Technician - In Combat - Cast Hamstring'),-- fully sniffed +(21298, 0, 0, 0, 0, 0, 80, 0, 10850, 17550, 10900, 17000, 0, 0, 11, 38599, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Serpentguard - In Combat - Cast \'Spell Reflection\''),-- fully sniffed +(21298, 0, 1, 0, 0, 0, 100, 0, 0, 0, 59000, 60000, 0, 0, 11, 38603, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Serpentguard - In Combat - Cast \'Corrupt Devotion Aura\''),-- not sniffed thus unchanged +(21299, 0, 0, 0, 0, 0, 80, 0, 10900, 16000, 22900, 32900, 0, 0, 11, 38626, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Domination\''),-- repeat timer not sniffed +(21299, 0, 1, 0, 0, 0, 100, 0, 14700, 18500, 66300, 89300, 0, 0, 11, 38627, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Shadow Nova\''),-- repeat timer not sniffed +(21299, 0, 2, 0, 0, 0, 100, 0, 4450, 5850, 3650, 8450, 0, 0, 11, 38628, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Shadow Bolt\''),-- fully sniffed +(21301, 0, 0, 0, 0, 0, 100, 0, 6850, 12350, 19400, 27400, 0, 0, 11, 38591, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Shatterer - In Combat - Cast Shatter Armor'),-- fully sniffed +(21301, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Shatterer - On Aggro - Call For Help'), +(21339, 0, 0, 0, 0, 0, 100, 0, 9700, 22400, 13350, 40050, 0, 0, 11, 38491, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Hate-Screamer - In Combat - Cast Silence'),-- fully sniffed +(21339, 0, 1, 0, 0, 0, 100, 0, 3600, 10900, 4850, 12950, 0, 0, 11, 38496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Hate-Screamer - In Combat - Cast Sonic Scream'),-- fully sniffed +(21806, 0, 0, 0, 0, 0, 100, 0, 6050, 9250, 8500, 11600, 0, 0, 11, 37531, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - In Combat - Cast Mind Blast'),-- fully sniffed +(21806, 0, 1, 0, 105, 0, 100, 0, 6050, 6050, 8000, 10000, 0, 45, 11, 39076, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - In Combat - Cast Spell Shock'),-- repeat timer not sniffed +(21806, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - On Aggro - Call For Help'), +(21806, 0, 3, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 0, 0, 11, 37626, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - Out of Combat - Cast Green Beam'), +(21863, 0, 0, 0, 0, 0, 100, 0, 9650, 15750, 12150, 15750, 0, 0, 11, 38650, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Lurker - In Combat - Cast Rancid Mushroom'),-- fully sniffed +(21863, 0, 1, 0, 0, 0, 100, 0, 12150, 18150, 15000, 22000, 0, 0, 11, 38655, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Lurker - In Combat - Cast Poison Bolt Volley'),-- repeat timer not sniffed +(21865, 0, 0, 0, 0, 0, 100, 0, 1200, 9500, 3200, 11400, 0, 0, 11, 37770, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Ambusher - In Combat - Cast Shoot'),-- fully sniffed +(21865, 0, 1, 0, 0, 0, 100, 0, 7250, 14850, 12100, 16000, 0, 0, 11, 37790, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Ambusher - In Combat - Cast Spread Shot'),-- fully sniffed +(21873, 0, 0, 0, 0, 0, 100, 0, 1000, 5000, 9000, 12000, 0, 0, 11, 28168, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - In Combat - Cast Arcing Smash'),-- not sniffed correctly +(21873, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 14000, 18000, 0, 0, 11, 9080, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - In Combat - Cast Hamstring'),-- not sniffed but weird ID +(21920, 0, 0, 0, 0, 0, 100, 0, 7650, 26050, 7250, 26950, 0, 0, 11, 41932, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Lurker - In Combat - Cast Carnivorous Bite'),-- fully sniffed +(22009, 0, 0, 0, 60, 0, 100, 1, 100, 100, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - On Reset - Set In Combat With Zone'), +(22009, 0, 1, 0, 60, 0, 100, 0, 100, 500, 2350, 2650, 0, 0, 11, 38253, 0, 0, 0, 0, 0, 5, 200, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - In Combat - Cast Poison Bolt'),-- fully sniffed +(22009, 0, 2, 0, 60, 0, 100, 769, 15000, 15000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - On Update - Despawn'), +(22055, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - On Aggro - Set In Combat With Zone'), +(22055, 0, 1, 0, 0, 0, 100, 0, 6850, 17250, 1250, 15750, 0, 0, 11, 38260, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - In Combat - Cast Cleave'),-- fully sniffed +(22055, 0, 2, 0, 0, 0, 100, 0, 15350, 17750, 8000, 10000, 0, 0, 11, 38262, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - In Combat - Cast Hamstring'),-- repeat not sniffed +(22055, 0, 3, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - Movement Inform - Set In Combat With Zone'), +(22056, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - On Aggro - Set In Combat With Zone'), +(22056, 0, 1, 0, 0, 0, 100, 0, 15700, 15700, 10850, 13350, 0, 0, 11, 38259, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - In Combat - Cast Mind Blast'),-- fully sniffed +(22056, 0, 2, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - Movement Inform - Set In Combat With Zone'), +(22250, 0, 0, 0, 25, 0, 100, 769, 0, 0, 0, 0, 0, 0, 41, 21000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - On Reset - Despawn'), +(22250, 0, 1, 0, 0, 0, 100, 0, 1150, 1150, 1200, 3400, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Cast Grow'),-- fully sniffed +(22250, 0, 2, 3, 0, 0, 100, 1, 22950, 22950, 0, 0, 0, 0, 11, 38652, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Cast Spore Cloud (no repeat)'),-- fully sniffed +(22250, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Die'); From 3c9c985fc6ff9e4196628a77f8bf7539eacaed33 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Oct 2023 07:26:04 +0000 Subject: [PATCH 156/340] chore(DB): import pending files Referenced commit(s): 62c6b158e59a0eb29f860f0f1b7f7a2f672754e2 --- .../update-sai-ssc-trash.sql => db_world/2023_10_01_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/update-sai-ssc-trash.sql => db_world/2023_10_01_03.sql} (99%) diff --git a/data/sql/updates/pending_db_world/update-sai-ssc-trash.sql b/data/sql/updates/db_world/2023_10_01_03.sql similarity index 99% rename from data/sql/updates/pending_db_world/update-sai-ssc-trash.sql rename to data/sql/updates/db_world/2023_10_01_03.sql index cee0be6b6dd3ff..7bb3d7f5c9326e 100644 --- a/data/sql/updates/pending_db_world/update-sai-ssc-trash.sql +++ b/data/sql/updates/db_world/2023_10_01_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_01_02 -> 2023_10_01_03 -- DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21218, 21220, 21221, 21224, 21225, 21226, 21228, 21229, 21230, 21231, 21232, 21251, 21263, 21298, 21299, 21301, 21339, 21806, 21863, 21865, 21873, 21920, 22009, 22055, 22056, 22250) 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`, `event_param6`, `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 From de50ce3305ee3e61cc62f01c2dfdf4d7ec3b56bc Mon Sep 17 00:00:00 2001 From: Ludwig Date: Sun, 1 Oct 2023 09:26:18 +0200 Subject: [PATCH 157/340] fix(Scripts/Midsummer): Randomize ribbon pole beam color (#17380) * fix(Scripts/Midsummer): Randomize ribbon pole beam color * Update data/sql/updates/pending_db_world/rev_1695820418952974700.sql Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> * Add Validate() to spell script spell_midsummer_ribbon_pole --------- Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> --- .../rev_1695820418952974700.sql | 7 ++++ src/server/scripts/Events/midsummer.cpp | 33 +++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695820418952974700.sql diff --git a/data/sql/updates/pending_db_world/rev_1695820418952974700.sql b/data/sql/updates/pending_db_world/rev_1695820418952974700.sql new file mode 100644 index 00000000000000..63003177ada8cb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695820418952974700.sql @@ -0,0 +1,7 @@ +-- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual +DELETE FROM `spell_script_names` WHERE `spell_id` IN (29531, 29705, 29726, 29727); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(29531, 'spell_midsummer_ribbon_pole_visual'), +(29705, 'spell_midsummer_ribbon_pole_visual'), +(29726, 'spell_midsummer_ribbon_pole_visual'), +(29727, 'spell_midsummer_ribbon_pole_visual'); diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index e74b0a3defeb82..998a6211b17b9d 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -211,6 +211,10 @@ class spell_gen_crab_disguise : public AuraScript enum RibbonPole { SPELL_RIBBON_POLE_CHANNEL_VISUAL = 29172, + SPELL_RIBBON_POLE_CHANNEL_VISUAL_2 = 29531, + SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE = 29705, + SPELL_TEST_RIBBON_POLE_CHANNEL_RED = 29726, + SPELL_TEST_RIBBON_POLE_CHANNEL_PINK = 29727, SPELL_RIBBON_POLE_XP = 29175, SPELL_RIBBON_POLE_FIREWORKS = 46971, @@ -221,6 +225,17 @@ class spell_midsummer_ribbon_pole : public AuraScript { PrepareAuraScript(spell_midsummer_ribbon_pole) + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo( + { + SPELL_RIBBON_POLE_XP, + SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE, + SPELL_TEST_RIBBON_POLE_CHANNEL_RED, + SPELL_TEST_RIBBON_POLE_CHANNEL_PINK + }); + } + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { PreventDefaultAction(); @@ -229,7 +244,9 @@ class spell_midsummer_ribbon_pole : public AuraScript Creature* cr = target->FindNearestCreature(NPC_RIBBON_POLE_DEBUG_TARGET, 10.0f); if (!cr) { - target->RemoveAura(SPELL_RIBBON_POLE_CHANNEL_VISUAL); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_RED); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_PINK); SetDuration(1); return; } @@ -254,7 +271,19 @@ class spell_midsummer_ribbon_pole : public AuraScript void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* ar = GetTarget(); - ar->CastSpell(ar, SPELL_RIBBON_POLE_CHANNEL_VISUAL, true); + switch (urand(0, 2)) + { + case 0: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE, true); + break; + case 1: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_RED, true); + break; + case 2: + default: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_PINK, true); + break; + } } void Register() override From a2c6af4c568380c11c01ec6599e7e158725d3ded Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Oct 2023 07:26:31 +0000 Subject: [PATCH 158/340] chore(DB): import pending files Referenced commit(s): 003398a8945a32708a01dee4d504304f52ff370e --- .../rev_1695820418952974700.sql => db_world/2023_10_01_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1695820418952974700.sql => db_world/2023_10_01_04.sql} (90%) diff --git a/data/sql/updates/pending_db_world/rev_1695820418952974700.sql b/data/sql/updates/db_world/2023_10_01_04.sql similarity index 90% rename from data/sql/updates/pending_db_world/rev_1695820418952974700.sql rename to data/sql/updates/db_world/2023_10_01_04.sql index 63003177ada8cb..a8dd6809a795ce 100644 --- a/data/sql/updates/pending_db_world/rev_1695820418952974700.sql +++ b/data/sql/updates/db_world/2023_10_01_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_01_03 -> 2023_10_01_04 -- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual DELETE FROM `spell_script_names` WHERE `spell_id` IN (29531, 29705, 29726, 29727); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 287373614526c30518517e2bb10c8a1777989a94 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 5 Oct 2023 03:38:10 -0300 Subject: [PATCH 159/340] feat(Core/Player): Move SaveSkills() to the public scope (#17418) --- src/server/game/Entities/Player/Player.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 49b85e860c0a16..d74825f267ebde 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1553,6 +1553,7 @@ class Player : public Unit, public GridObject void SaveToDB(CharacterDatabaseTransaction trans, bool create, bool logout); void SaveInventoryAndGoldToDB(CharacterDatabaseTransaction trans); // fast save function for item/money cheating preventing void SaveGoldToDB(CharacterDatabaseTransaction trans); + void _SaveSkills(CharacterDatabaseTransaction trans); static void Customize(CharacterCustomizeInfo const* customizeInfo, CharacterDatabaseTransaction trans); static void SavePositionInDB(uint32 mapid, float x, float y, float z, float o, uint32 zone, ObjectGuid guid); @@ -2694,7 +2695,6 @@ class Player : public Unit, public GridObject void _SaveWeeklyQuestStatus(CharacterDatabaseTransaction trans); void _SaveMonthlyQuestStatus(CharacterDatabaseTransaction trans); void _SaveSeasonalQuestStatus(CharacterDatabaseTransaction trans); - void _SaveSkills(CharacterDatabaseTransaction trans); void _SaveSpells(CharacterDatabaseTransaction trans); void _SaveEquipmentSets(CharacterDatabaseTransaction trans); void _SaveEntryPoint(CharacterDatabaseTransaction trans); From c57c2e0583d2e3a5f33d2ef1aeaf31cb968d7cc7 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:44:33 +0300 Subject: [PATCH 160/340] fix(DB/Threat): Innervate having threat modifier. (#17404) --- data/sql/updates/pending_db_world/rev_1696361742234966300.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696361742234966300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696361742234966300.sql b/data/sql/updates/pending_db_world/rev_1696361742234966300.sql new file mode 100644 index 00000000000000..6f43b22385d188 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696361742234966300.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `spell_threat` WHERE `entry`=29166; From 59d941cb68dfa60966555c9bb3ad261b75f1dbf9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Oct 2023 11:45:39 +0000 Subject: [PATCH 161/340] chore(DB): import pending files Referenced commit(s): c57c2e0583d2e3a5f33d2ef1aeaf31cb968d7cc7 --- .../rev_1696361742234966300.sql => db_world/2023_10_05_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696361742234966300.sql => db_world/2023_10_05_00.sql} (53%) diff --git a/data/sql/updates/pending_db_world/rev_1696361742234966300.sql b/data/sql/updates/db_world/2023_10_05_00.sql similarity index 53% rename from data/sql/updates/pending_db_world/rev_1696361742234966300.sql rename to data/sql/updates/db_world/2023_10_05_00.sql index 6f43b22385d188..aa13f0dacae9e6 100644 --- a/data/sql/updates/pending_db_world/rev_1696361742234966300.sql +++ b/data/sql/updates/db_world/2023_10_05_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_01_04 -> 2023_10_05_00 -- DELETE FROM `spell_threat` WHERE `entry`=29166; From 05161a9ffe5cd69832305657f17e0eaafda0c363 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:20:29 +0200 Subject: [PATCH 162/340] fix(CI): windows (#17423) --- .github/workflows/windows_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 9210ae8ae908ea..76d78e7e0a6849 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -45,7 +45,7 @@ jobs: - name: Copy dll files shell: bash run: | - cp "/c/Program Files/OpenSSL-Win64/bin/legacy.dll" "env/dist" + cp "/c/Program Files/OpenSSL/bin/legacy.dll" "env/dist" - name: Dry run authserver shell: bash run: | From 6b720ddf0c6b167adf903c9cd773380d55ec9c04 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:33:12 +0300 Subject: [PATCH 163/340] docs(template): Comment out changes proposed info. (#17438) docs(template): Comment out changes proposed info --- pull_request_template.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 7f6c343dcc411c..269f0d8dbd3122 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,13 +1,12 @@ ## Changes Proposed: + This PR proposes changes to: - [ ] Core (units, players, creatures, game systems). - [ ] Scripts (bosses, spell scripts, creature scripts). - [ ] Database (SAI, creatures, etc). -If your pull request promotes complex changes that require a detailed explanation, please describe them in detail specifying what your solution is and what is it meant to address. - ## Issues Addressed: - Closes From 6d45329df13e137048f01a28c5004f79248a7ea9 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:33:42 +0300 Subject: [PATCH 164/340] fix(DB/Conditions): Don't allow multiple Banner of Provocation (#17430) --- data/sql/updates/pending_db_world/rev_1696575537212629500.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696575537212629500.sql diff --git a/data/sql/updates/pending_db_world/rev_1696575537212629500.sql b/data/sql/updates/pending_db_world/rev_1696575537212629500.sql new file mode 100644 index 00000000000000..28c912ab43c91e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696575537212629500.sql @@ -0,0 +1,4 @@ +-- Banner of Provocation +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceGroup` = 0 AND `SourceEntry` = 27517; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 27517, 0, 0, 30, 0, 181058, 20, 0, 1, 25, 0, '', 'Allow using "Banner of Provocation" if there are no other banners within 20y.'); From 4d285d21b05adcb31e84faf7c83894f4ba07fa3f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Oct 2023 10:34:17 +0000 Subject: [PATCH 165/340] chore(DB): import pending files Referenced commit(s): 6b720ddf0c6b167adf903c9cd773380d55ec9c04 --- .../rev_1696575537212629500.sql => db_world/2023_10_07_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696575537212629500.sql => db_world/2023_10_07_00.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1696575537212629500.sql b/data/sql/updates/db_world/2023_10_07_00.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1696575537212629500.sql rename to data/sql/updates/db_world/2023_10_07_00.sql index 28c912ab43c91e..ba64915231ad9f 100644 --- a/data/sql/updates/pending_db_world/rev_1696575537212629500.sql +++ b/data/sql/updates/db_world/2023_10_07_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_05_00 -> 2023_10_07_00 -- Banner of Provocation DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceGroup` = 0 AND `SourceEntry` = 27517; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 91c6bdd540b1825da1035b8e3cdfcc4d92a8f5c2 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:34:35 +0300 Subject: [PATCH 166/340] fix(Core/Spells): Script Lord Valthalak's Amulet (#17431) * fix(Core/Spells): Script Lord Valthalak's Amulet * cs --- .../rev_1696582271290131600.sql | 7 +++++ .../game/Spells/SpellInfoCorrections.cpp | 6 +++++ src/server/scripts/Spells/spell_generic.cpp | 27 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696582271290131600.sql diff --git a/data/sql/updates/pending_db_world/rev_1696582271290131600.sql b/data/sql/updates/pending_db_world/rev_1696582271290131600.sql new file mode 100644 index 00000000000000..a77254db4dfea5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696582271290131600.sql @@ -0,0 +1,7 @@ +-- Lord Valthalak's Amulet +DELETE FROM `spell_script_names` WHERE `spell_id`=27360; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (27360, 'spell_gen_valthalak_amulet'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceGroup` = 0 AND `SourceEntry` = 27360; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 27360, 0, 0, 29, 0, 16073, 50, 0, 1, 0, 0, '', 'Allow using Lord Valthalak\'s Amulet only if there is no Spirit of Lord Valthalak within 50 yards.'); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index c3ca283d28933e..ff52a96b66b6aa 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4572,6 +4572,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd }); + // Instill Lord Valthalak's Spirit DND + ApplySpellFix({ 27360 }, [](SpellInfo* spellInfo) + { + spellInfo->ChannelInterruptFlags |= AURA_INTERRUPT_FLAG_MOVE; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 299e993b5c8b5f..548889f9589774 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4997,6 +4997,32 @@ class spell_gen_spirit_of_competition_winner : public SpellScript } }; +// 27360 - Lord Valthalak's Amulet +enum Valthalak +{ + SPELL_INSTILL_LORD_VALTHALAK_SPIRIT = 27360, + NPC_LORD_VALTHALAK = 16042 +}; + +class spell_gen_valthalak_amulet : public SpellScript +{ + PrepareSpellScript(spell_gen_valthalak_amulet) + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if (target->GetEntry() == NPC_LORD_VALTHALAK && target->isDead()) + return SPELL_CAST_OK; + + return SPELL_FAILED_BAD_TARGETS; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_valthalak_amulet::CheckCast); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5145,4 +5171,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_curse_of_pain); RegisterSpellScript(spell_gen_spirit_of_competition_participant); RegisterSpellScript(spell_gen_spirit_of_competition_winner); + RegisterSpellScript(spell_gen_valthalak_amulet); } From cc60250977aa6e254e497508b82050a4ece100e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Oct 2023 10:34:51 +0000 Subject: [PATCH 167/340] chore(DB): import pending files Referenced commit(s): 6d45329df13e137048f01a28c5004f79248a7ea9 --- .../rev_1696582271290131600.sql => db_world/2023_10_07_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696582271290131600.sql => db_world/2023_10_07_01.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1696582271290131600.sql b/data/sql/updates/db_world/2023_10_07_01.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1696582271290131600.sql rename to data/sql/updates/db_world/2023_10_07_01.sql index a77254db4dfea5..9dc34a2ac654f6 100644 --- a/data/sql/updates/pending_db_world/rev_1696582271290131600.sql +++ b/data/sql/updates/db_world/2023_10_07_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_07_00 -> 2023_10_07_01 -- Lord Valthalak's Amulet DELETE FROM `spell_script_names` WHERE `spell_id`=27360; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (27360, 'spell_gen_valthalak_amulet'); From 90b16ca065a4881b94438575502c2441f435d53b Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Sat, 7 Oct 2023 14:06:11 +0330 Subject: [PATCH 168/340] fix(Core): GridCleanUpDelay Log (#17436) Update World.cpp --- src/server/game/World/World.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 951d327254d26e..dff5f5a9155ee2 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -673,7 +673,7 @@ void World::LoadConfigSettings(bool reload) _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfigMgr->GetOption("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS); if (_int_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY) { - LOG_ERROR("server.loading", "GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", _int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); + LOG_ERROR("server.loading", "GridCleanUpDelay ({}) must be greater {}. Use this minimal value.", _int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY; } if (reload) From 66a7787c45b152740f29c901a2a300b28eac5e39 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:24:40 +0300 Subject: [PATCH 169/340] fix(DB/Waypoint): Port Stone Fury waypoints from Trinity. (#17443) Co-authored-by: Rushor --- .../rev_1696687284583345800.sql | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696687284583345800.sql diff --git a/data/sql/updates/pending_db_world/rev_1696687284583345800.sql b/data/sql/updates/pending_db_world/rev_1696687284583345800.sql new file mode 100644 index 00000000000000..fe8de2002cd48e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696687284583345800.sql @@ -0,0 +1,43 @@ +-- Stone Fury from Trinity +UPDATE `creature_template` SET `MovementType` = 2 WHERE (`entry` = 2258); + +DELETE FROM `creature_template_addon` WHERE (`entry` = 2258); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(2258, 639130, 0, 0, 1, 0, 0, ''); + +DELETE FROM `creature` WHERE (`id1` = 2258) AND (`guid` IN (63913)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(63913, 2258, 0, 0, 0, 0, 0, 1, 1, 0, 664.315, -1027.59, 160.39, 5.21757, 72000, 0, 0, 1536, 0, 2, 0, 0, 0, '', 0); + +DELETE FROM `waypoint_data` WHERE `id` = 639130; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(639130, 1, 664.315, -1027.59, 160.39, NULL, 0, 0, 0, 100, 0), +(639130, 2, 654.02, -1032.34, 163.127, NULL, 0, 0, 0, 100, 0), +(639130, 3, 634.638, -1041.36, 163.816, NULL, 0, 0, 0, 100, 0), +(639130, 4, 622.304, -1055.48, 163.186, NULL, 0, 0, 0, 100, 0), +(639130, 5, 620.168, -1114.91, 160.186, NULL, 0, 0, 0, 100, 0), +(639130, 6, 627.218, -1131.61, 159.535, NULL, 0, 0, 0, 100, 0), +(639130, 7, 631.939, -1149.35, 155.421, NULL, 0, 0, 0, 100, 0), +(639130, 8, 629.934, -1192.34, 145.181, NULL, 0, 0, 0, 100, 0), +(639130, 9, 633.981, -1229.12, 136.877, NULL, 0, 0, 0, 100, 0), +(639130, 10, 634.73, -1271.43, 121.429, NULL, 0, 0, 0, 100, 0), +(639130, 11, 627.306, -1321.81, 106.197, NULL, 0, 0, 0, 100, 0), +(639130, 12, 629.422, -1375.57, 93.9589, NULL, 0, 0, 0, 100, 0), +(639130, 13, 643.925, -1408.88, 87.1831, NULL, 0, 0, 0, 100, 0), +(639130, 14, 668.443, -1437.6, 81.8552, NULL, 0, 0, 0, 100, 0), +(639130, 15, 708.689, -1455.94, 81.4619, NULL, 0, 0, 0, 100, 0), +(639130, 16, 745.689, -1459.7, 80.3421, NULL, 0, 0, 0, 100, 0), +(639130, 17, 708.769, -1455.86, 81.4599, NULL, 0, 0, 0, 100, 0), +(639130, 18, 667.903, -1437.37, 81.9153, NULL, 0, 0, 0, 100, 0), +(639130, 19, 643.733, -1408.63, 87.2146, NULL, 0, 0, 0, 100, 0), +(639130, 20, 629.19, -1375.19, 94.0446, NULL, 0, 0, 0, 100, 0), +(639130, 21, 627.374, -1321.59, 106.257, NULL, 0, 0, 0, 100, 0), +(639130, 22, 634.783, -1271.27, 121.478, NULL, 0, 0, 0, 100, 0), +(639130, 23, 633.98, -1228.57, 137.007, NULL, 0, 0, 0, 100, 0), +(639130, 24, 629.947, -1191.76, 145.328, NULL, 0, 0, 0, 100, 0), +(639130, 25, 631.939, -1148.87, 155.504, NULL, 0, 0, 0, 100, 0), +(639130, 26, 627.116, -1131.07, 159.662, NULL, 0, 0, 0, 100, 0), +(639130, 27, 620.092, -1114.7, 160.189, NULL, 0, 0, 0, 100, 0), +(639130, 28, 622.218, -1054.98, 163.22, NULL, 0, 0, 0, 100, 0), +(639130, 29, 634.789, -1041.15, 163.826, NULL, 0, 0, 0, 100, 0), +(639130, 30, 653.802, -1032.34, 163.225, NULL, 0, 0, 0, 100, 0); From 366b8d01fc0c90d97a922893aee03c5010418867 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Oct 2023 14:25:46 +0000 Subject: [PATCH 170/340] chore(DB): import pending files Referenced commit(s): 66a7787c45b152740f29c901a2a300b28eac5e39 --- .../rev_1696687284583345800.sql => db_world/2023_10_07_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696687284583345800.sql => db_world/2023_10_07_02.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1696687284583345800.sql b/data/sql/updates/db_world/2023_10_07_02.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1696687284583345800.sql rename to data/sql/updates/db_world/2023_10_07_02.sql index fe8de2002cd48e..6df8940c639584 100644 --- a/data/sql/updates/pending_db_world/rev_1696687284583345800.sql +++ b/data/sql/updates/db_world/2023_10_07_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_07_01 -> 2023_10_07_02 -- Stone Fury from Trinity UPDATE `creature_template` SET `MovementType` = 2 WHERE (`entry` = 2258); From 619f7297f955d3c4e2f228576c344c3c007c4fb5 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:18:40 -0400 Subject: [PATCH 171/340] refactor(apps): remove docker image prune in dashboard (#17405) refactor(apps): remove docker image prune in dash --- apps/docker/docker-cmd.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/docker/docker-cmd.sh b/apps/docker/docker-cmd.sh index 89e41e14a27598..3a75174adc9e62 100644 --- a/apps/docker/docker-cmd.sh +++ b/apps/docker/docker-cmd.sh @@ -79,7 +79,6 @@ while [[ $# -gt 0 ]]; do pull) set -x docker compose --profile local --profile dev --profile dev-build pull - docker image prune -f set +x shift ;; @@ -87,7 +86,6 @@ while [[ $# -gt 0 ]]; do build:nocache) set -x docker compose --profile local --profile dev --profile dev-build build --no-cache - docker image prune -f docker compose run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh set +x shift @@ -95,7 +93,6 @@ while [[ $# -gt 0 ]]; do clean:build) set -x - docker image prune -f docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean set +x @@ -141,7 +138,6 @@ while [[ $# -gt 0 ]]; do build:prod|prod:build) set -x docker compose --profile prod build - docker image prune -f set +x shift ;; From 5357a31a01c65859a5cddb6366bfc636e0a76504 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 8 Oct 2023 09:06:57 +0200 Subject: [PATCH 172/340] chore(Core/Misc): warhead -> acore (#17447) --- src/cmake/compiler/clang/settings.cmake | 2 +- src/cmake/compiler/gcc/settings.cmake | 2 +- src/cmake/macros/ConfigInstall.cmake | 2 +- src/common/Cryptography/TOTP.h | 4 ++-- src/common/Encoding/Base32.cpp | 16 ++++++++++++++-- src/common/Encoding/Base32.h | 20 ++++++++++++++++---- src/common/Encoding/Base64.cpp | 16 ++++++++++++++-- src/common/Encoding/Base64.h | 20 ++++++++++++++++---- src/common/Encoding/BaseEncoding.h | 20 ++++++++++++++++---- src/server/apps/worldserver/Main.cpp | 2 +- src/server/game/Battlegrounds/Arena.h | 2 +- src/server/game/Battlegrounds/ArenaScore.h | 2 +- src/server/shared/Secrets/SecretMgr.h | 4 ++-- 13 files changed, 86 insertions(+), 26 deletions(-) diff --git a/src/cmake/compiler/clang/settings.cmake b/src/cmake/compiler/clang/settings.cmake index 93e85762e08702..92b95cb476e808 100644 --- a/src/cmake/compiler/clang/settings.cmake +++ b/src/cmake/compiler/clang/settings.cmake @@ -131,7 +131,7 @@ if(BUILD_SHARED_LIBS) -fvisibility=hidden) # --no-undefined to throw errors when there are undefined symbols - # (caused through missing WARHEAD_*_API macros). + # (caused through missing ACORE_*_API macros). set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --no-undefined") message(STATUS "Clang: Disallow undefined symbols") diff --git a/src/cmake/compiler/gcc/settings.cmake b/src/cmake/compiler/gcc/settings.cmake index a5fe2c33e4d61e..8723a6043c130e 100644 --- a/src/cmake/compiler/gcc/settings.cmake +++ b/src/cmake/compiler/gcc/settings.cmake @@ -67,7 +67,7 @@ if(BUILD_SHARED_LIBS) INTERFACE -fvisibility=hidden) - # Should break the build when there are WARHEAD_*_API macros missing + # Should break the build when there are ACORE_*_API macros missing # but it complains about missing references in precompiled headers. # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--no-undefined") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined") diff --git a/src/cmake/macros/ConfigInstall.cmake b/src/cmake/macros/ConfigInstall.cmake index 836ec610c802e6..090e3dba2ce44b 100644 --- a/src/cmake/macros/ConfigInstall.cmake +++ b/src/cmake/macros/ConfigInstall.cmake @@ -73,7 +73,7 @@ endfunction() # # Use it like: -# CopyModuleConfig("warhead.conf.dist") +# CopyModuleConfig("acore.conf.dist") # function(CopyModuleConfig configDir) diff --git a/src/common/Cryptography/TOTP.h b/src/common/Cryptography/TOTP.h index 01b2a53bd76865..ddcaf75734d551 100644 --- a/src/common/Cryptography/TOTP.h +++ b/src/common/Cryptography/TOTP.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef WARHEAD_TOTP_H -#define WARHEAD_TOTP_H +#ifndef ACORE_TOTP_H +#define ACORE_TOTP_H #include "Define.h" #include diff --git a/src/common/Encoding/Base32.cpp b/src/common/Encoding/Base32.cpp index 1a663a46e5ca52..8906e0eaf7df8c 100644 --- a/src/common/Encoding/Base32.cpp +++ b/src/common/Encoding/Base32.cpp @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "Base32.h" diff --git a/src/common/Encoding/Base32.h b/src/common/Encoding/Base32.h index 68c8be46363594..1f15212c1364d6 100644 --- a/src/common/Encoding/Base32.h +++ b/src/common/Encoding/Base32.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 WARHEAD_BASE32_H -#define WARHEAD_BASE32_H +#ifndef ACORE_BASE32_H +#define ACORE_BASE32_H #include "Define.h" #include "Optional.h" diff --git a/src/common/Encoding/Base64.cpp b/src/common/Encoding/Base64.cpp index 1e5c1968ec6f3a..ee37be5303d92a 100644 --- a/src/common/Encoding/Base64.cpp +++ b/src/common/Encoding/Base64.cpp @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 "Base64.h" diff --git a/src/common/Encoding/Base64.h b/src/common/Encoding/Base64.h index 8fe7cf0d5bb2c3..b1cb7b18fe8493 100644 --- a/src/common/Encoding/Base64.h +++ b/src/common/Encoding/Base64.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 WARHEAD_BASE64_H -#define WARHEAD_BASE64_H +#ifndef ACORE_BASE64_H +#define ACORE_BASE64_H #include "Define.h" #include "Optional.h" diff --git a/src/common/Encoding/BaseEncoding.h b/src/common/Encoding/BaseEncoding.h index 8ae0673d3b5cb8..ed1ea96ec6a8a9 100644 --- a/src/common/Encoding/BaseEncoding.h +++ b/src/common/Encoding/BaseEncoding.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore 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 Affero General Public License as published by the + * Free Software Foundation; either version 3 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 Affero 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 WARHEAD_BASE_ENCODING_HPP -#define WARHEAD_BASE_ENCODING_HPP +#ifndef ACORE_BASE_ENCODING_HPP +#define ACORE_BASE_ENCODING_HPP #include "Define.h" #include "Optional.h" diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp index b2087448a7dc4b..f8f98ac6a215c5 100644 --- a/src/server/apps/worldserver/Main.cpp +++ b/src/server/apps/worldserver/Main.cpp @@ -431,7 +431,7 @@ int main(int argc, char** argv) // 0 - normal shutdown // 1 - shutdown at error - // 2 - restart command used, this code can be used by restarter for restart Warheadd + // 2 - restart command used, this code can be used by restarter for restart AzerothCore return World::GetExitCode(); } diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h index 0be78b705d589e..fd7460080301e6 100644 --- a/src/server/game/Battlegrounds/Arena.h +++ b/src/server/game/Battlegrounds/Arena.h @@ -63,4 +63,4 @@ class AC_GAME_API Arena : public Battleground void EndBattleground(TeamId winnerTeamId) override; }; -#endif // WARHEAD_ARENA_H +#endif // ACORE_ARENA_H diff --git a/src/server/game/Battlegrounds/ArenaScore.h b/src/server/game/Battlegrounds/ArenaScore.h index b51dacf95b7734..d29c1487c78295 100644 --- a/src/server/game/Battlegrounds/ArenaScore.h +++ b/src/server/game/Battlegrounds/ArenaScore.h @@ -72,4 +72,4 @@ struct AC_GAME_API ArenaTeamScore std::string TeamName{}; }; -#endif // WARHEAD_ARENA_SCORE_H +#endif // ACORE_ARENA_SCORE_H diff --git a/src/server/shared/Secrets/SecretMgr.h b/src/server/shared/Secrets/SecretMgr.h index 9dad199213e7a8..8e891aa027bb88 100644 --- a/src/server/shared/Secrets/SecretMgr.h +++ b/src/server/shared/Secrets/SecretMgr.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef __WARHEAD_SECRETMGR_H__ -#define __WARHEAD_SECRETMGR_H__ +#ifndef __ACORE_SECRETMGR_H__ +#define __ACORE_SECRETMGR_H__ #include "BigNumber.h" #include "Common.h" From a4e4d6ddb28c23102795bb00d30b452688379b9a Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 8 Oct 2023 09:07:17 +0200 Subject: [PATCH 173/340] feat(Core/Player): Implement commentator tag (#17449) * feat(Core/Player): Implement commentator tag * remove redundant session check --- .../rev_1696722553687617600.sql | 3 + src/server/game/Entities/Player/Player.cpp | 2 + src/server/game/Entities/Player/Player.h | 4 +- src/server/scripts/Commands/cs_misc.cpp | 79 ++++++++++++++----- 4 files changed, 69 insertions(+), 19 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696722553687617600.sql diff --git a/data/sql/updates/pending_db_world/rev_1696722553687617600.sql b/data/sql/updates/pending_db_world/rev_1696722553687617600.sql new file mode 100644 index 00000000000000..e2ea5134c3fa8b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696722553687617600.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `command` WHERE `name`='commentator'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES ('commentator', 2, 'Syntax: .commentator [on/off]\r\n\r\nEnable or Disable in game Commentator tag or show current state if on/off not provided.'); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a4d64daf17902a..4d885098c0d509 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1294,6 +1294,8 @@ uint8 Player::GetChatTag() const tag |= CHAT_TAG_DND; if (isAFK()) tag |= CHAT_TAG_AFK; + if (IsCommentator()) + tag |= CHAT_TAG_COM; if (IsDeveloper()) tag |= CHAT_TAG_DEV; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index d74825f267ebde..bb4b0585c52009 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -839,7 +839,7 @@ enum PlayerChatTag CHAT_TAG_AFK = 0x01, CHAT_TAG_DND = 0x02, CHAT_TAG_GM = 0x04, - CHAT_TAG_COM = 0x08, // Commentator + CHAT_TAG_COM = 0x08, // Commentator tag. Do not exist in clean client CHAT_TAG_DEV = 0x10, }; @@ -1139,6 +1139,8 @@ class Player : public Unit, public GridObject void SendTaxiNodeStatusMultiple(); // mount_id can be used in scripting calls + [[nodiscard]] bool IsCommentator() const { return HasPlayerFlag(PLAYER_FLAGS_COMMENTATOR2); } + void SetCommentator(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_COMMENTATOR2, on); } [[nodiscard]] bool IsDeveloper() const { return HasPlayerFlag(PLAYER_FLAGS_DEVELOPER); } void SetDeveloper(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER, on); } [[nodiscard]] bool isAcceptWhispers() const { return m_ExtraFlags & PLAYER_EXTRA_ACCEPT_WHISPERS; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 080393da7add32..5fc4714fb6b746 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -88,6 +88,7 @@ class misc_commandscript : public CommandScript { static ChatCommandTable commandTable = { + { "commentator", HandleCommentatorCommand, SEC_MODERATOR, Console::No }, { "dev", HandleDevCommand, SEC_ADMINISTRATOR, Console::No }, { "gps", HandleGPSCommand, SEC_MODERATOR, Console::No }, { "aura", HandleAuraCommand, SEC_GAMEMASTER, Console::No }, @@ -451,6 +452,51 @@ class misc_commandscript : public CommandScript return true; } + static bool HandleCommentatorCommand(ChatHandler* handler, Optional enableArg) + { + WorldSession* session = handler->GetSession(); + + if (!session) + { + return false; + } + + auto SetCommentatorMod = [&](bool enable) + { + session->SendNotification(enable ? "Commentator mode on" : "Commentator mode off"); + session->GetPlayer()->SetCommentator(enable); + }; + + if (!enableArg) + { + if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsCommentator()) + { + SetCommentatorMod(true); + } + else + { + SetCommentatorMod(false); + } + + return true; + } + + if (*enableArg) + { + SetCommentatorMod(true); + return true; + } + else + { + SetCommentatorMod(false); + return true; + } + + handler->SendSysMessage(LANG_USE_BOL); + handler->SetSentErrorMessage(true); + return false; + } + static bool HandleDevCommand(ChatHandler* handler, Optional enableArg) { WorldSession* session = handler->GetSession(); @@ -467,32 +513,29 @@ class misc_commandscript : public CommandScript sScriptMgr->OnHandleDevCommand(handler->GetSession()->GetPlayer(), enable); }; - if (WorldSession* session = handler->GetSession()) + if (!enableArg) { - if (!enableArg) - { - if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper()) - { - SetDevMod(true); - } - else - { - SetDevMod(false); - } - - return true; - } - - if (*enableArg) + if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper()) { SetDevMod(true); - return true; } else { SetDevMod(false); - return true; } + + return true; + } + + if (*enableArg) + { + SetDevMod(true); + return true; + } + else + { + SetDevMod(false); + return true; } handler->SendSysMessage(LANG_USE_BOL); From f5f10edd77f0eb7b960870e4e6a574e15d66a760 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 07:08:10 +0000 Subject: [PATCH 174/340] chore(DB): import pending files Referenced commit(s): 5357a31a01c65859a5cddb6366bfc636e0a76504 --- .../rev_1696722553687617600.sql => db_world/2023_10_08_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696722553687617600.sql => db_world/2023_10_08_00.sql} (85%) diff --git a/data/sql/updates/pending_db_world/rev_1696722553687617600.sql b/data/sql/updates/db_world/2023_10_08_00.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1696722553687617600.sql rename to data/sql/updates/db_world/2023_10_08_00.sql index e2ea5134c3fa8b..c5717a04a1daf9 100644 --- a/data/sql/updates/pending_db_world/rev_1696722553687617600.sql +++ b/data/sql/updates/db_world/2023_10_08_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_07_02 -> 2023_10_08_00 -- DELETE FROM `command` WHERE `name`='commentator'; INSERT INTO `command` (`name`, `security`, `help`) VALUES ('commentator', 2, 'Syntax: .commentator [on/off]\r\n\r\nEnable or Disable in game Commentator tag or show current state if on/off not provided.'); From f7e77d68f9f56d764e7a27cfae6c345a4c446624 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:47:11 +0300 Subject: [PATCH 175/340] fix(DB/Gameobject): Port BRD - Dark Iron Deposits from Mangos (#17445) --- .../rev_1696692827138273800.sql | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696692827138273800.sql diff --git a/data/sql/updates/pending_db_world/rev_1696692827138273800.sql b/data/sql/updates/pending_db_world/rev_1696692827138273800.sql new file mode 100644 index 00000000000000..de2c3177e80503 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696692827138273800.sql @@ -0,0 +1,76 @@ +-- Blackrock Depths - Dark Iron Deposit(s) +DELETE FROM `gameobject` WHERE `id` = 165658 AND `map` = 230; +DELETE FROM `pool_template` WHERE `entry` BETWEEN 11700 AND 11705; +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN 11700 AND 11705 AND `guid` BETWEEN 10601 and 10626; + +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(10601, 165658, 230, 0, 0, 1, 1, 884.448, -410.508, -48.2044, 4.34587, 0, 0, -0.824126, 0.566406, 604800, 100, 1), +(10602, 165658, 230, 0, 0, 1, 1, 1215.01, -384.236, -98.9694, 1.79769, 0, 0, 0.782608, 0.622515, 604800, 100, 1), +(10603, 165658, 230, 0, 0, 1, 1, 418.63, -158.696, -63.1528, 0.226893, 0, 0, 0.113203, 0.993572, 604800, 100, 1), +(10604, 165658, 230, 0, 0, 1, 1, 980.556, -419.592, -59.3434, 4.4855, 0, 0, -0.782608, 0.622515, 604800, 100, 1), +(10605, 165658, 230, 0, 0, 1, 1, 756.207, 158.727, -72.2169, -1.23918, 0, 0, -0.580703, 0.814116, 604800, 100, 1), +(10606, 165658, 230, 0, 0, 1, 1, 640.727, 28.869, -74.0452, 1.8675, 0, 0, 0.803857, 0.594823, 604800, 100, 1), +(10607, 165658, 230, 0, 0, 1, 1, 1002.0756, -395.6539, -64.0793, 0.15708, 0, 0, 0.0784591, 0.996917, 604800, 100, 1), +(10608, 165658, 230, 0, 0, 1, 1, 646.092, 193.607, -72.1246, 0.523598, 0, 0, 0.258819, 0.965926, 604800, 100, 1), +(10609, 165658, 230, 0, 0, 1, 1, 670.734, -201.308, -78.1551, 3.75246, 0, 0, -0.953716, 0.300708, 604800, 100, 1), +(10610, 165658, 230, 0, 0, 1, 1, 673.099, -21.6642, -73.7605, 2.74016, 0, 0, 0.979924, 0.19937, 604800, 100, 1), +(10611, 165658, 230, 0, 0, 1, 1, 313.624, -211.422, -77.3546, -0.663223, 0, 0, -0.325567, 0.945519, 604800, 100, 1), +(10612, 165658, 230, 0, 0, 1, 1, 1014.22, -356.364, -65.7033, 1.13446, 0, 0, 0.537299, 0.843392, 604800, 100, 1), +(10613, 165658, 230, 0, 0, 1, 1, 637.928, -162.775, -70.9528, -2.75761, 0, 0, -0.981627, 0.190812, 604800, 100, 1), +(10614, 165658, 230, 0, 0, 1, 1, 545.169, -128.195, -60.3184, -1.72788, 0, 0, 0.760406, -0.649448, 604800, 100, 1), +(10615, 165658, 230, 0, 0, 1, 1, 977.641, -316.468, -70.6036, 1.79769, 0, 0, 0.782608, 0.622515, 604800, 100, 1), +(10616, 165658, 230, 0, 0, 1, 1, 636.57, -274.759, -83.7882, 4.01426, 0, 0, -0.906307, 0.422619, 604800, 100, 1), +(10617, 165658, 230, 0, 0, 1, 1, 679.721, 102.181, -73.2564, -1.18682, 0, 0, 0.559193, -0.829037, 604800, 100, 1), +(10618, 165658, 230, 0, 0, 1, 1, 634.768, -56.406, -73.6264, 2.96704, 0, 0, 0.996194, 0.087165, 604800, 100, 1), +(10619, 165658, 230, 0, 0, 1, 1, 327.184, -58.5715, -71.3615, 0.715585, 0, 0, 0.350207, 0.936672, 604800, 100, 1), +(10620, 165658, 230, 0, 0, 1, 1, 1204.1, -350.158, -93.6315, 0.59341, 0, 0, 0.292371, 0.956305, 604800, 100, 1), +(10621, 165658, 230, 0, 0, 1, 1, 918.903, -447.008, -53.8907, 0.261798, 0, 0, 0.130526, 0.991445, 604800, 100, 1), +(10622, 165658, 230, 0, 0, 1, 1, 748.476, -53.7894, -71.278, 2.96706, 0, 0, 0.996195, 0.0871558, 604800, 100, 1), +(10623, 165658, 230, 0, 0, 1, 1, 291.891, -122.786, -69.1713, 1.41372, 0, 0, 0.649447, 0.760406, 604800, 100, 1), +(10624, 165658, 230, 0, 0, 1, 1, 503.193, -190.118, -59.3156, -0.401426, 0, 0, 0.199368, -0.979925, 604800, 100, 1), +(10625, 165658, 230, 0, 0, 1, 1, 643.342, 144.62, -73.8284, 0.523598, 0, 0, 0.258819, 0.965926, 604800, 100, 1), +(10626, 165658, 230, 0, 0, 1, 1, 964.466, -436.64, -54.6864, 5.96903, 0, 0, -0.156434, 0.987688, 604800, 100, 1); + +SET +@Bridge = 11700, +@Prison = 11701, +@Arena = 11702, +@Gar = 11703, +@Highway = 11704, +@City = 11705; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@Bridge, 1, 'BRD - Dark Iron Deposit - Bridge'), +(@Prison, 1, 'BRD - Dark Iron Deposit - Prison'), +(@Arena, 1, 'BRD - Dark Iron Deposit - Arena'), +(@Gar, 1, 'BRD - Dark Iron Deposit - Gar'), +(@Highway, 1, 'BRD - Dark Iron Deposit - Highway'), +(@City, 1, 'BRD - Dark Iron Deposit - City'); + +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(10602, @Bridge, 0, 'Dark Iron Deposit - Bridge'), +(10620, @Bridge, 0, 'Dark Iron Deposit - Bridge'), +(10619, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10623, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10611, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10603, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10624, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10616, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10609, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10613, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10614, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10608, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10625, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10617, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10605, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10606, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10610, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10618, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10622, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10615, @City, 0, 'Dark Iron Deposit - City'), +(10612, @City, 0, 'Dark Iron Deposit - City'), +(10607, @City, 0, 'Dark Iron Deposit - City'), +(10604, @City, 0, 'Dark Iron Deposit - City'), +(10626, @City, 0, 'Dark Iron Deposit - City'), +(10621, @City, 0, 'Dark Iron Deposit - City'), +(10601, @City, 0, 'Dark Iron Deposit - City'); From 150b38fcf6aca09b3b297d1c99a646d6a3730053 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 11:48:31 +0000 Subject: [PATCH 176/340] chore(DB): import pending files Referenced commit(s): f7e77d68f9f56d764e7a27cfae6c345a4c446624 --- .../rev_1696692827138273800.sql => db_world/2023_10_08_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696692827138273800.sql => db_world/2023_10_08_01.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1696692827138273800.sql b/data/sql/updates/db_world/2023_10_08_01.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696692827138273800.sql rename to data/sql/updates/db_world/2023_10_08_01.sql index de2c3177e80503..4b238a56ecf24f 100644 --- a/data/sql/updates/pending_db_world/rev_1696692827138273800.sql +++ b/data/sql/updates/db_world/2023_10_08_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_00 -> 2023_10_08_01 -- Blackrock Depths - Dark Iron Deposit(s) DELETE FROM `gameobject` WHERE `id` = 165658 AND `map` = 230; DELETE FROM `pool_template` WHERE `entry` BETWEEN 11700 AND 11705; From 3118d1db5b4571b6a965c2fbe6bce17f9767f741 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:50:06 +0300 Subject: [PATCH 177/340] fix(DB/Loot): Ghostweave Patterns (#17437) --- data/sql/updates/pending_db_world/rev_1696662162909705600.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696662162909705600.sql diff --git a/data/sql/updates/pending_db_world/rev_1696662162909705600.sql b/data/sql/updates/pending_db_world/rev_1696662162909705600.sql new file mode 100644 index 00000000000000..59a973964d824f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696662162909705600.sql @@ -0,0 +1,2 @@ +-- Ghostweave Patterns +DELETE FROM `reference_loot_template` WHERE `Entry` IN (24708,24709) AND `Item` IN (14495,14480,14473,14477); From e48b57430a57567167ebdedca737f4f66f67e754 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:51:13 +0300 Subject: [PATCH 178/340] fix(DB/Creature): "Dirty" Michael Crowe continuous animation loop (#17452) * fix(DB/Creature): "Dirty" Michael Crowe continuous animation loop * remove waypoint_scripts --- .../rev_1696750954220791100.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696750954220791100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696750954220791100.sql b/data/sql/updates/pending_db_world/rev_1696750954220791100.sql new file mode 100644 index 00000000000000..48c768bea7bd85 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696750954220791100.sql @@ -0,0 +1,18 @@ +-- "Dirty" Michael Crowe +DELETE FROM `waypoint_data` WHERE `id`=306490; +DELETE FROM `waypoint_scripts` WHERE `id`=23; +DELETE FROM `creature_addon` WHERE `guid` = 30649; +UPDATE `creature` SET `MovementType` = 0 WHERE `id1` = 23896 AND `guid` = 30649; + +DELETE FROM `creature_template_addon` WHERE (`entry` = 23896); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(23896, 0, 0, 0, 1, 0, 0, ''); + +DELETE FROM `creature_text` WHERE `CreatureID`=23896; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(23896, 0, 0, 'You might wanna stand back. Fish guttin\' is a dirty job.', 12, 0, 100, 1, 0, 0, 22392, 0, '"Dirty" Michael Crowe'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23896; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23896); +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`, `event_param6`, `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 +(23896, 0, 0, 0, 1, 0, 100, 0, 60000, 120000, 60000, 120000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '"Dirty" Michael Crowe - Out of Combat - Say Line 0'); From 999cdf7ee45c7a0aff7ca068146dc1d5f3350c0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 11:51:18 +0000 Subject: [PATCH 179/340] chore(DB): import pending files Referenced commit(s): 3118d1db5b4571b6a965c2fbe6bce17f9767f741 --- .../rev_1696662162909705600.sql => db_world/2023_10_08_02.sql} | 1 + .../rev_1696750954220791100.sql => db_world/2023_10_08_03.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696662162909705600.sql => db_world/2023_10_08_02.sql} (75%) rename data/sql/updates/{pending_db_world/rev_1696750954220791100.sql => db_world/2023_10_08_03.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1696662162909705600.sql b/data/sql/updates/db_world/2023_10_08_02.sql similarity index 75% rename from data/sql/updates/pending_db_world/rev_1696662162909705600.sql rename to data/sql/updates/db_world/2023_10_08_02.sql index 59a973964d824f..6ac627e48cdf3b 100644 --- a/data/sql/updates/pending_db_world/rev_1696662162909705600.sql +++ b/data/sql/updates/db_world/2023_10_08_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_08_01 -> 2023_10_08_02 -- Ghostweave Patterns DELETE FROM `reference_loot_template` WHERE `Entry` IN (24708,24709) AND `Item` IN (14495,14480,14473,14477); diff --git a/data/sql/updates/pending_db_world/rev_1696750954220791100.sql b/data/sql/updates/db_world/2023_10_08_03.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1696750954220791100.sql rename to data/sql/updates/db_world/2023_10_08_03.sql index 48c768bea7bd85..d9c55b36062d2e 100644 --- a/data/sql/updates/pending_db_world/rev_1696750954220791100.sql +++ b/data/sql/updates/db_world/2023_10_08_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_02 -> 2023_10_08_03 -- "Dirty" Michael Crowe DELETE FROM `waypoint_data` WHERE `id`=306490; DELETE FROM `waypoint_scripts` WHERE `id`=23; From 1ad1ba07c89a168cbfd444e51e066d024c971ac3 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:55:40 +0300 Subject: [PATCH 180/340] fix(DB/SAI): The Legend of Stalvan spawns (#17433) * fix(DB/SAI): The Legend of Stalvan spawns * ocd * ; --- .../rev_1696600422866666000.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696600422866666000.sql diff --git a/data/sql/updates/pending_db_world/rev_1696600422866666000.sql b/data/sql/updates/pending_db_world/rev_1696600422866666000.sql new file mode 100644 index 00000000000000..0197fb4336ea53 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696600422866666000.sql @@ -0,0 +1,17 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1561,3643) AND `source_type` = 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`, `event_param6`, `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 +-- Sealed Crate +(1561, 1, 0, 0, 19, 0, 100, 0, 74, 0, 0, 0, 0, 0, 12, 2044, 1, 30000, 0, 0, 0, 8, 0, 0, 0, 0, -8841.93, 985.171, 98.6999, 6.00926, 'Sealed Crate - On Quest \'The Legend of Stalvan\' Taken - Summon Creature \'Forlorn Spirit\''), +-- Old Footlocker +(3643, 1, 0, 0, 20, 0, 100, 0, 67, 0, 0, 0, 0, 0, 12, 2044, 2, 30000, 0, 0, 0, 8, 0, 0, 0, 0, -10951.4, 1568.86, 46.9779, 3.75142, 'Old Footlocker - On Quest \'The Legend of Stalvan\' Finished - Summon Creature \'Forlorn Spirit\''); + +-- Forlorn Spirit +DELETE FROM `smart_scripts` WHERE `entryorguid` = 2044 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 204400 AND `source_type` = 9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(2044, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 204400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - On Respawn - Run Script'), +(2044, 0, 1, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 0, 0, 11, 3105, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - In Combat - Cast \'Curse of Stalvan\''), +(2044, 0, 2, 0, 0, 0, 100, 0, 10000, 15000, 18500, 27000, 0, 0, 11, 118, 32, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - In Combat - Cast \'Polymorph\' (Skip Tank)'), +(204400, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 15, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - Actionlist - Say Line 0'), +(204400, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 15, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - Actionlist - Start Attacking'); From b1395b9450d7f7d35b834a2062fd480273cdb13f Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 8 Oct 2023 13:56:16 +0200 Subject: [PATCH 181/340] refactor(Core/Creature): Calculate BaseArmor as float (#17448) --- src/server/game/Entities/Creature/Creature.cpp | 2 +- src/server/game/Entities/Creature/CreatureData.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index d48b8e08751f37..b88560d909053f 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -535,7 +535,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool)); CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class); - float armor = (float)stats->GenerateArmor(cInfo); /// @todo: Why is this treated as uint32 when it's a float? + float armor = stats->GenerateArmor(cInfo); SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor); SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY])); SetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FIRE])); diff --git a/src/server/game/Entities/Creature/CreatureData.h b/src/server/game/Entities/Creature/CreatureData.h index 80e4b3c7b8fa26..2d33cb9d34d3cd 100644 --- a/src/server/game/Entities/Creature/CreatureData.h +++ b/src/server/game/Entities/Creature/CreatureData.h @@ -292,7 +292,7 @@ struct CreatureBaseStats { uint32 BaseHealth[MAX_EXPANSIONS]; uint32 BaseMana; - uint32 BaseArmor; + float BaseArmor; uint32 AttackPower; uint32 RangedAttackPower; float BaseDamage[MAX_EXPANSIONS]; @@ -313,9 +313,9 @@ struct CreatureBaseStats return uint32(std::ceil(BaseMana * info->ModMana)); } - uint32 GenerateArmor(CreatureTemplate const* info) const + float GenerateArmor(CreatureTemplate const* info) const { - return uint32(std::ceil(BaseArmor * info->ModArmor)); + return std::ceil(BaseArmor * info->ModArmor); } float GenerateBaseDamage(CreatureTemplate const* info) const From 9429ce14a611503802d7768b1a4e10fb9f0c48dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 11:56:46 +0000 Subject: [PATCH 182/340] chore(DB): import pending files Referenced commit(s): 1ad1ba07c89a168cbfd444e51e066d024c971ac3 --- .../rev_1696600422866666000.sql => db_world/2023_10_08_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696600422866666000.sql => db_world/2023_10_08_04.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1696600422866666000.sql b/data/sql/updates/db_world/2023_10_08_04.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1696600422866666000.sql rename to data/sql/updates/db_world/2023_10_08_04.sql index 0197fb4336ea53..4a672363aba3b2 100644 --- a/data/sql/updates/pending_db_world/rev_1696600422866666000.sql +++ b/data/sql/updates/db_world/2023_10_08_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_03 -> 2023_10_08_04 DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1561,3643) AND `source_type` = 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`, `event_param6`, `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 -- Sealed Crate From 5d836cd48c3a8e8dd1633df8ddef993eaaf7464d Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:58:29 +0300 Subject: [PATCH 183/340] fix(DB/SAI): Port Pamela Redpath from Trinity. (#17451) https: //github.com/TrinityCore/TrinityCore/issues/20525 Co-authored-by: Carlos Morales --- .../updates/pending_db_world/rev_1696747623986200300.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696747623986200300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696747623986200300.sql b/data/sql/updates/pending_db_world/rev_1696747623986200300.sql new file mode 100644 index 00000000000000..54c56528d905b0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696747623986200300.sql @@ -0,0 +1,9 @@ +-- Pamela's Doll +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10926; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10926); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1092600); +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`, `event_param6`, `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 +(10926, 0, 0, 0, 20, 0, 100, 0, 5149, 0, 0, 0, 0, 0, 80, 1092600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - On Quest \'Pamela\'s Doll\' Finished - Run Script'), +(1092600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - Actionlist - Say Line 4'), +(1092600, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - Actionlist - Say Line 5'); From 44b0ee8917bd68aa34d2bfd0b55c4376e036ce2e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:58:55 +0300 Subject: [PATCH 184/340] fix(DB/SAI): Terrorclaw correct cleave timer and add fear. (#17415) --- .../updates/pending_db_world/rev_1696416650721787400.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696416650721787400.sql diff --git a/data/sql/updates/pending_db_world/rev_1696416650721787400.sql b/data/sql/updates/pending_db_world/rev_1696416650721787400.sql new file mode 100644 index 00000000000000..7f4904e3c4ef35 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696416650721787400.sql @@ -0,0 +1,8 @@ +-- Terrorclaw +DELETE FROM `creature_template_addon` WHERE (`entry` = 20477); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(20477, 0, 0, 0, 0, 0, 0, '35408'); + +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 20477; +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`, `event_param6`, `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 +(20477, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 5000, 9000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Terrorclaw - In Combat - Cast \'Cleave\''); From e4c867a8f4e1e16de798f5eaff17f9d830a6f682 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 11:59:35 +0000 Subject: [PATCH 185/340] chore(DB): import pending files Referenced commit(s): 5d836cd48c3a8e8dd1633df8ddef993eaaf7464d --- .../rev_1696416650721787400.sql => db_world/2023_10_08_05.sql} | 1 + .../rev_1696747623986200300.sql => db_world/2023_10_08_06.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696416650721787400.sql => db_world/2023_10_08_05.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1696747623986200300.sql => db_world/2023_10_08_06.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1696416650721787400.sql b/data/sql/updates/db_world/2023_10_08_05.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1696416650721787400.sql rename to data/sql/updates/db_world/2023_10_08_05.sql index 7f4904e3c4ef35..67652182310e7c 100644 --- a/data/sql/updates/pending_db_world/rev_1696416650721787400.sql +++ b/data/sql/updates/db_world/2023_10_08_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_04 -> 2023_10_08_05 -- Terrorclaw DELETE FROM `creature_template_addon` WHERE (`entry` = 20477); INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1696747623986200300.sql b/data/sql/updates/db_world/2023_10_08_06.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1696747623986200300.sql rename to data/sql/updates/db_world/2023_10_08_06.sql index 54c56528d905b0..469665ba9a7955 100644 --- a/data/sql/updates/pending_db_world/rev_1696747623986200300.sql +++ b/data/sql/updates/db_world/2023_10_08_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_05 -> 2023_10_08_06 -- Pamela's Doll UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10926; From 4e5077ed8062b77f77899f27356dd5beba27df96 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:31:54 +0300 Subject: [PATCH 186/340] fix(Core/Spells): Script Shaman T8 Elemental 4P Bonus (#17424) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/Spells): Script Shaman T8 Elemental 4P Bonus * 🧙‍♂️✨ --- .../rev_1696512029084537100.sql | 3 ++ src/server/game/Entities/Unit/Unit.cpp | 7 --- src/server/scripts/Spells/spell_shaman.cpp | 44 ++++++++++++++++++- 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696512029084537100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696512029084537100.sql b/data/sql/updates/pending_db_world/rev_1696512029084537100.sql new file mode 100644 index 00000000000000..6ae18b972e4f0b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696512029084537100.sql @@ -0,0 +1,3 @@ +-- 64930 - Electrified | Shaman T8 Elemental 4P Bonus +DELETE FROM `spell_script_names` WHERE `spell_id` = 64928; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (64928, 'spell_sha_t8_electrified'); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9c7d6030bbf9b5..ae48a25e30c56c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -8159,13 +8159,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere CastCustomSpell(this, triggered_spell_id, &basepoints0, nullptr, nullptr, true, castItem, triggeredByAura, originalCaster); break; } - // Shaman T8 Elemental 4P Bonus - case 64928: - { - basepoints0 = CalculatePct(int32(damage), triggerAmount); - triggered_spell_id = 64930; // Electrified - break; - } // Shaman T9 Elemental 4P Bonus case 67228: { diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 6977a082449103..d0045cb4be3342 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -37,6 +37,7 @@ enum ShamanSpells SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379, SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166, + SPELL_SHAMAN_ELECTRIFIED = 64930, SPELL_SHAMAN_EXHAUSTION = 57723, SPELL_SHAMAN_FIRE_NOVA_R1 = 1535, SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349, @@ -59,7 +60,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1 = 51554, SPELL_SHAMAN_STORMSTRIKE = 17364, - SPELL_SHAMAN_LAVA_LASH = 60103 + SPELL_SHAMAN_LAVA_LASH = 60103, + SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD = 45284, }; enum ShamanSpellIcons @@ -1104,6 +1106,45 @@ class spell_sha_flurry_proc : public AuraScript } }; +// 64928 - Item - Shaman T8 Elemental 4P Bonus +class spell_sha_t8_electrified : public AuraScript +{ + PrepareAuraScript(spell_sha_t8_electrified); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SHAMAN_ELECTRIFIED }); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + DamageInfo* damageInfo = eventInfo.GetDamageInfo(); + if (!damageInfo || !damageInfo->GetDamage()) + return; + + // Do not proc from Lightning Overload (patch 3.1~) + if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo()) + { + if (spellInfo->Id == SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD) + { + return; + } + } + + SpellInfo const* electrifiedDot = sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_ELECTRIFIED); + int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()) / electrifiedDot->GetMaxTicks()); + + eventInfo.GetProcTarget()->CastDelayedSpellWithPeriodicAmount(eventInfo.GetActor(), SPELL_SHAMAN_ELECTRIFIED, SPELL_AURA_PERIODIC_DAMAGE, amount); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_sha_t8_electrified::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + void AddSC_shaman_spell_scripts() { RegisterSpellScript(spell_sha_totem_of_wrath); @@ -1135,4 +1176,5 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_sentry_totem); RegisterSpellScript(spell_sha_thunderstorm); RegisterSpellScript(spell_sha_flurry_proc); + RegisterSpellScript(spell_sha_t8_electrified); } From 98f9cfc7569039e842ae8de40838a698ba86b71c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 12:33:05 +0000 Subject: [PATCH 187/340] chore(DB): import pending files Referenced commit(s): 4e5077ed8062b77f77899f27356dd5beba27df96 --- .../rev_1696512029084537100.sql => db_world/2023_10_08_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696512029084537100.sql => db_world/2023_10_08_07.sql} (83%) diff --git a/data/sql/updates/pending_db_world/rev_1696512029084537100.sql b/data/sql/updates/db_world/2023_10_08_07.sql similarity index 83% rename from data/sql/updates/pending_db_world/rev_1696512029084537100.sql rename to data/sql/updates/db_world/2023_10_08_07.sql index 6ae18b972e4f0b..786453f9b381e3 100644 --- a/data/sql/updates/pending_db_world/rev_1696512029084537100.sql +++ b/data/sql/updates/db_world/2023_10_08_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_06 -> 2023_10_08_07 -- 64930 - Electrified | Shaman T8 Elemental 4P Bonus DELETE FROM `spell_script_names` WHERE `spell_id` = 64928; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (64928, 'spell_sha_t8_electrified'); From 771b3d7df941881317d0e5a15298cecf2262ed75 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:38:02 +0300 Subject: [PATCH 188/340] fix(DB/Spell): Allow Armor Shatter/Puncture armor to stack (#17429) --- .../updates/pending_db_world/rev_1696540155725328200.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696540155725328200.sql diff --git a/data/sql/updates/pending_db_world/rev_1696540155725328200.sql b/data/sql/updates/pending_db_world/rev_1696540155725328200.sql new file mode 100644 index 00000000000000..b52c2bca282b8d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696540155725328200.sql @@ -0,0 +1,7 @@ +-- Annihilator - Armor Shatter +DELETE FROM `spell_custom_attr` WHERE `spell_id`=16928; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (16928, 4194304); + +-- Bashguuder & Bashguuder - Puncture Armor +DELETE FROM `spell_custom_attr` WHERE `spell_id`=17315; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (17315, 4194304); From 4290e129306fc6511b0115f780605e96ecc3ae5b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Oct 2023 12:39:12 +0000 Subject: [PATCH 189/340] chore(DB): import pending files Referenced commit(s): 771b3d7df941881317d0e5a15298cecf2262ed75 --- .../rev_1696540155725328200.sql => db_world/2023_10_08_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696540155725328200.sql => db_world/2023_10_08_08.sql} (89%) diff --git a/data/sql/updates/pending_db_world/rev_1696540155725328200.sql b/data/sql/updates/db_world/2023_10_08_08.sql similarity index 89% rename from data/sql/updates/pending_db_world/rev_1696540155725328200.sql rename to data/sql/updates/db_world/2023_10_08_08.sql index b52c2bca282b8d..bc9f01ec57d7df 100644 --- a/data/sql/updates/pending_db_world/rev_1696540155725328200.sql +++ b/data/sql/updates/db_world/2023_10_08_08.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_07 -> 2023_10_08_08 -- Annihilator - Armor Shatter DELETE FROM `spell_custom_attr` WHERE `spell_id`=16928; INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (16928, 4194304); From 2255f492b51bb021bc6488e85aee367b9eb6ab7b Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:49:17 +0200 Subject: [PATCH 190/340] fix(Core/Creature): Update movement in UpdateEntry() (#17291) * fix(Core/Creature): Update movement in UpdateEntry() * Update Creature.cpp * Update Creature.cpp * hover * just replace with updatemovememntflags * Update Creature.cpp * Update Creature.cpp --------- Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com> --- src/server/game/Entities/Creature/Creature.cpp | 14 +++++++------- src/server/game/Entities/Creature/Creature.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index b88560d909053f..fb0ec895460b98 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -578,13 +578,13 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); } - if (GetMovementTemplate().IsRooted()) - { - SetControlled(true, UNIT_STATE_ROOT); - } - SetDetectionDistance(cInfo->detection_range); + // Update movement + if (IsRooted()) + SetControlled(true, UNIT_STATE_ROOT); + UpdateMovementFlags(); + LoadSpellTemplateImmunity(); if (updateAI) @@ -3116,7 +3116,7 @@ bool Creature::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool return true; } - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !IsRooted()) { if (IsLevitating()) SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY); @@ -3265,7 +3265,7 @@ bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAni if (!packetOnly && !Unit::SetHover(enable)) return false; - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !IsRooted()) { if (IsLevitating()) SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 06debd25ec5aa5..ede229ff781dcc 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -82,6 +82,7 @@ class Creature : public Unit, public GridObject, public MovableMapObje [[nodiscard]] bool CanEnterWater() const override; [[nodiscard]] bool CanFly() const override { return GetMovementTemplate().IsFlightAllowed() || IsFlying(); } [[nodiscard]] bool CanHover() const { return GetMovementTemplate().Ground == CreatureGroundMovementType::Hover || IsHovering(); } + [[nodiscard]] bool IsRooted() const { return GetMovementTemplate().IsRooted(); } MovementGeneratorType GetDefaultMovementType() const override { return m_defaultMovementType; } void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; } From f127e583aae3cfa51a77d056c1892a7de07ffb52 Mon Sep 17 00:00:00 2001 From: KJack Date: Sun, 8 Oct 2023 14:38:07 -0400 Subject: [PATCH 191/340] fix(core/scripting) Calculate percent-based damage before `ModifyPeriodicDamageAurasTick` hook (#17387) Moved damage calculation for `SPELL_AURA_PERIODIC_DAMAGE_PERCENT` to before the hook. Co-authored-by: KJack --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ef96f53f430691..394621bf205ebd 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -6298,6 +6298,13 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const // ignore non positive values (can be result apply spellmods to aura damage uint32 damage = std::max(GetAmount(), 0); + // If the damage is percent-max-health based, calculate damage before the Modify hook + if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE_PERCENT) + { + // xinef: ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner + damage = uint32(std::ceil(CalculatePct(target->GetMaxHealth(), damage))); + } + // Script Hook For HandlePeriodicDamageAurasTick -- Allow scripts to change the Damage pre class mitigation calculations sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage, GetSpellInfo()); @@ -6329,8 +6336,6 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const // 5..8 ticks have normal tick damage } } - else // xinef: ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner - damage = uint32(std::ceil(CalculatePct(target->GetMaxHealth(), damage))); // calculate crit chance bool crit = false; From 71312323a1599cc6d95c91946b810d177c59714a Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 8 Oct 2023 22:14:45 +0200 Subject: [PATCH 192/340] fix(Scripts/Karazhan): Nightbane clean-up script (#17446) initial hackfix --- .../Karazhan/boss_nightbane.cpp | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index fcb6986539580e..72ef3e5dd3e3f8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -87,9 +87,19 @@ struct boss_nightbane : public BossAI { BossAI::Reset(); _skeletonscheduler.CancelAll(); - Phase = 1; - MovePhase = 0; - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + if (!_intro) + { + //when boss is reset and we're past the intro + //cannot despawn, but have to move to a location where he normally is + //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); + Position preSpawnPosis = me->GetHomePosition(); + EnterEvadeMode(); + me->NearTeleportTo(preSpawnPosis); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + _intro = true; + Phase = 1; + MovePhase = 0; + } me->SetSpeed(MOVE_RUN, 2.0f); me->SetDisableGravity(_intro); @@ -109,19 +119,6 @@ struct boss_nightbane : public BossAI _flying = false; _movement = false; - if (!_intro) - { - //when boss is reset and we're past the intro - //cannot despawn, but have to move to a location where he normally is - //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); - Position preSpawnPosis = me->GetHomePosition(); - me->NearTeleportTo(preSpawnPosis); - instance->SetData(DATA_NIGHTBANE, NOT_STARTED); - _intro = true; - Phase = 1; - MovePhase = 0; - } - ScheduleHealthCheckEvent({ 75, 50, 25 }, [&]{ TakeOff(); }); @@ -136,11 +133,10 @@ struct boss_nightbane : public BossAI } } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { - _JustEngagedWith(); - if (instance) - instance->SetData(DATA_NIGHTBANE, IN_PROGRESS); + BossAI::JustEngagedWith(who); + _intro = false; HandleTerraceDoors(false); Talk(YELL_AGGRO); @@ -238,7 +234,6 @@ struct boss_nightbane : public BossAI { if (id >= 8) { - _intro = false; //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); //doesn't need home position because we have to "despawn" boss on reset me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); From e644dd949f9f4dd1ab6ce3fdf7d89b1ac5af9a76 Mon Sep 17 00:00:00 2001 From: Hasn Date: Sun, 8 Oct 2023 22:18:44 +0200 Subject: [PATCH 193/340] feat(Core/Scripting): Implement hook `OnAfterCalculateLootGroupAmount()` (#17456) Add hook 'OnAfterCalculateLootGroupAmount' to GlobalScript, similar to existing hook 'OnAfterRefCount'. Allows for dynamic modification of the group loot rate --- src/server/game/Loot/LootMgr.cpp | 4 +++- src/server/game/Scripting/ScriptDefines/GlobalScript.cpp | 8 ++++++++ src/server/game/Scripting/ScriptMgr.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 68ef554d4fb8a6..54016748665f6b 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1738,7 +1738,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, uint16 lootMode, // Rate.Drop.Item.GroupAmount is only in effect for the top loot template level if (isTopLevel) { - group->Process(loot, player, store, lootMode, sWorld->getRate(RATE_DROP_ITEM_GROUP_AMOUNT)); + uint32 groupAmount = sWorld->getRate(RATE_DROP_ITEM_GROUP_AMOUNT); + sScriptMgr->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store); + group->Process(loot, player, store, lootMode, groupAmount); } else { diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp index 74b1ddbe4ca4d0..4206c0618eafce 100644 --- a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp @@ -55,6 +55,14 @@ void ScriptMgr::OnAfterRefCount(Player const* player, Loot& loot, bool canRate, }); } +void ScriptMgr::OnAfterCalculateLootGroupAmount(Player const* player, Loot& loot, uint16 lootMode, uint32& groupAmount, LootStore const& store) +{ + ExecuteScript([&](GlobalScript* script) + { + script->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store); + }); +} + void ScriptMgr::OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store) { ExecuteScript([&](GlobalScript* script) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index b933130ee60f8d..221aaf36434ea9 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1641,6 +1641,7 @@ class GlobalScript : public ScriptObject // loot virtual void OnAfterRefCount(Player const* /*player*/, LootStoreItem* /*LootStoreItem*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, uint32& /*maxcount*/, LootStore const& /*store*/) { } + virtual void OnAfterCalculateLootGroupAmount(Player const* /*player*/, Loot& /*loot*/, uint16 /*lootMode*/, uint32& /*groupAmount*/, LootStore const& /*store*/) { } virtual void OnBeforeDropAddItem(Player const* /*player*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, LootStoreItem* /*LootStoreItem*/, LootStore const& /*store*/) { } virtual bool OnItemRoll(Player const* /*player*/, LootStoreItem const* /*LootStoreItem*/, float& /*chance*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; }; virtual bool OnBeforeLootEqualChanced(Player const* /*player*/, LootStoreItemList /*EqualChanced*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; } @@ -2507,6 +2508,7 @@ class ScriptMgr void OnGlobalMirrorImageDisplayItem(Item const* item, uint32& display); void OnBeforeUpdateArenaPoints(ArenaTeam* at, std::map& ap); void OnAfterRefCount(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, uint32& maxcount, LootStore const& store); + void OnAfterCalculateLootGroupAmount(Player const* player, Loot& loot, uint16 lootMode, uint32& groupAmount, LootStore const& store); void OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store); bool OnItemRoll(Player const* player, LootStoreItem const* LootStoreItem, float& chance, Loot& loot, LootStore const& store); bool OnBeforeLootEqualChanced(Player const* player, LootStoreItemList EqualChanced, Loot& loot, LootStore const& store); From 7f36c5f059c616444c91a4b0d4b0503b78c6c981 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:19:48 -0300 Subject: [PATCH 194/340] =?UTF-8?q?fix(Scripts/Karazhan):=20Replace=20Big?= =?UTF-8?q?=20Bad=20Wolf=20chase=20mechanic=20with=20prope=E2=80=A6=20(#17?= =?UTF-8?q?458)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Karazhan): Replace Big Bad Wolf chase mechanic with proper taunt spell --- .../EasternKingdoms/Karazhan/bosses_opera.cpp | 52 +++---------------- 1 file changed, 6 insertions(+), 46 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 94e0311267c1e5..59a348e6159c90 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -688,6 +688,7 @@ enum RedRidingHood SPELL_LITTLE_RED_RIDING_HOOD = 30768, SPELL_TERRIFYING_HOWL = 30752, SPELL_WIDE_SWIPE = 30761, + SPELL_PICNIC_BASKET_SMELL = 30755, CREATURE_BIG_BAD_WOLF = 17521, @@ -751,16 +752,6 @@ struct boss_bigbadwolf : public ScriptedAI InstanceScript* instance; - ObjectGuid HoodGUID; - - void Reset() override - { - HoodGUID.Clear(); - _tempThreat = 0; - - _isChasing = false; - } - void JustEngagedWith(Unit* /*who*/) override { instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT)); @@ -769,40 +760,14 @@ struct boss_bigbadwolf : public ScriptedAI _scheduler.Schedule(30s, [this](TaskContext context) { - if (!_isChasing) + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true)) { - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true)) - { - Talk(SAY_WOLF_HOOD); - DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true); - _tempThreat = DoGetThreat(target); - if (_tempThreat) - { - DoModifyThreatByPercent(target, -100); - } - HoodGUID = target->GetGUID(); - me->AddThreat(target, 1000000.0f); - _isChasing = true; - context.Repeat(20s); - } + Talk(SAY_WOLF_HOOD); + DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true); + target->CastSpell(me, SPELL_PICNIC_BASKET_SMELL, true); } - else - { - _isChasing = false; - - if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID)) - { - HoodGUID.Clear(); - if (DoGetThreat(target)) - { - DoModifyThreatByPercent(target, -100); - } - me->AddThreat(target, _tempThreat); - _tempThreat = 0; - } - context.Repeat(40s); - } + context.Repeat(40s); }).Schedule(25s, 35s, [this](TaskContext context) { DoCastAOE(SPELL_TERRIFYING_HOWL); @@ -845,15 +810,10 @@ struct boss_bigbadwolf : public ScriptedAI DoMeleeAttackIfReady(); - if (_isChasing) - return; - _scheduler.Update(diff); } private: TaskScheduler _scheduler; - bool _isChasing; - float _tempThreat; }; /**********************************************/ From aa0c94c83fef339b90db3e99e1356c96f4790198 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:49:02 +0300 Subject: [PATCH 195/340] fix(DB/Conditions): 'Place Draenei Banner' conditions (#17474) --- .../sql/updates/pending_db_world/rev_1696918490346114000.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696918490346114000.sql diff --git a/data/sql/updates/pending_db_world/rev_1696918490346114000.sql b/data/sql/updates/pending_db_world/rev_1696918490346114000.sql new file mode 100644 index 00000000000000..adaa5873e34608 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696918490346114000.sql @@ -0,0 +1,5 @@ +-- Place Draenei Banner +UPDATE `conditions` SET `Comment` = '\'Place Draenei Banner\' - Target only Lord Xiz' WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 17701); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 29) AND (`ConditionValue1` = 17701) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 30988, 0, 0, 29, 0, 17701, 5, 1, 0, 0, 0, '', 'Allow casting \'Place Draenei Banner\' only if Lord Xiz is within 5 yards and dead.'); From f9a71f83cce4582b5854109e1df1ff6943776d3f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:49:48 +0300 Subject: [PATCH 196/340] fix(DB/SAI): Port Eridan Bluewind RP from Trinity (#17468) https: //github.com/TrinityCore/TrinityCore/issues/18559 Co-authored-by: Rushor --- .../pending_db_world/rev_1696864048593539500.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696864048593539500.sql diff --git a/data/sql/updates/pending_db_world/rev_1696864048593539500.sql b/data/sql/updates/pending_db_world/rev_1696864048593539500.sql new file mode 100644 index 00000000000000..9ff35df1453147 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696864048593539500.sql @@ -0,0 +1,13 @@ +-- Eridan Bluewind +DELETE FROM `smart_scripts` WHERE `entryorguid` = 9116 AND `source_type` = 0 AND `id` = 2; +DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` = 911600; + +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`, `event_param6`, `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 +(9116, 0, 2, 0, 19, 0, 100, 0, 4442, 0, 0, 0, 0, 0, 80, 911600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Quest \'Purified!\' Taken - Run Script'), +(911600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Npc Flags Questgiver'), +(911600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 0'), +(911600, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.59669, 'Eridan Bluewind - On Script - Set Orientation 2,59669'), +(911600, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Cast \'Nature Channeling\''), +(911600, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.72271, 'Eridan Bluewind - On Script - Set Orientation 2,72271'), +(911600, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 1'), +(911600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Add Npc Flags Questgiver'); From ae2f72611f17f343167c1c7725fbcea7a5e2e40e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 08:50:55 +0000 Subject: [PATCH 197/340] chore(DB): import pending files Referenced commit(s): f9a71f83cce4582b5854109e1df1ff6943776d3f --- .../rev_1696864048593539500.sql => db_world/2023_10_10_00.sql} | 1 + .../rev_1696918490346114000.sql => db_world/2023_10_10_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696864048593539500.sql => db_world/2023_10_10_00.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1696918490346114000.sql => db_world/2023_10_10_01.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1696864048593539500.sql b/data/sql/updates/db_world/2023_10_10_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1696864048593539500.sql rename to data/sql/updates/db_world/2023_10_10_00.sql index 9ff35df1453147..2050f08cb29d42 100644 --- a/data/sql/updates/pending_db_world/rev_1696864048593539500.sql +++ b/data/sql/updates/db_world/2023_10_10_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_08_08 -> 2023_10_10_00 -- Eridan Bluewind DELETE FROM `smart_scripts` WHERE `entryorguid` = 9116 AND `source_type` = 0 AND `id` = 2; DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` = 911600; diff --git a/data/sql/updates/pending_db_world/rev_1696918490346114000.sql b/data/sql/updates/db_world/2023_10_10_01.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1696918490346114000.sql rename to data/sql/updates/db_world/2023_10_10_01.sql index adaa5873e34608..0fb82308a96d31 100644 --- a/data/sql/updates/pending_db_world/rev_1696918490346114000.sql +++ b/data/sql/updates/db_world/2023_10_10_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_00 -> 2023_10_10_01 -- Place Draenei Banner UPDATE `conditions` SET `Comment` = '\'Place Draenei Banner\' - Target only Lord Xiz' WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 17701); DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 29) AND (`ConditionValue1` = 17701) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 1); From c2f03441c87329b6f8467cd2a3c0d9ac3328034f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:14:48 +0300 Subject: [PATCH 198/340] fix(DB/Gameobject): Ores/Herbs should be visible in visible in all phases (#17477) fix(DB/Gameobject): Ores and Herbs should be visible in visible in all phases Co-authored-by: Dr-J <1444120+dr-j@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1696931648802866700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696931648802866700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696931648802866700.sql b/data/sql/updates/pending_db_world/rev_1696931648802866700.sql new file mode 100644 index 00000000000000..41914acb3816ea --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696931648802866700.sql @@ -0,0 +1,2 @@ +-- Ores and Herbs should be visible in visible in all phases +UPDATE `gameobject` SET `phaseMask`='255' WHERE `id` IN(1617,1618,1619,3724,3725,3726,1620,1621,3727,3729,1622,1623,1624,2045,3730,2041,2046,1628,2044,2041,2043,176636,176642,142140,142141,142142,142143,142144,180165,183046,180164,176641,176640,176639,176638,176637,142145,176583,176584,176586,176587,176588,176589,180166,180167, 180168,183043,183044,183045,181270,181271,181275,181276,181277,181278,183385,181279,181282,181281,189973,190169,190173,190175,190174,190170,190172,191019,190171,190176,1731,181248,103713,2055,3763,1732,3764,103711,181249,2054,1733,1735,105569,73939,1734,2040,123310,150079,150080,176645,181109,2047,123309,150081,150082,181108,176643,123848,175404,181555,181556,181557,181569,181570,189978,189979,189980,189981,191133) AND `map` IN(0,1,530,571); From 43be5db44c53de4f29e3f03e797edc4e77650cd0 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:15:48 +0300 Subject: [PATCH 199/340] =?UTF-8?q?fix(Core/ChatHandler):=20SPELL=5FAURA?= =?UTF-8?q?=5FMOD=5FLANGUAGE=20should=20affect=20only=20Say=E2=80=A6=20(#1?= =?UTF-8?q?7465)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/ChatHandler): SPELL_AURA_MOD_LANGUAGE should affect only Say and Yell --- src/server/game/Handlers/ChatHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index cc91c55a945501..874d34aa6d63f5 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -225,9 +225,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) break; } } - // but overwrite it by SPELL_AURA_MOD_LANGUAGE auras (only single case used) + // Overwritten by SPELL_AURA_MOD_LANGUAGE auras (Affects only Say and Yell) Unit::AuraEffectList const& ModLangAuras = sender->GetAuraEffectsByType(SPELL_AURA_MOD_LANGUAGE); - if (!ModLangAuras.empty()) + if (!ModLangAuras.empty() && (type == CHAT_MSG_SAY || type == CHAT_MSG_YELL)) lang = ModLangAuras.front()->GetMiscValue(); } From c9f4716ec5b49740969289b0bc45256faec9c33a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:16:10 +0000 Subject: [PATCH 200/340] chore(DB): import pending files Referenced commit(s): c2f03441c87329b6f8467cd2a3c0d9ac3328034f --- .../rev_1696931648802866700.sql => db_world/2023_10_10_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696931648802866700.sql => db_world/2023_10_10_02.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1696931648802866700.sql b/data/sql/updates/db_world/2023_10_10_02.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1696931648802866700.sql rename to data/sql/updates/db_world/2023_10_10_02.sql index 41914acb3816ea..8316f204de5972 100644 --- a/data/sql/updates/pending_db_world/rev_1696931648802866700.sql +++ b/data/sql/updates/db_world/2023_10_10_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_10_01 -> 2023_10_10_02 -- Ores and Herbs should be visible in visible in all phases UPDATE `gameobject` SET `phaseMask`='255' WHERE `id` IN(1617,1618,1619,3724,3725,3726,1620,1621,3727,3729,1622,1623,1624,2045,3730,2041,2046,1628,2044,2041,2043,176636,176642,142140,142141,142142,142143,142144,180165,183046,180164,176641,176640,176639,176638,176637,142145,176583,176584,176586,176587,176588,176589,180166,180167, 180168,183043,183044,183045,181270,181271,181275,181276,181277,181278,183385,181279,181282,181281,189973,190169,190173,190175,190174,190170,190172,191019,190171,190176,1731,181248,103713,2055,3763,1732,3764,103711,181249,2054,1733,1735,105569,73939,1734,2040,123310,150079,150080,176645,181109,2047,123309,150081,150082,181108,176643,123848,175404,181555,181556,181557,181569,181570,189978,189979,189980,189981,191133) AND `map` IN(0,1,530,571); From 088b85d220f821d4546887ece74cfd92d470e545 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:16:21 +0300 Subject: [PATCH 201/340] fix(DB/SAI): Port J.D. Collie RP from Trinity (#17464) https: //github.com/TrinityCore/TrinityCore/issues/21992 Co-authored-by: Carlos Morales --- .../rev_1696853998800058800.sql | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696853998800058800.sql diff --git a/data/sql/updates/pending_db_world/rev_1696853998800058800.sql b/data/sql/updates/pending_db_world/rev_1696853998800058800.sql new file mode 100644 index 00000000000000..f024c0253f6f9f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696853998800058800.sql @@ -0,0 +1,28 @@ +-- J.D. Collie +UPDATE `smart_scripts` SET `comment` = 'J.D. Collie - On Quest \'Making Sense of It\' Taken - Run Script' WHERE `entryorguid` = 9117 AND `source_type` = 0 AND `id` = 0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=9117 AND `source_type`=0 AND `id` IN (2,3,4); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (911701,911702,911703) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(9117, 0, 2, 0, 20, 0, 100, 0, 3941, 0, 0, 0, 0, 0, 80, 911701, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Quest \'A Gnome\'s Assistance\' Finished - Run Script'), +(9117, 0, 3, 0, 40, 0, 100, 0, 1, 911700, 0, 0, 0, 0, 80, 911702, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Waypoint 1 Reached - Run Script'), +(9117, 0, 4, 0, 40, 0, 100, 0, 2, 911700, 0, 0, 0, 0, 80, 911703, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Waypoint 2 Reached - Run Script'), +(911701, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Remove Npc Flag Questgiver & Gossip'), +(911701, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 8'), +(911701, 9, 2, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 53, 1, 911700, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Start Waypoint'), +(911702, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 54, 16000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Pause Waypoint'), +(911702, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 5.86, 'J.D. Collie - Actionlist - Set Orientation'), +(911702, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 9'), +(911702, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 4'), +(911702, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 32990, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Cast \'Enchanting Cast Visual\''), +(911702, 9, 5, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 5'), +(911702, 9, 6, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 6'), +(911702, 9, 7, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 7'), +(911703, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0.872665, 'J.D. Collie - On Script - Set Orientation'), +(911703, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Add Npc Flag Questgiver & Gossip'), +(911703, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 3'); + +DELETE FROM `waypoints` WHERE `entry`=911700; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(911700, 1, -6027.85, -1020.16, -217.056, NULL, 0, ''), +(911700, 2, -6033.25, -1017.56, -217.055, NULL, 0, ''); From e5aed49b75a027beb53f1feb366892005fa32ef9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:17:00 +0000 Subject: [PATCH 202/340] chore(DB): import pending files Referenced commit(s): 43be5db44c53de4f29e3f03e797edc4e77650cd0 --- .../rev_1696853998800058800.sql => db_world/2023_10_10_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696853998800058800.sql => db_world/2023_10_10_03.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1696853998800058800.sql b/data/sql/updates/db_world/2023_10_10_03.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1696853998800058800.sql rename to data/sql/updates/db_world/2023_10_10_03.sql index f024c0253f6f9f..d1e031ecaf4d80 100644 --- a/data/sql/updates/pending_db_world/rev_1696853998800058800.sql +++ b/data/sql/updates/db_world/2023_10_10_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_02 -> 2023_10_10_03 -- J.D. Collie UPDATE `smart_scripts` SET `comment` = 'J.D. Collie - On Quest \'Making Sense of It\' Taken - Run Script' WHERE `entryorguid` = 9117 AND `source_type` = 0 AND `id` = 0; From 2d63090c8339375ca120c26e179f0808564e2ff5 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:22:27 +0300 Subject: [PATCH 203/340] fix(DB/Loot): Shellfish Trap giving only 1 shellfish (#17473) --- data/sql/updates/pending_db_world/rev_1696883818543898900.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696883818543898900.sql diff --git a/data/sql/updates/pending_db_world/rev_1696883818543898900.sql b/data/sql/updates/pending_db_world/rev_1696883818543898900.sql new file mode 100644 index 00000000000000..5af06ca3f3bee6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696883818543898900.sql @@ -0,0 +1,2 @@ +-- Shellfish +UPDATE `gameobject_loot_template` SET `MaxCount` = 2 WHERE `Entry` = 13944 and `Item` = 13545; From e08de5f0731bbb39019c71b83f5eccbf296fb9cc Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:23:27 +0300 Subject: [PATCH 204/340] fix(DB/Creature): Hex Lord Malacrass missing weapon (#17475) fix(DB/Creature): Hex Lord Malacrass wrong equipment https: //github.com/TrinityCore/TrinityCore/commit/5856f520bbd8dded42f7742277839587b0645dde Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1696922353340609300.sql | 2 ++ src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696922353340609300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696922353340609300.sql b/data/sql/updates/pending_db_world/rev_1696922353340609300.sql new file mode 100644 index 00000000000000..b545cf50b325a2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696922353340609300.sql @@ -0,0 +1,2 @@ +-- Hex Lord Malacrass +UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE `entry` = 24239; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 12ebadca618a49..af90c050c1504a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -289,9 +289,6 @@ class boss_hexlord_malacrass : public CreatureScript ResetTimer = 5000; SpawnAdds(); - - me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 46916); - me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); } void JustEngagedWith(Unit* /*who*/) override From 113a258c02faacaf35276799acd19c21986a6db5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:24:02 +0000 Subject: [PATCH 205/340] chore(DB): import pending files Referenced commit(s): 2d63090c8339375ca120c26e179f0808564e2ff5 --- .../rev_1696883818543898900.sql => db_world/2023_10_10_04.sql} | 1 + .../rev_1696922353340609300.sql => db_world/2023_10_10_05.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696883818543898900.sql => db_world/2023_10_10_04.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1696922353340609300.sql => db_world/2023_10_10_05.sql} (68%) diff --git a/data/sql/updates/pending_db_world/rev_1696883818543898900.sql b/data/sql/updates/db_world/2023_10_10_04.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1696883818543898900.sql rename to data/sql/updates/db_world/2023_10_10_04.sql index 5af06ca3f3bee6..395a7b001b46b2 100644 --- a/data/sql/updates/pending_db_world/rev_1696883818543898900.sql +++ b/data/sql/updates/db_world/2023_10_10_04.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_10_03 -> 2023_10_10_04 -- Shellfish UPDATE `gameobject_loot_template` SET `MaxCount` = 2 WHERE `Entry` = 13944 and `Item` = 13545; diff --git a/data/sql/updates/pending_db_world/rev_1696922353340609300.sql b/data/sql/updates/db_world/2023_10_10_05.sql similarity index 68% rename from data/sql/updates/pending_db_world/rev_1696922353340609300.sql rename to data/sql/updates/db_world/2023_10_10_05.sql index b545cf50b325a2..54698aa70d0b44 100644 --- a/data/sql/updates/pending_db_world/rev_1696922353340609300.sql +++ b/data/sql/updates/db_world/2023_10_10_05.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_10_04 -> 2023_10_10_05 -- Hex Lord Malacrass UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE `entry` = 24239; From 82ae20af1d66a79d17a4a35b0c4fe25c247df3e2 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:35:08 +0300 Subject: [PATCH 206/340] fix(DB/Conditions): Pilot Xiggs Fuselighter spawning multiple times (#17476) --- .../rev_1696925471216269600.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696925471216269600.sql diff --git a/data/sql/updates/pending_db_world/rev_1696925471216269600.sql b/data/sql/updates/pending_db_world/rev_1696925471216269600.sql new file mode 100644 index 00000000000000..4bd577d2333289 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696925471216269600.sql @@ -0,0 +1,17 @@ +-- Change from 150 minutes to 5 +UPDATE `event_scripts` SET `datalong2` = 300000 WHERE `id` = 3084 AND `command` = 10; + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 12283); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 12283, 0, 0, 29, 0, 8392, 20, 0, 1, 0, 0, '', 'Allow using Standard Issue Flare Gun only if no Pilot Xiggs Fuselighter is within 20 yards.'); + +-- Pilot Xiggs Fuselighter +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 8392; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 8392) 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`, `event_param6`, `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 +(8392, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Pilot Xiggs Fuselighter - On Just Summoned - Say Line 0'); + +DELETE FROM `creature_text` WHERE `CreatureID`=8392; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8392, 0, 1, 'Been waitin\' for ya, $n. Glad to see you\'ve come through. Do you have the shipment?', 12, 7, 100, 3, 0, 0, 4406, 0, 'Pilot Xiggs Fuselighter - Greet on summon'); From 96d0675624f3cb23e40215eebaefd60a70dd6756 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:36:04 +0300 Subject: [PATCH 207/340] fix(DB/SAI): Cuergo's Gold improvements (#17462) * fix(DB/SAI): Cuergo's Gold improvements * Actionlist * zzz --- .../rev_1696799173938352600.sql | 70 +++++++++++++++++++ src/server/scripts/World/go_scripts.cpp | 62 ---------------- 2 files changed, 70 insertions(+), 62 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696799173938352600.sql diff --git a/data/sql/updates/pending_db_world/rev_1696799173938352600.sql b/data/sql/updates/pending_db_world/rev_1696799173938352600.sql new file mode 100644 index 00000000000000..5ac89028096b0c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696799173938352600.sql @@ -0,0 +1,70 @@ +-- Quest: Cuergo's Gold +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE `entry` = 142189; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 142189); +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`, `event_param6`, `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 +(142189, 1, 0, 0, 70, 0, 100, 0, 2, 0, 0, 0, 0, 0, 80, 14218900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Inconspicuous Landmark - On Gameobject State Changed - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 14218900); +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`, `event_param6`, `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 +(14218900, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 50, 142194, 300, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, -3, 0, 0, 'Inconspicuous Landmark - Actionlist - Summon Gameobject \'Pirate\'s Treasure!\''), +(14218900, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 12, 7898, 3, 5000, 0, 0, 0, 1, 0, 0, 0, 0, -2, -3, 0, 0, 'Inconspicuous Landmark - Actionlist - Summon Creature \'Pirate treasure trigger mob\''); + +DELETE FROM `gameobject` WHERE `id` = 142189; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(17231, 142189, 1, 0, 0, 1, 1, -10249.2, -3981.8, 1.66783, -0.750491, 0, 0, -0.366501, 0.930418, 600, 100, 1, '', NULL, NULL), +(17232, 142189, 1, 0, 0, 1, 1, -10119.7, -4052.46, 5.33005, -0.366519, 0, 0, -0.182235, 0.983255, 600, 100, 1, '', NULL, NULL), +(17233, 142189, 1, 0, 0, 1, 1, -10050.8, -3717.16, 5.44262, 2.65289, 0, 0, 0.970295, 0.241925, 600, 100, 1, '', NULL, NULL), +(17234, 142189, 1, 0, 0, 1, 1, -10154.2, -3948.64, 7.74473, 2.65289, 0, 0, 0, 0, 600, 100, 1, '', NULL, NULL), +(17235, 142189, 1, 0, 0, 1, 1, -10285.8, -3881.83, 1.07085, -2.26893, 0, 0, -0.906307, 0.422619, 600, 100, 1, '', NULL, NULL), +(17236, 142189, 1, 0, 0, 1, 1, -10217, -3817.65, 1.35298, 2.65289, 0, 0, 0.970295, 0.241925, 600, 100, 1, '', NULL, NULL); + +DELETE FROM `pool_template` WHERE `entry` IN (355,112); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES (112, 1, 'Tanaris - Inconspicuous Landmark Pool'); + +DELETE FROM `pool_gameobject` WHERE `pool_entry` IN (355,112); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(17231, 112, 0, 'Inconspicuous Landmark'), +(17232, 112, 0, 'Inconspicuous Landmark'), +(17233, 112, 0, 'Inconspicuous Landmark'), +(17234, 112, 0, 'Inconspicuous Landmark'), +(17235, 112, 0, 'Inconspicuous Landmark'), +(17236, 112, 0, 'Inconspicuous Landmark'); + +-- Pirate treasure trigger mob +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` = 7898; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 7898) AND (`source_type` = 0); +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 789800) AND (`source_type` = 9); + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(7898, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7899, 1, 300000, 0, 0, 0, 202, 25, 2, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Pirate\''), +(7898, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7902, 1, 300000, 0, 0, 0, 202, 25, 2, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Buccaneer\''), +(7898, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7901, 1, 300000, 0, 0, 0, 202, 25, 1, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Swashbuckler\''); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (7899,7901,7902); +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (7899,7901,7902); +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`, `event_param6`, `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 +-- Treasure Hunting Pirate +(7899, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7899, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - On Reached Point 0 - Say Line 0'), +(7899, 0, 2, 0, 0, 0, 100, 0, 3000, 7000, 8200, 18100, 0, 0, 11, 11976, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - In Combat - Cast \'Strike\''), +-- Treasure Hunting Swashbuckler +(7901, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7901, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - On Reached Point 0 - Say Line 0'), +(7901, 0, 2, 0, 0, 0, 100, 0, 10200, 23100, 21900, 28400, 0, 0, 11, 6713, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - In Combat - Cast \'Disarm\''), +-- Treasure Hunting Buccaneer +(7902, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7902, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - On Reached Point 0 - Say Line 0'), +(7902, 0, 2, 0, 0, 0, 100, 0, 3000, 7000, 8200, 18100, 0, 0, 11, 11976, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - In Combat - Cast \'Strike\''); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (7899,7901,7902); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(7899,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7899,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7899,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7901,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7901,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7901,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7902,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'), +(7902,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'), +(7902,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'); diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 65f7cbaf8ec44f..7c173713d4c6cb 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -15,34 +15,8 @@ * with this program. If not, see . */ -/* ContentData -go_cat_figurine (the "trap" version of GO, two different exist) -go_barov_journal -go_ethereum_prison -go_ethereum_stasis -go_sacred_fire_of_life -go_shrine_of_the_birds -go_southfury_moonstone -go_resonite_cask -go_tablet_of_the_seven -go_tele_to_dalaran_crystal -go_tele_to_violet_stand -go_scourge_cage -go_jotunheim_cage -go_table_theka -go_soulwell -go_bashir_crystalforge -go_soulwell -go_dragonflayer_cage -go_tadpole_cage -go_amberpine_outhouse -go_hive_pod -go_veil_skith_cage -EndContentData */ - #include "CellImpl.h" #include "GameObjectAI.h" -#include "GameTime.h" #include "GridNotifiersImpl.h" #include "Player.h" #include "ScriptMgr.h" @@ -1385,41 +1359,6 @@ class go_table_theka : public GameObjectScript } }; -/*###### -## go_inconspicuous_landmark -######*/ - -enum InconspicuousLandmark -{ - SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB = 11462, - ITEM_CUERGOS_KEY = 9275, -}; - -class go_inconspicuous_landmark : public GameObjectScript -{ -public: - go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark") - { - _lastUsedTime = GameTime::GetGameTime().count(); - } - - bool OnGossipHello(Player* player, GameObject* /*go*/) override - { - if (player->HasItemCount(ITEM_CUERGOS_KEY)) - return true; - - if (_lastUsedTime > GameTime::GetGameTime().count()) - return true; - - _lastUsedTime = GameTime::GetGameTime().count() + MINUTE; - player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true); - return true; - } - -private: - uint32 _lastUsedTime; -}; - /*###### ## go_soulwell ######*/ @@ -1989,7 +1928,6 @@ void AddSC_go_scripts() new go_arcane_prison(); new go_jotunheim_cage(); new go_table_theka(); - new go_inconspicuous_landmark(); new go_soulwell(); new go_dragonflayer_cage(); new go_amberpine_outhouse(); From ef94c1b085061e24c510802ac784f9220eb94a4a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:36:29 +0000 Subject: [PATCH 208/340] chore(DB): import pending files Referenced commit(s): 82ae20af1d66a79d17a4a35b0c4fe25c247df3e2 --- .../rev_1696799173938352600.sql => db_world/2023_10_10_06.sql} | 1 + .../rev_1696925471216269600.sql => db_world/2023_10_10_07.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696799173938352600.sql => db_world/2023_10_10_06.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1696925471216269600.sql => db_world/2023_10_10_07.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1696799173938352600.sql b/data/sql/updates/db_world/2023_10_10_06.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696799173938352600.sql rename to data/sql/updates/db_world/2023_10_10_06.sql index 5ac89028096b0c..0664c1f96deaec 100644 --- a/data/sql/updates/pending_db_world/rev_1696799173938352600.sql +++ b/data/sql/updates/db_world/2023_10_10_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_05 -> 2023_10_10_06 -- Quest: Cuergo's Gold UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE `entry` = 142189; diff --git a/data/sql/updates/pending_db_world/rev_1696925471216269600.sql b/data/sql/updates/db_world/2023_10_10_07.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1696925471216269600.sql rename to data/sql/updates/db_world/2023_10_10_07.sql index 4bd577d2333289..6e6bb450fef13f 100644 --- a/data/sql/updates/pending_db_world/rev_1696925471216269600.sql +++ b/data/sql/updates/db_world/2023_10_10_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_06 -> 2023_10_10_07 -- Change from 150 minutes to 5 UPDATE `event_scripts` SET `datalong2` = 300000 WHERE `id` = 3084 AND `command` = 10; From 7e1bfa2884677ddf337ea04584203a6671d25080 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:37:24 +0300 Subject: [PATCH 209/340] fix(DB/Gameobject): Remove wagon duplicate. (#17422) fix(DB/Event): Remove wagon duplicate. --- data/sql/updates/pending_db_world/rev_1696507200849767300.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696507200849767300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696507200849767300.sql b/data/sql/updates/pending_db_world/rev_1696507200849767300.sql new file mode 100644 index 00000000000000..af553459c20690 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696507200849767300.sql @@ -0,0 +1,3 @@ +-- Plague Wagon Empty +DELETE FROM `gameobject` WHERE `guid`=242285; +DELETE FROM `game_event_gameobject` WHERE `guid`=242285; From b8383d16638d9dce036c91916649176dc7b9e635 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:37:28 +0000 Subject: [PATCH 210/340] chore(DB): import pending files Referenced commit(s): 96d0675624f3cb23e40215eebaefd60a70dd6756 --- .../rev_1696507200849767300.sql => db_world/2023_10_10_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696507200849767300.sql => db_world/2023_10_10_08.sql} (73%) diff --git a/data/sql/updates/pending_db_world/rev_1696507200849767300.sql b/data/sql/updates/db_world/2023_10_10_08.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1696507200849767300.sql rename to data/sql/updates/db_world/2023_10_10_08.sql index af553459c20690..0c1ce794ebcc36 100644 --- a/data/sql/updates/pending_db_world/rev_1696507200849767300.sql +++ b/data/sql/updates/db_world/2023_10_10_08.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_07 -> 2023_10_10_08 -- Plague Wagon Empty DELETE FROM `gameobject` WHERE `guid`=242285; DELETE FROM `game_event_gameobject` WHERE `guid`=242285; From 3a1b110642a6e8c3d446c7f3c19997753a44d17c Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:42:24 +0300 Subject: [PATCH 211/340] fix(DB/Gameobject): Pool triple Truesilver Vein in Desolace (#17444) --- .../rev_1696691443957086100.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696691443957086100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696691443957086100.sql b/data/sql/updates/pending_db_world/rev_1696691443957086100.sql new file mode 100644 index 00000000000000..392d30ddad810f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696691443957086100.sql @@ -0,0 +1,25 @@ +-- +DELETE FROM `gameobject` WHERE `guid` IN (9266,9268,9270,9272,9273,9274); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(9266, 2040, 1, 405, 598, 1, 1, -1774, 2968.79, 37.432, 4.232, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9268, 2040, 1, 405, 598, 1, 1, -1778, 2997.54, 35.715, 4.76, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9270, 2040, 1, 405, 598, 1, 1, -1765, 2986.9, 40.316, 5.803, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9272, 1735, 1, 405, 598, 1, 1, -1774, 2968.79, 37.432, 4.232, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9273, 1735, 1, 405, 598, 1, 1, -1778, 2997.54, 35.715, 4.76, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9274, 1735, 1, 405, 598, 1, 1, -1765, 2986.9, 40.316, 5.803, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL); + +DELETE FROM `pool_template` WHERE `entry` = 11699; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(11699, 1, 'Desolace Mithril Deposit Pool'); + +DELETE FROM `pool_gameobject` WHERE `guid` IN (9256,9257,9258,9266,9268,9270,9272,9273,9274); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(9256, 11699, 3.3, 'Spawn Point 1 - Truesilver'), +(9266, 11699, 0, 'Spawn Point 1 - Mithril'), +(9272, 11699, 8.3, 'Spawn Point 1 - Iron'), +(9257, 11699, 3.3, 'Spawn Point 2 - Truesilver'), +(9268, 11699, 0, 'Spawn Point 2 - Mithril'), +(9273, 11699, 8.3, 'Spawn Point 2 - Iron'), +(9258, 11699, 3.3, 'Spawn Point 3 - Truesilver'), +(9270, 11699, 0, 'Spawn Point 3 - Mithril'), +(9274, 11699, 8.3, 'Spawn Point 3 - Iron'); From 90071f8fcd90962e11516c2607cfd5dd1e52bd24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 13:43:49 +0000 Subject: [PATCH 212/340] chore(DB): import pending files Referenced commit(s): 3a1b110642a6e8c3d446c7f3c19997753a44d17c --- .../rev_1696691443957086100.sql => db_world/2023_10_10_09.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696691443957086100.sql => db_world/2023_10_10_09.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1696691443957086100.sql b/data/sql/updates/db_world/2023_10_10_09.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1696691443957086100.sql rename to data/sql/updates/db_world/2023_10_10_09.sql index 392d30ddad810f..eb015e3056b142 100644 --- a/data/sql/updates/pending_db_world/rev_1696691443957086100.sql +++ b/data/sql/updates/db_world/2023_10_10_09.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_08 -> 2023_10_10_09 -- DELETE FROM `gameobject` WHERE `guid` IN (9266,9268,9270,9272,9273,9274); INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES From e8b81430af1805b5a6767bd2af987aefcfe516db Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 10 Oct 2023 19:12:11 +0300 Subject: [PATCH 213/340] fix(Core/Spells): Script Void Star Talisman resistances. (#17427) * fix(Core/Spells): Script Void Star Talisman resistances. * add check for armor * change comment loc * . * fix(Core/Spells): Script Lord Valthalak's Amulet * Revert "fix(Core/Spells): Script Lord Valthalak's Amulet" This reverts commit 5a6a0a8e1fd596e0ffae906cfdac2f68fb1bc78d. * Use spellInfo instead of hardcode --- src/server/scripts/Spells/spell_warlock.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index e8efd5d510f806..a41ae5ba5a425c 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -63,7 +63,8 @@ enum WarlockSpells SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117, SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_R1 = 18213, SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_PROC = 18371, - SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083 + SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083, + SPELL_WARLOCK_PET_VOID_STAR_TALISMAN = 37386, // Void Star Talisman }; enum WarlockSpellIcons @@ -284,6 +285,11 @@ class spell_warl_generic_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN) && schoolMask != SPELL_SCHOOL_MASK_NORMAL) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN); + amount += spellInfo->Effects[EFFECT_0].CalcValue(); // 130 + } } } @@ -390,6 +396,11 @@ class spell_warl_infernal_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN) && schoolMask != SPELL_SCHOOL_MASK_NORMAL) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN); + amount += spellInfo->Effects[EFFECT_0].CalcValue(); // 130 + } } } From 2cd4af9446ff6df720fe6577b138614be569d980 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:23:45 +0300 Subject: [PATCH 214/340] fix(Core/Spells): Allow casting ground mounts in water (#17481) https: //github.com/TrinityCore/TrinityCore/pull/17488 Co-authored-by: SnapperRy <19622383+SnapperRy@users.noreply.github.com> --- src/server/game/Spells/Spell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4bf4341a5e14b3..ba67b873cd31c4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6637,8 +6637,8 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_AURA_MOUNTED: { - // Xinef: disallow casting in water for mounts not increasing water movement Speed - if (m_caster->IsInWater() && !m_spellInfo->HasAura(SPELL_AURA_MOD_INCREASE_SWIM_SPEED)) + // Disallow casting flying mounts in water + if (m_caster->IsInWater() && m_spellInfo->HasAura(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) return SPELL_FAILED_ONLY_ABOVEWATER; // Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells From a9456f9123157f474e927bdfdfeb76cf9e870017 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:24:49 +0300 Subject: [PATCH 215/340] fix(DB/Conditions): Mrs. Dalson's Diary gossip & Outhouse Key (#17469) * fix(DB/Conditions): Mrs. Dalson's Diary gossip & Outhouse Key * ocd flag --- .../updates/pending_db_world/rev_1696867624332424400.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696867624332424400.sql diff --git a/data/sql/updates/pending_db_world/rev_1696867624332424400.sql b/data/sql/updates/pending_db_world/rev_1696867624332424400.sql new file mode 100644 index 00000000000000..c0252e11b943e6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696867624332424400.sql @@ -0,0 +1,8 @@ +-- Mrs. Dalson's Diary +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 1) AND (`SourceGroup` = 10816) AND (`SourceEntry` = 12738); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 3001) AND (`SourceEntry` = 3694); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(1, 10816, 12738, 0, 0, 8, 0, 5058, 0, 0, 0, 0, 0, '', 'Drop Dalson Outhouse Key from Wandering Skeletons only if quest Mrs. Dalson\'s Diary has been rewarded.'), +(14, 3001, 3694, 0, 0, 8, 0, 5058, 0, 0, 0, 0, 0, '', 'Show Mrs. Dalson\'s Diary\'s gossip menu only if quest Mrs. Dalson\'s Diary has been rewarded.'); +-- Repeatable flag (also messes with condition quest_rewarded for some reason) +UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags`&~1 WHERE (`ID` = 5058); From 99a0d2923a70cc44b6b7dea519c082ac41510790 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 23:25:09 +0000 Subject: [PATCH 216/340] chore(DB): import pending files Referenced commit(s): 2cd4af9446ff6df720fe6577b138614be569d980 --- .../rev_1696867624332424400.sql => db_world/2023_10_10_10.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696867624332424400.sql => db_world/2023_10_10_10.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1696867624332424400.sql b/data/sql/updates/db_world/2023_10_10_10.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1696867624332424400.sql rename to data/sql/updates/db_world/2023_10_10_10.sql index c0252e11b943e6..13b81390127224 100644 --- a/data/sql/updates/pending_db_world/rev_1696867624332424400.sql +++ b/data/sql/updates/db_world/2023_10_10_10.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_09 -> 2023_10_10_10 -- Mrs. Dalson's Diary DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 1) AND (`SourceGroup` = 10816) AND (`SourceEntry` = 12738); DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 3001) AND (`SourceEntry` = 3694); From 5aca484574bdca3cb46aeb6fbc4b6dbac51227ca Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:25:26 +0300 Subject: [PATCH 217/340] fix(Core/Scripts): Venomhide Hatchling improvements (#17454) --- .../rev_1696761835374043300.sql | 29 +++++++++ src/server/scripts/Spells/spell_item.cpp | 59 +++++++++++++++++++ src/server/scripts/World/npcs_special.cpp | 6 +- 3 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696761835374043300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696761835374043300.sql b/data/sql/updates/pending_db_world/rev_1696761835374043300.sql new file mode 100644 index 00000000000000..b05584d6ed9988 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696761835374043300.sql @@ -0,0 +1,29 @@ +-- Venomhide Hatchling feed items +DELETE FROM `spell_script_names` WHERE `spell_id` IN (65200,65258,65265,68359,68358,68360); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(65200, 'spell_item_venomhide_feed'), +(65258, 'spell_item_venomhide_feed'), +(65265, 'spell_item_venomhide_feed'), +(68359, 'spell_item_venomhide_feed'), +(68358, 'spell_item_venomhide_feed'), +(68360, 'spell_item_venomhide_feed'); + +-- Mor'vek +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 11701; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 11701); +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`, `event_param6`, `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 +(11701, 0, 0, 0, 20, 0, 100, 0, 13906, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 34320, 10, 0, 0, 0, 0, 0, 0, 'Mor\'vek - On Quest \'They Grow Up So Fast\' Finished - Despawn Closest Venomhide Hatchling'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceGroup` = 1 AND `SourceEntry` IN (65200,65258,65265); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceGroup` = 0 AND `ConditionTypeOrReference` = 9 AND `ConditionValue1` = 13906; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 13903, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Gorishi Grub\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13917, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Gorishi Grub\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13889, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Hungry, Hungry Hatchling\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13915, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Hungry, Hungry Hatchling\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13904, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Poached, Scrambled, Or Raw?\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13916, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Poached, Scrambled, Or Raw?\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13905, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Searing Roc Feathers\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13914, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Searing Roc Feathers\' only if on quest \'They Grow Up So Fast\''); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 17d9156e980a4d..584e389bb21856 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3883,6 +3883,64 @@ class spell_item_worn_troll_dice : public SpellScript } }; +enum VenomhideHatchling +{ + NPC_VENOMHIDE_HATCHLING = 34320 +}; + +class spell_item_venomhide_feed : public SpellScript +{ + PrepareSpellScript(spell_item_venomhide_feed) + + SpellCastResult CheckCast() + { + if (Player* player = GetCaster()->ToPlayer()) + { + std::list hatchling; + player->GetAllMinionsByEntry(hatchling, NPC_VENOMHIDE_HATCHLING); + if (!hatchling.empty()) + { + return SPELL_CAST_OK; + } + } + + return SPELL_FAILED_BAD_TARGETS; + } + + void UpdateTarget(WorldObject*& target) + { + if (!target) + { + return; + } + + if (Player* player = GetCaster()->ToPlayer()) + { + std::list hatchling; + player->GetAllMinionsByEntry(hatchling, NPC_VENOMHIDE_HATCHLING); + if (hatchling.empty()) + { + return; + } + + for (Creature* creature : hatchling) + { + if (creature) + { + target = creature; + return; + } + } + } + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_item_venomhide_feed::CheckCast); + OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_item_venomhide_feed::UpdateTarget, EFFECT_0, TARGET_UNIT_NEARBY_ENTRY); + } +}; + void AddSC_item_spell_scripts() { RegisterSpellScript(spell_item_massive_seaforium_charge); @@ -4003,4 +4061,5 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_green_whelp_armor); RegisterSpellScript(spell_item_elixir_of_shadows); RegisterSpellScript(spell_item_worn_troll_dice); + RegisterSpellScript(spell_item_venomhide_feed); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 3092303258de94..7a13b68815b37b 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2506,9 +2506,9 @@ enum VenomhideHatchlingMisc ITEM_VENOMHIDE_BABY_TOOTH = 47196, MODEL_BABY_RAPTOR = 29251, - MODEL_BABY_RAPTOR_REPTILE_EYES = 29809, - MODEL_ADOLESCENT_RAPTOR = 29103, - MODEL_FULL_RAPTOR = 5291, + MODEL_BABY_RAPTOR_REPTILE_EYES = 29274, + MODEL_ADOLESCENT_RAPTOR = 29275, + MODEL_FULL_RAPTOR = 29276, }; enum VenomhideHatchlingTexts From 824bede1152343c9590b7284226f7aa6ad114790 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 23:26:01 +0000 Subject: [PATCH 218/340] chore(DB): import pending files Referenced commit(s): a9456f9123157f474e927bdfdfeb76cf9e870017 --- .../rev_1696761835374043300.sql => db_world/2023_10_10_11.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696761835374043300.sql => db_world/2023_10_10_11.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1696761835374043300.sql b/data/sql/updates/db_world/2023_10_10_11.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1696761835374043300.sql rename to data/sql/updates/db_world/2023_10_10_11.sql index b05584d6ed9988..33e9e739ece948 100644 --- a/data/sql/updates/pending_db_world/rev_1696761835374043300.sql +++ b/data/sql/updates/db_world/2023_10_10_11.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_10 -> 2023_10_10_11 -- Venomhide Hatchling feed items DELETE FROM `spell_script_names` WHERE `spell_id` IN (65200,65258,65265,68359,68358,68360); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 214948bafbeb0cf36ea14267e3d9d5d86609b128 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:26:43 +0300 Subject: [PATCH 219/340] fix(DB/Quest): Port Cleansing Witch Hill from Trinity. (#17420) * fix(DB/Quest): Port Cleansing Witch Hill from Trinity. https: //github.com/TrinityCore/TrinityCore/issues/22262 Co-Authored-By: Carlos Morales * "" Co-Authored-By: Carlos Morales --------- Co-authored-by: Carlos Morales --- .../rev_1696489227773553900.sql | 50 +++++++++++ .../Kalimdor/zone_dustwallow_marsh.cpp | 88 ------------------- 2 files changed, 50 insertions(+), 88 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696489227773553900.sql diff --git a/data/sql/updates/pending_db_world/rev_1696489227773553900.sql b/data/sql/updates/pending_db_world/rev_1696489227773553900.sql new file mode 100644 index 00000000000000..37721552beadcd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696489227773553900.sql @@ -0,0 +1,50 @@ +-- Witchbane Torch +SET @GUID := 5448; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(@GUID, 186425, 1, 0, 0, 1, 1, -2967.03, -3872.18, 33.0928, 2.24779, 0, 0, -0.90179, -0.432175, -20, 255, 1, '', 0, ''); + +DELETE FROM `event_scripts` WHERE `id`=15452; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(15452,0,9,@GUID,20,0,0,0,0,0); + +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 186425; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 186425); +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`, `event_param6`, `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 +(186425, 1, 0, 0, 70, 0, 100, 0, 1, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 4792, 0, 0, 0, 0, 0, 0, 0, 'Witchbane Torch - On Gameobject State Changed - Set Data 1 1 to \'Swamp Eye\' Jarl'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (42517,42515); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,42517,0,0,31,0,3,23869,0,0,0,0,'','Spell \'Beam to Zelfrax\' can only target \'Invis Zelfrax Origin\''), +(13,1,42515,0,0,31,0,3,23868,0,0,0,0,'','Spell \'Jarl Beam\' can only target \'Invis Zelfrax Target\''); + +-- "Swamp Eye" Jarl +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4792; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4792 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=479200 AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(4792, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 479200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - On Data Set 1 1 - Run Script'), +(479200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 42515, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - Actionlist - Cast \'Jarl Beam\''), +(479200, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 86, 42517, 0, 19, 23868, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - Actionlist - Cross Cast \'Beam to Zelfrax\''), +(479200, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 12, 23864, 3, 300000, 0, 0, 0, 8, 0, 0, 0, 0, -2984.98, -3853.72, 45.7142, 5.44525, '\'Swamp Eye\' Jarl - Actionlist - Summon Creature \'Zelfrax\''); + +-- Zelfrax +DELETE FROM `waypoints` WHERE `entry` = 23864; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(23864, 1, -2965.74, -3873.83, 33.3183, NULL, 0, ''); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' ,`unit_flags` = `unit_flags`&~(768) WHERE `entry` = 23864; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23864 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2386400,2386401) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(23864, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Just Summoned - Set Flags Immune To Players & Immune To NPC\'s'), +(23864, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2386400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Just Summoned - Run Script'), +(23864, 0, 2, 0, 40, 0, 100, 0, 1, 23864, 0, 0, 0, 0, 80, 2386401, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Point 1 of Path 23864 Reached - Run Script'), +(2386400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Say Line 0'), +(2386400, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Say Line 1'), +(2386400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 23864, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Start Waypoint Path 23864'), +(2386401, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Set Home Position'), +(2386401, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Remove Flags Immune To Players & Immune To NPC\'s'), +(2386401, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 30, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Start Attacking'); diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index c722ce8243819b..79ba973bd87bca 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -15,99 +15,12 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Dustwallow_Marsh -SD%Complete: 95 -SDComment: Quest support: 11180, 11126, 11174 -SDCategory: Dustwallow Marsh -EndScriptData */ - -/* ContentData -npc_cassa_crimsonwing - handled by npc_taxi -EndContentData */ - #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" -/*###### -## npc_zelfrax -######*/ - -Position const MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f}; - -enum Zelfrax -{ - SAY_ZELFRAX1 = 0, - SAY_ZELFRAX2 = 1 -}; - -class npc_zelfrax : public CreatureScript -{ -public: - npc_zelfrax() : CreatureScript("npc_zelfrax") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_zelfraxAI(creature); - } - - struct npc_zelfraxAI : public ScriptedAI - { - npc_zelfraxAI(Creature* creature) : ScriptedAI(creature) - { - MoveToDock(); - } - - void AttackStart(Unit* who) override - { - if (!who) - return; - - if (me->Attack(who, true)) - { - me->SetInCombatWith(who); - who->SetInCombatWith(me); - - if (IsCombatMovementAllowed()) - me->GetMotionMaster()->MoveChase(who); - } - } - - void MovementInform(uint32 Type, uint32 /*Id*/) override - { - if (Type != POINT_MOTION_TYPE) - return; - - me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); - me->SetImmuneToPC(false); - SetCombatMovement(true); - - if (me->IsInCombat()) - if (Unit* unit = me->GetVictim()) - me->GetMotionMaster()->MoveChase(unit); - } - - void MoveToDock() - { - SetCombatMovement(false); - me->GetMotionMaster()->MovePoint(0, MovePosition); - Talk(SAY_ZELFRAX1); - Talk(SAY_ZELFRAX2); - } - - void UpdateAI(uint32 /*Diff*/) override - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; -}; - enum SpellScripts { SPELL_OOZE_ZAP = 42489, @@ -243,7 +156,6 @@ class spell_energize_aoe : public SpellScriptLoader void AddSC_dustwallow_marsh() { - new npc_zelfrax(); new spell_ooze_zap(); new spell_ooze_zap_channel_end(); new spell_energize_aoe(); From 47ad18d6178f29338f682be98f537a23c9ba209d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 23:26:46 +0000 Subject: [PATCH 220/340] chore(DB): import pending files Referenced commit(s): 5aca484574bdca3cb46aeb6fbc4b6dbac51227ca --- .../rev_1696489227773553900.sql => db_world/2023_10_10_12.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696489227773553900.sql => db_world/2023_10_10_12.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1696489227773553900.sql b/data/sql/updates/db_world/2023_10_10_12.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696489227773553900.sql rename to data/sql/updates/db_world/2023_10_10_12.sql index 37721552beadcd..98ed927dad9ec8 100644 --- a/data/sql/updates/pending_db_world/rev_1696489227773553900.sql +++ b/data/sql/updates/db_world/2023_10_10_12.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_11 -> 2023_10_10_12 -- Witchbane Torch SET @GUID := 5448; DELETE FROM `gameobject` WHERE `guid`=@GUID; From 027d7cfc927cebb137defdacf8cfbfc5a0184944 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:27:13 +0300 Subject: [PATCH 221/340] fix(DB/SAI): Nexus Clerics casting while frozen. (#17411) --- data/sql/updates/pending_db_world/rev_1696400055341029700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696400055341029700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696400055341029700.sql b/data/sql/updates/pending_db_world/rev_1696400055341029700.sql new file mode 100644 index 00000000000000..771fa7606f9392 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696400055341029700.sql @@ -0,0 +1,2 @@ +-- Alliance / Horde Cleric +UPDATE `smart_scripts` SET `event_param5` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (26805,26803) AND `id` IN (0,1); From 34e3bf4b6e9d87b26cd996bd3e7534a1832f4e9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 23:27:50 +0000 Subject: [PATCH 222/340] chore(DB): import pending files Referenced commit(s): 214948bafbeb0cf36ea14267e3d9d5d86609b128 --- .../rev_1696400055341029700.sql => db_world/2023_10_10_13.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696400055341029700.sql => db_world/2023_10_10_13.sql} (77%) diff --git a/data/sql/updates/pending_db_world/rev_1696400055341029700.sql b/data/sql/updates/db_world/2023_10_10_13.sql similarity index 77% rename from data/sql/updates/pending_db_world/rev_1696400055341029700.sql rename to data/sql/updates/db_world/2023_10_10_13.sql index 771fa7606f9392..a18a9610fdb4c2 100644 --- a/data/sql/updates/pending_db_world/rev_1696400055341029700.sql +++ b/data/sql/updates/db_world/2023_10_10_13.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_10_12 -> 2023_10_10_13 -- Alliance / Horde Cleric UPDATE `smart_scripts` SET `event_param5` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (26805,26803) AND `id` IN (0,1); From b91e10f44386aceea4198916e2bc9e686ae93b9e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:31:24 +0300 Subject: [PATCH 223/340] fix(DB/Creature): Power Core Fragment should stay on. (#17421) --- .../sql/updates/pending_db_world/rev_1696502092749827700.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696502092749827700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696502092749827700.sql b/data/sql/updates/pending_db_world/rev_1696502092749827700.sql new file mode 100644 index 00000000000000..202b080fbc1705 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696502092749827700.sql @@ -0,0 +1,5 @@ +-- Zeppelin Power Core +UPDATE `creature_template_addon` SET `auras` = '42491' WHERE (`entry` = 23832); +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 23832; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23832) AND (`source_type` = 0); +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2383200) AND (`source_type` = 9); From dcc8bf2f5f5932ccf745734b5046ad64268d413f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Oct 2023 23:32:43 +0000 Subject: [PATCH 224/340] chore(DB): import pending files Referenced commit(s): b91e10f44386aceea4198916e2bc9e686ae93b9e --- .../rev_1696502092749827700.sql => db_world/2023_10_10_14.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696502092749827700.sql => db_world/2023_10_10_14.sql} (88%) diff --git a/data/sql/updates/pending_db_world/rev_1696502092749827700.sql b/data/sql/updates/db_world/2023_10_10_14.sql similarity index 88% rename from data/sql/updates/pending_db_world/rev_1696502092749827700.sql rename to data/sql/updates/db_world/2023_10_10_14.sql index 202b080fbc1705..a6a6b183325298 100644 --- a/data/sql/updates/pending_db_world/rev_1696502092749827700.sql +++ b/data/sql/updates/db_world/2023_10_10_14.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_13 -> 2023_10_10_14 -- Zeppelin Power Core UPDATE `creature_template_addon` SET `auras` = '42491' WHERE (`entry` = 23832); UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 23832; From 52a2e76c9300e39b56798d258aa0dbfed43b22c6 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:18:41 +0300 Subject: [PATCH 225/340] fix(DB/Creature): Various Crocolisk NPCs Using pet ability (#17466) fix(DB/Creature): Various Crocolisk NPCs Using pet abilitiy --- data/sql/updates/pending_db_world/rev_1696862712689014300.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696862712689014300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696862712689014300.sql b/data/sql/updates/pending_db_world/rev_1696862712689014300.sql new file mode 100644 index 00000000000000..14e5a1ef8026bd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696862712689014300.sql @@ -0,0 +1,3 @@ +-- Bad Attitude +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` IN (1082,1084,1400,1417); +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (1082,1084,1400,1417); From 8fbf143c0308cefcffee29d3f3585a2261c0b84d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Oct 2023 08:19:52 +0000 Subject: [PATCH 226/340] chore(DB): import pending files Referenced commit(s): 52a2e76c9300e39b56798d258aa0dbfed43b22c6 --- .../rev_1696862712689014300.sql => db_world/2023_10_11_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696862712689014300.sql => db_world/2023_10_11_00.sql} (81%) diff --git a/data/sql/updates/pending_db_world/rev_1696862712689014300.sql b/data/sql/updates/db_world/2023_10_11_00.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1696862712689014300.sql rename to data/sql/updates/db_world/2023_10_11_00.sql index 14e5a1ef8026bd..7fc078bdbc71f5 100644 --- a/data/sql/updates/pending_db_world/rev_1696862712689014300.sql +++ b/data/sql/updates/db_world/2023_10_11_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_10_14 -> 2023_10_11_00 -- Bad Attitude UPDATE `creature_template` SET `AIName` = '' WHERE `entry` IN (1082,1084,1400,1417); DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (1082,1084,1400,1417); From 1753a8d0b93e6fd8449791b02593ae505b9594bb Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:09:53 +0300 Subject: [PATCH 227/340] fix(Core/Spells): Call of the Wild targeting other players (#17485) * fix(Core/Spells): Call of the Wild targets * comment --- .../pending_db_world/rev_1697052883726753200.sql | 5 +++++ src/server/scripts/Spells/spell_hunter.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697052883726753200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697052883726753200.sql b/data/sql/updates/pending_db_world/rev_1697052883726753200.sql new file mode 100644 index 00000000000000..fa89236823e36d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697052883726753200.sql @@ -0,0 +1,5 @@ +-- Call of the Wild +DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-24604, 'spell_hun_target_self_and_pet'), +(53434, 'spell_hun_target_self_and_pet'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 4bbb80310b2cb8..d898922bed8b2a 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1308,9 +1308,11 @@ class spell_hun_bestial_wrath : public SpellScript } }; -class spell_hun_furious_howl : public SpellScript +// -24604 - Furious Howl +// 53434 - Call of the Wild +class spell_hun_target_self_and_pet : public SpellScript { - PrepareSpellScript(spell_hun_furious_howl); + PrepareSpellScript(spell_hun_target_self_and_pet); bool Load() override { @@ -1327,7 +1329,7 @@ class spell_hun_furious_howl : public SpellScript void Register() override { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_self_and_pet::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); } }; @@ -1361,5 +1363,5 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_lock_and_load); RegisterSpellScript(spell_hun_intimidation); RegisterSpellScript(spell_hun_bestial_wrath); - RegisterSpellScript(spell_hun_furious_howl); + RegisterSpellScript(spell_hun_target_self_and_pet); } From efbd378d713c65369ecf14b289ad532658fc016b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Oct 2023 20:11:16 +0000 Subject: [PATCH 228/340] chore(DB): import pending files Referenced commit(s): 1753a8d0b93e6fd8449791b02593ae505b9594bb --- .../rev_1697052883726753200.sql => db_world/2023_10_11_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697052883726753200.sql => db_world/2023_10_11_01.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1697052883726753200.sql b/data/sql/updates/db_world/2023_10_11_01.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1697052883726753200.sql rename to data/sql/updates/db_world/2023_10_11_01.sql index fa89236823e36d..9486fda66885ba 100644 --- a/data/sql/updates/pending_db_world/rev_1697052883726753200.sql +++ b/data/sql/updates/db_world/2023_10_11_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_11_00 -> 2023_10_11_01 -- Call of the Wild DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From e4b8fef0ba368d7dce66bf544b9400c9f949a533 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Thu, 12 Oct 2023 03:49:14 -0500 Subject: [PATCH 229/340] fix(DB/gob): Remove Replace Repool Durotar Herbs (#17459) --------- Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com> Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> --- .../rev_1696800156876281900.sql | 568 ++++++++++++++++++ 1 file changed, 568 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696800156876281900.sql diff --git a/data/sql/updates/pending_db_world/rev_1696800156876281900.sql b/data/sql/updates/pending_db_world/rev_1696800156876281900.sql new file mode 100644 index 00000000000000..2797b19c262925 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696800156876281900.sql @@ -0,0 +1,568 @@ +-- +-- Remove existing Durotar Herbalism Nodes: +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN 498 AND 501; +DELETE FROM `pool_template` WHERE `entry` BETWEEN 498 AND 501; + +-- Lets work on Mageroyal first. There are 16 Nodes and all have been captured and parsed succesfully into 4 pools (pools are also blizzlike in this case, rest are estimates) +-- Remove Existing Mageroyal: +DELETE FROM `gameobject` where `guid` IN (43887, 43898, 43900, 43901, 43902, 43904, 43897, 43899, 43903, 43905, 43906, 43987, 44064, 44065, 44066); + +-- Insert Durotar Mageroyal from packets: +SET @OGUID := 10601; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+15; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+5, 1620, 1, 14, 0, 1, 255, 933.9453125, -4606.53271484375, 18.46714210510253906, 0.663223206996917724, 0, 0, 0.325567245483398437, 0.945518851280212402, 360, 255, 1, 46779, '6/16 all known Durotar Mageroyal sniffed'), +(@OGUID+1, 1620, 1, 14, 0, 1, 255, 1208.466552734375, -5022.59423828125, 9.973286628723144531, 4.1538848876953125, 0, 0, -0.8746194839477539, 0.484810054302215576, 360, 255, 1, 46779, '2/16 all known Durotar Mageroyal sniffed'), +(@OGUID+14, 1620, 1, 14, 0, 1, 255, 65.1474609375, -4306.45166015625, 62.99754714965820312, 3.316144466400146484, 0, 0, -0.99619388580322265, 0.087165042757987976, 360, 255, 1, 46779, '15/16 all known Durotar Mageroyal sniffed'), +(@OGUID+10, 1620, 1, 14, 0, 1, 255, 816.496826171875, -4099.66064453125, -13.1231689453125, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 360, 255, 1, 46779, '11/16 all known Durotar Mageroyal sniffed'), +(@OGUID+4, 1620, 1, 14, 0, 1, 255, 1131.9041748046875, -4685.81005859375, 20.08868789672851562, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 360, 255, 1, 46779, '5/16 all known Durotar Mageroyal sniffed'), +(@OGUID+11, 1620, 1, 14, 0, 1, 255, 868.1712646484375, -4209.015625, -13.5084400177001953, 5.35816192626953125, 0, 0, -0.446197509765625, 0.894934535026550292, 360, 255, 1, 46779, '12/16 all known Durotar Mageroyal sniffed'), +(@OGUID+7, 1620, 1, 14, 0, 1, 255, 1001.31341552734375, -4820.7255859375, 16.75281143188476562, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 360, 255, 1, 46779, '8/16 all known Durotar Mageroyal sniffed'), +(@OGUID+13, 1620, 1, 14, 0, 1, 255, 12.62858104705810546, -4112.0380859375, 68.98575592041015625, 4.380776405334472656, 0, 0, -0.81411552429199218, 0.580702960491180419, 360, 255, 1, 46779, '14/16 all known Durotar Mageroyal sniffed'), +(@OGUID+6, 1620, 1, 14, 0, 1, 255, 969.2032470703125, -4704.16748046875, 30.33428573608398437, 4.834563255310058593, 0, 0, -0.66261959075927734, 0.748956084251403808, 360, 255, 1, 46779, '7/16 all known Durotar Mageroyal sniffed'), +(@OGUID+3, 1620, 1, 14, 0, 1, 255, 607.72735595703125, -4524.541015625, 11.38043594360351562, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 360, 255, 1, 46779, '4/16 all known Durotar Mageroyal sniffed'), +(@OGUID+9, 1620, 1, 14, 0, 1, 255, 962.67132568359375, -4245.0693359375, -8.28712177276611328, 3.298687219619750976, 0, 0, -0.99691677093505859, 0.078466430306434631, 360, 255, 1, 46779, '10/16 all known Durotar Mageroyal sniffed'), +(@OGUID+12, 1620, 1, 14, 0, 1, 255, -157.146484375, -3992.43310546875, 57.29217529296875, 4.660029888153076171, 0, 0, -0.72537422180175781, 0.688354730606079101, 360, 255, 1, 46779, '13/16 all known Durotar Mageroyal sniffed'), +(@OGUID+2, 1620, 1, 14, 0, 1, 255, 763.56890869140625, -5037.0380859375, 7.180908203125, 0.366517573595046997, 0, 0, 0.182234764099121093, 0.98325502872467041, 360, 255, 1, 46779, '3/16 all known Durotar Mageroyal sniffed'), +(@OGUID+8, 1620, 1, 14, 0, 1, 255, 931.2001953125, -4038.233154296875, -13.346710205078125, 3.9793548583984375, 0, 0, -0.9135446548461914, 0.406738430261611938, 360, 255, 1, 46779, '9/16 all known Durotar Mageroyal sniffed'), +(@OGUID+0, 1620, 1, 14, 0, 1, 255, 1450.59326171875, -4902.47802734375, 9.712756156921386718, 3.839725255966186523, 0, 0, -0.93969249725341796, 0.34202045202255249, 360, 255, 1, 46779, '1/16 all known Durotar Mageroyal sniffed'), +(@OGUID+15, 1620, 1, 14, 0, 1, 255, 122.14996337890625, -4474.04931640625, 37.63466262817382812, 2.076939344406127929, 0, 0, 0.861628532409667968, 0.50753939151763916, 360, 255, 1, 46779, '16/16 all known Durotar Mageroyal sniffed'); + +-- Make Mageroyal Pooling: +SET @OBJECTPOOLS :=112; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+15; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+3; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 1, 'Durotar Mageroyal A Pool 1/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 1/4'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 2/4'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 3/4'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 1, 'Durotar Mageroyal Razorwind Canyon Pool 2/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+4, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 1/4'), +(@OGUID+5, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 2/4'), +(@OGUID+6, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 3/4'), +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 1, 'Durotar Mageroyal Thunder Ridge 3/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+8, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 1/4'), +(@OGUID+9, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 2/4'), +(@OGUID+10, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 3/4'), +(@OGUID+11, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 1, 'Durotar Mageroyal Razormane Grounds 4/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+12, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 1/4'), +(@OGUID+13, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 2/4'), +(@OGUID+14, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 3/4'), +(@OGUID+15, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 4/4'); + +-- Earthroot has all known 45 spawns captured and one orientation extra +-- Remove existing Earthroot from Durotar: +DELETE FROM `gameobject` where `guid` IN (43855, 43856, 43868, 43873, 43874, 43877, 43880, 43883, 43885, 43886, 43895, 43896, 43981, 43982, 43992, 43999, 44000, 44011, 44012, 44024, 44025, 44026, 44027, 44029, 44041, 44042, 44043, 44045, 44050, 44051, 44054, 44055, 44058, 44059, 44061, 44062); + +-- Insert Durotar Earthroot from packets: +SET @OGUID := 21871; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+45; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+3, 1619, 1, 14, 0, 1, 255, 1118.32080078125, -4499.89794921875, 20.3045196533203125, 1.85004889965057373, 0, 0, 0.798635482788085937, 0.60181504487991333, 360, 255, 1, 46779, '4/46 all known Durotar Earthroot sniffed'), +(@OGUID+20, 1619, 1, 14, 0, 1, 255, 1256.7501220703125, -4683.24072265625, 16.37722587585449218, 2.565631866455078125, 0, 0, 0.958819389343261718, 0.284016460180282592, 360, 255, 1, 46779, '21/46 all known Durotar Earthroot sniffed'), +(@OGUID+26, 1619, 1, 14, 0, 1, 255, 223.0199737548828125, -5020.4990234375, 15.02139472961425781, 1.815141916275024414, 0, 0, 0.788010597229003906, 0.615661680698394775, 360, 255, 1, 46779, '27/46 all known Durotar Earthroot sniffed'), +(@OGUID+36, 1619, 1, 14, 0, 1, 255, -94.275390625, -5147.6259765625, 26.58465576171875, 0.663223206996917724, 0, 0, 0.325567245483398437, 0.945518851280212402, 360, 255, 1, 46779, '37/46 all known Durotar Earthroot sniffed'), +(@OGUID+41, 1619, 1, 14, 0, 1, 255, -675.49847412109375, -4823.72802734375, 35.99216842651367187, 2.234017848968505859, 0, 0, 0.898793220520019531, 0.438372820615768432, 360, 255, 1, 46779, '42/46 all known Durotar Earthroot sniffed'), +(@OGUID+38, 1619, 1, 14, 0, 1, 255, -233.734161376953125, -4837.064453125, 28.83690834045410156, 0.733038187026977539, 0, 0, 0.358367919921875, 0.933580458164215087, 360, 255, 1, 46779, '39/46 all known Durotar Earthroot sniffed'), +(@OGUID+31, 1619, 1, 14, 0, 1, 255, 52.99175262451171875, -4088.75048828125, 59.79741668701171875, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '32/46 all known Durotar Earthroot sniffed'), +(@OGUID+15, 1619, 1, 14, 0, 1, 255, 432.176116943359375, -3955.28564453125, 29.58817291259765625, 3.90954136848449707, 0, 0, -0.92718315124511718, 0.37460830807685852, 360, 255, 1, 46779, '16/46 all known Durotar Earthroot sniffed'), +(@OGUID+12, 1619, 1, 14, 0, 1, 255, 659.61102294921875, -4089.32421875, 16.22521209716796875, 1.780233979225158691, 0, 0, 0.7771453857421875, 0.629321098327636718, 360, 255, 1, 46779, '13/46 all known Durotar Earthroot sniffed'), +(@OGUID+13, 1619, 1, 14, 0, 1, 255, 574.80999755859375, -4254.13720703125, 14.17972564697265625, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '14/46 all known Durotar Earthroot sniffed'), +(@OGUID+7, 1619, 1, 14, 0, 1, 255, 942.25665283203125, -4404.73046875, 18.45261383056640625, 0.383971005678176879, 0, 0, 0.190808296203613281, 0.981627285480499267, 360, 255, 1, 46779, '8/46 all known Durotar Earthroot sniffed'), +(@OGUID+2, 1619, 1, 14, 0, 1, 255, 1101.1954345703125, -4333.6513671875, 25.76436996459960937, 4.328419685363769531, 0, 0, -0.82903671264648437, 0.559194147586822509, 360, 255, 1, 46779, '3/46 all known Durotar Earthroot sniffed'), +(@OGUID+1, 1619, 1, 14, 0, 1, 255, 1150.2880859375, -4129.90478515625, 20.5688934326171875, 1.012289404869079589, 0, 0, 0.484808921813964843, 0.87462007999420166, 360, 255, 1, 46779, '2/46 all known Durotar Earthroot sniffed'), +(@OGUID+40, 1619, 1, 14, 0, 1, 255, -460.1573486328125, -4712.15087890625, 37.342041015625, 5.672322273254394531, 0, 0, -0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '41/46 all known Durotar Earthroot sniffed'), +(@OGUID+25, 1619, 1, 14, 0, 1, 255, 225.31207275390625, -4230.01708984375, 41.82802200317382812, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 360, 255, 1, 46779, '26/46 all known Durotar Earthroot sniffed'), +(@OGUID+42, 1619, 1, 14, 0, 1, 255, -759.6065673828125, -4672.27978515625, 39.17332077026367187, 3.735006093978881835, 0, 0, -0.95630455017089843, 0.292372345924377441, 360, 255, 1, 46779, '43/46 all known Durotar Earthroot sniffed'), +(@OGUID+43, 1619, 1, 14, 0, 1, 255, -734.75152587890625, -4977.02978515625, 22.22920608520507812, 6.073746204376220703, 0, 0, -0.10452842712402343, 0.994521915912628173, 360, 255, 1, 46779, '44/46 all known Durotar Earthroot sniffed'), +(@OGUID+35, 1619, 1, 14, 0, 1, 255, -74.4194869995117187, -4801.1376953125, 25.06105232238769531, 5.044002056121826171, 0, 0, -0.58070278167724609, 0.814115643501281738, 360, 255, 1, 46779, '36/46 all known Durotar Earthroot sniffed'), +(@OGUID+24, 1619, 1, 14, 0, 1, 255, 341.038970947265625, -5138.8828125, 6.930376052856445312, 4.939284324645996093, 0, 0, -0.6225137710571289, 0.78260880708694458, 360, 255, 1, 46779, '25/46 all known Durotar Earthroot sniffed'), +(@OGUID+37, 1619, 1, 14, 0, 1, 255, -116.038627624511718, -4694.84228515625, 29.52692413330078125, 5.323255538940429687, 0, 0, -0.46174812316894531, 0.887011110782623291, 360, 255, 1, 46779, '38/46 all known Durotar Earthroot sniffed'), +(@OGUID+29, 1619, 1, 14, 0, 1, 255, 141.170135498046875, -4584.783203125, 65.2907867431640625, 1.902408957481384277, 0, 0, 0.814115524291992187, 0.580702960491180419, 360, 255, 1, 46779, '30/46 all known Durotar Earthroot sniffed'), +(@OGUID+39, 1619, 1, 14, 0, 1, 255, -318.69769287109375, -4857.83935546875, 40.7213134765625, 0.087265998125076293, 0, 0, 0.043619155883789062, 0.999048233032226562, 360, 255, 1, 46779, '40/46 all known Durotar Earthroot sniffed'), +(@OGUID+23, 1619, 1, 14, 0, 1, 255, 663.150390625, -4806.96875, 26.246063232421875, 4.136432647705078125, 0, 0, -0.87881660461425781, 0.477159708738327026, 360, 255, 1, 46779, '24/46 all known Durotar Earthroot sniffed'), +(@OGUID+9, 1619, 1, 14, 0, 1, 255, 820.78009033203125, -4342.0625, 16.78577995300292968, 5.497788906097412109, 0, 0, -0.38268280029296875, 0.923879802227020263, 360, 255, 1, 46779, '10/46 all known Durotar Earthroot sniffed'), +(@OGUID+0, 1619, 1, 14, 0, 1, 255, 1234.4581298828125, -4130.6484375, 26.204437255859375, 1.064649581909179687, 0, 0, 0.507537841796875, 0.861629426479339599, 360, 255, 1, 46779, '1/46 all known Durotar Earthroot sniffed'), +(@OGUID+5, 1619, 1, 14, 0, 1, 255, 958.55010986328125, -4054.565673828125, -11.1735868453979492, 3.961898565292358398, 0, 0, -0.91705989837646484, 0.398749500513076782, 360, 255, 1, 46779, '6/46 all known Durotar Earthroot sniffed'), +(@OGUID+18, 1619, 1, 14, 0, 1, 255, 1150.2882080078125, -4129.90478515625, 20.65157508850097656, 1.012289404869079589, 0, 0, 0.484808921813964843, 0.87462007999420166, 360, 255, 1, 46779, '19/46 all known Durotar Earthroot sniffed, duplicate orientation found'), +(@OGUID+19, 1619, 1, 14, 0, 1, 255, 1313.9761962890625, -4928.82861328125, 9.163771629333496093, 1.919861555099487304, 0, 0, 0.819151878356933593, 0.573576688766479492, 360, 255, 1, 46779, '20/46 all known Durotar Earthroot sniffed'), +(@OGUID+8, 1619, 1, 14, 0, 1, 255, 912.63800048828125, -4033.7822265625, -11.5388202667236328, 3.351046562194824218, 0, 0, -0.99452114105224609, 0.104535527527332305, 360, 255, 1, 46779, '9/46 all known Durotar Earthroot sniffed'), +(@OGUID+44, 1619, 1, 14, 0, 1, 255, -861.29559326171875, -4725.5048828125, 28.71560096740722656, 2.321286916732788085, 0, 0, 0.917059898376464843, 0.398749500513076782, 360, 255, 1, 46779, '45/46 all known Durotar Earthroot sniffed'), +(@OGUID+16, 1619, 1, 14, 0, 1, 255, 399.1748046875, -4201.98193359375, 26.73043632507324218, 5.427974700927734375, 0, 0, -0.41469287872314453, 0.909961462020874023, 360, 255, 1, 46779, '17/46 all known Durotar Earthroot sniffed'), +(@OGUID+11, 1619, 1, 14, 0, 1, 255, 749.328369140625, -4482.91357421875, 22.01276588439941406, 6.230826377868652343, 0, 0, -0.02617645263671875, 0.999657332897186279, 360, 255, 1, 46779, '12/46 all known Durotar Earthroot sniffed'), +(@OGUID+6, 1619, 1, 14, 0, 1, 255, 944.3758544921875, -4231.93603515625, -6.23416709899902343, 1.361356139183044433, 0, 0, 0.629320144653320312, 0.77714616060256958, 360, 255, 1, 46779, '7/46 all known Durotar Earthroot sniffed'), +(@OGUID+10, 1619, 1, 14, 0, 1, 255, 765.45294189453125, -3869.986083984375, 24.05956268310546875, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 360, 255, 1, 46779, '11/46 all known Durotar Earthroot sniffed'), +(@OGUID+21, 1619, 1, 14, 0, 1, 255, 1138.760498046875, -4902.47314453125, 17.50710487365722656, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 360, 255, 1, 46779, '22/46 all known Durotar Earthroot sniffed'), +(@OGUID+17, 1619, 1, 14, 0, 1, 255, 459.593963623046875, -4523.13818359375, 50.90013504028320312, 2.44346022605895996, 0, 0, 0.939692497253417968, 0.34202045202255249, 360, 255, 1, 46779, '18/46 all known Durotar Earthroot sniffed'), +(@OGUID+4, 1619, 1, 14, 0, 1, 255, 934.80511474609375, -3918.829833984375, 19.61922836303710937, 1.658061861991882324, 0, 0, 0.737277030944824218, 0.67559051513671875, 360, 255, 1, 46779, '5/46 all known Durotar Earthroot sniffed'), +(@OGUID+14, 1619, 1, 14, 0, 1, 255, 515.15960693359375, -3927.331298828125, 22.48749732971191406, 1.553341388702392578, 0, 0, 0.700908660888671875, 0.713251054286956787, 360, 255, 1, 46779, '15/46 all known Durotar Earthroot sniffed'), +(@OGUID+30, 1619, 1, 14, 0, 1, 255, 37.111328125, -3984.507080078125, 48.36726760864257812, 3.717553615570068359, 0, 0, -0.95881938934326171, 0.284016460180282592, 360, 255, 1, 46779, '31/46 all known Durotar Earthroot sniffed'), +(@OGUID+28, 1619, 1, 14, 0, 1, 255, 159.86285400390625, -3927.96142578125, 45.60350418090820312, 1.431168079376220703, 0, 0, 0.656058311462402343, 0.754710197448730468, 360, 255, 1, 46779, '29/46 all known Durotar Earthroot sniffed'), +(@OGUID+34, 1619, 1, 14, 0, 1, 255, -61.41796875, -4616.05615234375, 42.88976669311523437, 5.096362113952636718, 0, 0, -0.55919265747070312, 0.829037725925445556, 360, 255, 1, 46779, '35/46 all known Durotar Earthroot sniffed'), +(@OGUID+45, 1619, 1, 14, 0, 1, 255, -1004.580322265625, -4805.931640625, 12.89675140380859375, 4.939284324645996093, 0, 0, -0.6225137710571289, 0.78260880708694458, 360, 255, 1, 46779, '46/46 all known Durotar Earthroot sniffed'), +(@OGUID+32, 1619, 1, 14, 0, 1, 255, 34.8250885009765625, -4923.9091796875, 13.55170345306396484, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '33/46 all known Durotar Earthroot sniffed'), +(@OGUID+27, 1619, 1, 14, 0, 1, 255, 191.5199737548828125, -4436.94140625, 33.908660888671875, 1.029743075370788574, 0, 0, 0.492423057556152343, 0.870355963706970214, 360, 255, 1, 46779, '28/46 all known Durotar Earthroot sniffed'), +(@OGUID+22, 1619, 1, 14, 0, 1, 255, 944.28863525390625, -4952.1572265625, 10.04678821563720703, 3.874631166458129882, 0, 0, -0.93358039855957031, 0.358368009328842163, 360, 255, 1, 46779, '23/46 all known Durotar Earthroot sniffed'), +(@OGUID+33, 1619, 1, 14, 0, 1, 255, -114.458106994628906, -3897.579345703125, 44.01530838012695312, 0.785396754741668701, 0, 0, 0.38268280029296875, 0.923879802227020263, 360, 255, 1, 46779, '34/46 all known Durotar Earthroot sniffed'); + +-- Make Durotar Earthroot Pooling: +SET @OBJECTPOOLS :=116; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+45; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+4; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 1, 'Durotar Earthroot Northmost Pool 1/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 1/5'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 2/5'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 3/5'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 4/5'), +(@OGUID+18, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 5, 'Durotar Earthroot NW Pool 2/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+4, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 1/14'), +(@OGUID+5, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 2/14'), +(@OGUID+6, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 3/14'), +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 4/14'), +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 5/14'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 6/14'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 7/14'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 8/14'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 9/14'), +(@OGUID+13, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 10/14'), +(@OGUID+14, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 11/14'), +(@OGUID+15, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 12/14'), +(@OGUID+16, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 13/14'), +(@OGUID+17, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 14/14'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 2, 'Durotar Earthroot NE Pool 3/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 1/5'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 2/5'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 3/5'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 4/5'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 6, 'Durotar Earthroot Center Pool 4/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+24, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 1/17'), +(@OGUID+25, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 2/17'), +(@OGUID+26, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 3/17'), +(@OGUID+27, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 4/17'), +(@OGUID+28, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 5/17'), +(@OGUID+29, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 6/17'), +(@OGUID+30, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 7/17'), +(@OGUID+31, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 8/17'), +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 9/17'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 10/17'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 11/17'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 12/17'), +(@OGUID+36, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 13/17'), +(@OGUID+37, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 14/17'), +(@OGUID+38, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 15/17'), +(@OGUID+39, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 16/17'), +(@OGUID+40, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 17/17'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 2, 'Durotar Earthroot South Pool 5/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 1/5'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 2/5'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 3/5'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 4/5'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 5/5'); + +-- Peacebloom has presumed all known 76 spawns captured +-- Remove existing Peacebloom from Durotar: +DELETE FROM `gameobject` where `guid` IN (43735, 43736, 43737, 43738, 43763, 43775, 43780, 43796, 43801, 43832, 43808, 43817, 43829, 43834, 43836, 43841, 43847, 43980, 43983, 43984, 43985, 43986, 44001, 44002, 44003, 44008, 44009, 44010, 44013, 44016, 44017, 44020, 44021, 44022, 44023, 44028, 44030, 44031, 44110, 44111, 44122, 44125, 44126, 44127, 44128, 44130, 44132, 44136, 44140, 44141, 44142, 44144, 44145, 44146, 44148, 44149, 44377, 44475, 44476); + +-- Insert Durotar Peacebloom from packets: +SET @OGUID :=64519; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+75; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+24, 1618, 1, 14, 0, 1, 255, 576.44012451171875, -4645.88134765625, 31.64385986328125, 4.834563255310058593, 0, 0, -0.66261959075927734, 0.748956084251403808, 360, 255, 1, 46779, '24/76 all known Durotar Peacebloom sniffed'), +(@OGUID+75, 1618, 1, 14, 0, 1, 255, 872.485595703125, -4636.94775390625, 14.79042530059814453, 5.637413978576660156, 0, 0, -0.31730461120605468, 0.948323667049407958, 360, 255, 1, 46779, '75/76 all known Durotar Peacebloom sniffed'), +(@OGUID+13, 1618, 1, 14, 0, 1, 255, 1153.5992431640625, -4530.12255859375, 19.53768539428710937, 1.745326757431030273, 0, 0, 0.766043663024902343, 0.642788589000701904, 360, 255, 1, 46779, '13/76 all known Durotar Peacebloom sniffed'), +(@OGUID+11, 1618, 1, 14, 0, 1, 255, 1235.6951904296875, -4640.08251953125, 17.40758895874023437, 5.794494152069091796, 0, 0, -0.24192142486572265, 0.970295846462249755, 360, 255, 1, 46779, '11/76 all known Durotar Peacebloom sniffed'), +(@OGUID+7, 1618, 1, 14, 0, 1, 255, 1351.0560302734375, -4764.1064453125, 26.99089622497558593, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '7/76 all known Durotar Peacebloom sniffed'), +(@OGUID+18, 1618, 1, 14, 0, 1, 255, 950.41864013671875, -4981.32666015625, 9.415129661560058593, 5.515241622924804687, 0, 0, -0.37460613250732421, 0.927184045314788818, 360, 255, 1, 46779, '18/76 all known Durotar Peacebloom sniffed'), +(@OGUID+71, 1618, 1, 14, 0, 1, 255, -721.23626708984375, -5611.30712890625, 25.56131935119628906, 4.694936752319335937, 0, 0, -0.71325016021728515, 0.700909554958343505, 360, 255, 1, 46779, '71/76 all known Durotar Peacebloom sniffed'), +(@OGUID+74, 1618, 1, 14, 0, 1, 255, -1190.880126953125, -5502.5244140625, 5.268311977386474609, 1.134462952613830566, 0, 0, 0.537299156188964843, 0.843391716480255126, 360, 255, 1, 46779, '74/76 all known Durotar Peacebloom sniffed'), +(@OGUID+68, 1618, 1, 14, 0, 1, 255, -945.416015625, -4816.14697265625, 13.898681640625, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 360, 255, 1, 46779, '68/76 all known Durotar Peacebloom sniffed'), +(@OGUID+67, 1618, 1, 14, 0, 1, 255, -1007.18267822265625, -4740.14697265625, 14.23654556274414062, 4.852017402648925781, 0, 0, -0.65605831146240234, 0.754710197448730468, 360, 255, 1, 46779, '67/76 all known Durotar Peacebloom sniffed'), +(@OGUID+63, 1618, 1, 14, 0, 1, 255, -582.867431640625, -4845.39501953125, 35.45242691040039062, 3.892086982727050781, 0, 0, -0.93041706085205078, 0.366502493619918823, 360, 255, 1, 46779, '63/76 all known Durotar Peacebloom sniffed'), +(@OGUID+62, 1618, 1, 14, 0, 1, 255, -453.350250244140625, -4824.06396484375, 38.12348175048828125, 1.640606880187988281, 0, 0, 0.731352806091308593, 0.6819993257522583, 360, 255, 1, 46779, '62/76 all known Durotar Peacebloom sniffed'), +(@OGUID+41, 1618, 1, 14, 0, 1, 255, 122.60546875, -4414.103515625, 37.66838836669921875, 0.209439441561698913, 0, 0, 0.104528427124023437, 0.994521915912628173, 360, 255, 1, 46779, '41/76 all known Durotar Peacebloom sniffed'), +(@OGUID+40, 1618, 1, 14, 0, 1, 255, 79.77994537353515625, -4245.79150390625, 59.7068023681640625, 3.735006093978881835, 0, 0, -0.95630455017089843, 0.292372345924377441, 360, 255, 1, 46779, '40/76 all known Durotar Peacebloom sniffed'), +(@OGUID+43, 1618, 1, 14, 0, 1, 255, 51.63259506225585937, -4151.8984375, 63.73382568359375, 4.677483558654785156, 0, 0, -0.71933937072753906, 0.694658815860748291, 360, 255, 1, 46779, '43/76 all known Durotar Peacebloom sniffed'), +(@OGUID+39, 1618, 1, 14, 0, 1, 255, 106.3723983764648437, -4009.619873046875, 46.37731170654296875, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '39/76 all known Durotar Peacebloom sniffed'), +(@OGUID+32, 1618, 1, 14, 0, 1, 255, 481.166229248046875, -3884.92529296875, 20.675811767578125, 2.583080768585205078, 0, 0, 0.961260795593261718, 0.275640487670898437, 360, 255, 1, 46779, '32/76 all known Durotar Peacebloom sniffed'), +(@OGUID+6, 1618, 1, 14, 0, 1, 255, 587.15203857421875, -4016.65625, 10.35272407531738281, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 360, 255, 1, 46779, '6/76 all known Durotar Peacebloom sniffed'), +(@OGUID+26, 1618, 1, 14, 0, 1, 255, 544.14190673828125, -4190.08935546875, 16.03062057495117187, 5.096362113952636718, 0, 0, -0.55919265747070312, 0.829037725925445556, 360, 255, 1, 46779, '26/76 all known Durotar Peacebloom sniffed'), +(@OGUID+27, 1618, 1, 14, 0, 1, 255, 552.92218017578125, -4382.99072265625, 25.674591064453125, 4.415683269500732421, 0, 0, -0.80385684967041015, 0.594822824001312255, 360, 255, 1, 46779, '27/76 all known Durotar Peacebloom sniffed'), +(@OGUID+2, 1618, 1, 14, 0, 1, 255, 979.56207275390625, -3922.735595703125, 18.49326515197753906, 5.777040958404541015, 0, 0, -0.25037956237792968, 0.968147754669189453, 360, 255, 1, 46779, '2/76 all known Durotar Peacebloom sniffed'), +(@OGUID+61, 1618, 1, 14, 0, 1, 255, -427.984161376953125, -4721.78515625, 39.59911346435546875, 4.1538848876953125, 0, 0, -0.8746194839477539, 0.484810054302215576, 360, 255, 1, 46779, '61/76 all known Durotar Peacebloom sniffed'), +(@OGUID+35, 1618, 1, 14, 0, 1, 255, 209.837890625, -4051.300048828125, 44.49655532836914062, 2.268925428390502929, 0, 0, 0.906307220458984375, 0.422619491815567016, 360, 255, 1, 46779, '35/76 all known Durotar Peacebloom sniffed'), +(@OGUID+36, 1618, 1, 14, 0, 1, 255, 211.5045623779296875, -4300.72265625, 43.43696975708007812, 5.602506637573242187, 0, 0, -0.33380699157714843, 0.942641437053680419, 360, 255, 1, 46779, '36/76 all known Durotar Peacebloom sniffed'), +(@OGUID+51, 1618, 1, 14, 0, 1, 255, 111.74609375, -5011.83349609375, 9.826634407043457031, 1.448621988296508789, 0, 0, 0.662619590759277343, 0.748956084251403808, 360, 255, 1, 46779, '51/76 all known Durotar Peacebloom sniffed'), +(@OGUID+58, 1618, 1, 14, 0, 1, 255, -237.703567504882812, -4733.990234375, 30.96081161499023437, 4.817109584808349609, 0, 0, -0.66913032531738281, 0.74314504861831665, 360, 255, 1, 46779, '58/76 all known Durotar Peacebloom sniffed'), +(@OGUID+33, 1618, 1, 14, 0, 1, 255, 410.00152587890625, -3984.354736328125, 30.216949462890625, 2.862335443496704101, 0, 0, 0.990267753601074218, 0.139175355434417724, 360, 255, 1, 46779, '33/76 all known Durotar Peacebloom sniffed'), +(@OGUID+55, 1618, 1, 14, 0, 1, 255, -146.132156372070312, -4716.8251953125, 29.02817153930664062, 5.305802345275878906, 0, 0, -0.46947097778320312, 0.882947921752929687, 360, 255, 1, 46779, '55/76 all known Durotar Peacebloom sniffed'), +(@OGUID+60, 1618, 1, 14, 0, 1, 255, -315.7734375, -4749.27197265625, 36.00954818725585937, 1.832594871520996093, 0, 0, 0.793353080749511718, 0.608761727809906005, 360, 255, 1, 46779, '60/76 all known Durotar Peacebloom sniffed'), +(@OGUID+54, 1618, 1, 14, 0, 1, 255, -55.2087669372558593, -5059.32275390625, 10.38722896575927734, 1.221729278564453125, 0, 0, 0.573575973510742187, 0.819152355194091796, 360, 255, 1, 46779, '54/76 all known Durotar Peacebloom sniffed'), +(@OGUID+53, 1618, 1, 14, 0, 1, 255, 22.66449737548828125, -5074.466796875, 8.78829193115234375, 0.174532130360603332, 0, 0, 0.087155342102050781, 0.996194720268249511, 360, 255, 1, 46779, '53/76 all known Durotar Peacebloom sniffed'), +(@OGUID+56, 1618, 1, 14, 0, 1, 255, -146.28277587890625, -4849.16162109375, 19.79057884216308593, 3.194002151489257812, 0, 0, -0.99965667724609375, 0.026201646775007247, 360, 255, 1, 46779, '56/76 all known Durotar Peacebloom sniffed'), +(@OGUID+70, 1618, 1, 14, 0, 1, 255, -808.89044189453125, -5355.294921875, 2.164660930633544921, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 360, 255, 1, 46779, '70/76 all known Durotar Peacebloom sniffed'), +(@OGUID+46, 1618, 1, 14, 0, 1, 255, -174.129348754882812, -3886.43017578125, 41.30976486206054687, 3.996806621551513671, 0, 0, -0.90996074676513671, 0.414694398641586303, 360, 255, 1, 46779, '46/76 all known Durotar Peacebloom sniffed'), +(@OGUID+20, 1618, 1, 14, 0, 1, 255, 772.42034912109375, -4337.3681640625, 17.64434814453125, 1.588248729705810546, 0, 0, 0.713250160217285156, 0.700909554958343505, 360, 255, 1, 46779, '20/76 all known Durotar Peacebloom sniffed'), +(@OGUID+22, 1618, 1, 14, 0, 1, 255, 740.525390625, -4847.93359375, 32.43145370483398437, 3.071766138076782226, 0, 0, 0.999390602111816406, 0.034906134009361267, 360, 255, 1, 46779, '22/76 all known Durotar Peacebloom sniffed'), +(@OGUID+15, 1618, 1, 14, 0, 1, 255, 1080.1187744140625, -4207.169921875, 20.04167938232421875, 5.375615119934082031, 0, 0, -0.4383707046508789, 0.898794233798980712, 360, 255, 1, 46779, '15/76 all known Durotar Peacebloom sniffed'), +(@OGUID+5, 1618, 1, 14, 0, 1, 255, 687.802001953125, -3908.257080078125, 15.48861503601074218, 5.95157480239868164, 0, 0, -0.16504669189453125, 0.986285746097564697, 360, 255, 1, 46779, '5/76 all known Durotar Peacebloom sniffed'), +(@OGUID+14, 1618, 1, 14, 0, 1, 255, 1166.1929931640625, -4927.8125, 16.59576416015625, 4.136432647705078125, 0, 0, -0.87881660461425781, 0.477159708738327026, 360, 255, 1, 46779, '14/76 all known Durotar Peacebloom sniffed'), +(@OGUID+8, 1618, 1, 14, 0, 1, 255, 1317.8629150390625, -4986.07373046875, 2.624479055404663085, 2.460912704467773437, 0, 0, 0.942641258239746093, 0.333807557821273803, 360, 255, 1, 46779, '8/76 all known Durotar Peacebloom sniffed'), +(@OGUID+65, 1618, 1, 14, 0, 1, 255, -726.66131591796875, -4810.6435546875, 25.44516754150390625, 2.932138919830322265, 0, 0, 0.994521141052246093, 0.104535527527332305, 360, 255, 1, 46779, '65/76 all known Durotar Peacebloom sniffed'), +(@OGUID+29, 1618, 1, 14, 0, 1, 255, 456.34320068359375, -4551.5546875, 52.29912948608398437, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '29/76 all known Durotar Peacebloom sniffed'), +(@OGUID+66, 1618, 1, 14, 0, 1, 255, -713.90667724609375, -5020.736328125, 17.04654502868652343, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '66/76 all known Durotar Peacebloom sniffed'), +(@OGUID+21, 1618, 1, 14, 0, 1, 255, 710.62469482421875, -4209.046875, 16.87834548950195312, 6.14356088638305664, 0, 0, -0.06975555419921875, 0.997564136981964111, 360, 255, 1, 46779, '21/76 all known Durotar Peacebloom sniffed'), +(@OGUID+0, 1618, 1, 14, 0, 1, 255, 1192.5826416015625, -4006.66064453125, 17.00342559814453125, 4.276057243347167968, 0, 0, -0.84339141845703125, 0.537299633026123046, 360, 255, 1, 46779, '76/76 all known Durotar Peacebloom sniffed'), +(@OGUID+4, 1618, 1, 14, 0, 1, 255, 808.3974609375, -3849.423583984375, 18.24977493286132812, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '4/76 all known Durotar Peacebloom sniffed'), +(@OGUID+9, 1618, 1, 14, 0, 1, 255, 1267.2899169921875, -4862.4521484375, 15.57356643676757812, 4.433136463165283203, 0, 0, -0.79863548278808593, 0.60181504487991333, 360, 255, 1, 46779, '9/76 all known Durotar Peacebloom sniffed'), +(@OGUID+17, 1618, 1, 14, 0, 1, 255, 1049.1593017578125, -4971.99072265625, 15.59623908996582031, 0.15707901120185852, 0, 0, 0.078458786010742187, 0.996917366981506347, 360, 255, 1, 46779, '17/76 all known Durotar Peacebloom sniffed'), +(@OGUID+10, 1618, 1, 14, 0, 1, 255, 1217.0572509765625, -4204.306640625, 26.21006393432617187, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '10/76 all known Durotar Peacebloom sniffed'), +(@OGUID+37, 1618, 1, 14, 0, 1, 255, 185.3385467529296875, -4189.9609375, 44.99439239501953125, 4.049167633056640625, 0, 0, -0.89879322052001953, 0.438372820615768432, 360, 255, 1, 46779, '37/76 all known Durotar Peacebloom sniffed'), +(@OGUID+45, 1618, 1, 14, 0, 1, 255, -79.995880126953125, -3888.22314453125, 46.93803787231445312, 5.93412017822265625, 0, 0, -0.17364788055419921, 0.984807789325714111, 360, 255, 1, 46779, '45/76 all known Durotar Peacebloom sniffed'), +(@OGUID+64, 1618, 1, 14, 0, 1, 255, -727.39410400390625, -4670.90478515625, 36.80979537963867187, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 360, 255, 1, 46779, '64/76 all known Durotar Peacebloom sniffed'), +(@OGUID+50, 1618, 1, 14, 0, 1, 255, 81.68120574951171875, -4855.02734375, 16.23387908935546875, 4.572763919830322265, 0, 0, -0.75470924377441406, 0.656059443950653076, 360, 255, 1, 46779, '50/76 all known Durotar Peacebloom sniffed'), +(@OGUID+73, 1618, 1, 14, 0, 1, 255, -1229.1939697265625, -5419.7578125, 4.692111015319824218, 1.500982880592346191, 0, 0, 0.681998252868652343, 0.731353819370269775, 360, 255, 1, 46779, '73/76 all known Durotar Peacebloom sniffed'), +(@OGUID+72, 1618, 1, 14, 0, 1, 255, -1123.9193115234375, -5132.35791015625, 2.308864116668701171, 0.069811686873435974, 0, 0, 0.034898757934570312, 0.999390840530395507, 360, 255, 1, 46779, '72/76 all known Durotar Peacebloom sniffed'), +(@OGUID+23, 1618, 1, 14, 0, 1, 255, 621.03289794921875, -4322.41064453125, 18.90568351745605468, 1.239183306694030761, 0, 0, 0.580702781677246093, 0.814115643501281738, 360, 255, 1, 46779, '23/76 all known Durotar Peacebloom sniffed'), +(@OGUID+1, 1618, 1, 14, 0, 1, 255, 1123.47412109375, -4109.10791015625, 18.93925666809082031, 3.543023586273193359, 0, 0, -0.97992420196533203, 0.199370384216308593, 360, 255, 1, 46779, '1/76 all known Durotar Peacebloom sniffed'), +(@OGUID+25, 1618, 1, 14, 0, 1, 255, 590.79327392578125, -4870.73046875, 24.64709281921386718, 4.764749526977539062, 0, 0, -0.6883544921875, 0.725374460220336914, 360, 255, 1, 46779, '25/76 all known Durotar Peacebloom sniffed'), +(@OGUID+3, 1618, 1, 14, 0, 1, 255, 871.44091796875, -3921.874267578125, 20.81670379638671875, 4.799657344818115234, 0, 0, -0.67558956146240234, 0.737277925014495849, 360, 255, 1, 46779, '3/76 all known Durotar Peacebloom sniffed'), +(@OGUID+44, 1618, 1, 14, 0, 1, 255, -17.5935325622558593, -4018.5361328125, 59.22353744506835937, 2.600535154342651367, 0, 0, 0.963629722595214843, 0.26724100112915039, 360, 255, 1, 46779, '44/76 all known Durotar Peacebloom sniffed'), +(@OGUID+38, 1618, 1, 14, 0, 1, 255, 139.2584686279296875, -3887.162353515625, 39.86974334716796875, 3.752462387084960937, 0, 0, -0.95371627807617187, 0.300707906484603881, 360, 255, 1, 46779, '38/76 all known Durotar Peacebloom sniffed'), +(@OGUID+49, 1618, 1, 14, 0, 1, 255, 115.5776901245117187, -4686.57373046875, 27.42041015625, 1.186823248863220214, 0, 0, 0.559192657470703125, 0.829037725925445556, 360, 255, 1, 46779, '49/76 all known Durotar Peacebloom sniffed'), +(@OGUID+12, 1618, 1, 14, 0, 1, 255, 1153.6693115234375, -4312.61328125, 21.21240806579589843, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 360, 255, 1, 46779, '12/76 all known Durotar Peacebloom sniffed'), +(@OGUID+34, 1618, 1, 14, 0, 1, 255, 482.284393310546875, -4083.93310546875, 30.25545310974121093, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '34/76 all known Durotar Peacebloom sniffed'), +(@OGUID+28, 1618, 1, 14, 0, 1, 255, 481.5009765625, -4376.1796875, 36.150115966796875, 0.087265998125076293, 0, 0, 0.043619155883789062, 0.999048233032226562, 360, 255, 1, 46779, '28/76 all known Durotar Peacebloom sniffed'), +(@OGUID+42, 1618, 1, 14, 0, 1, 255, 41.62065887451171875, -3916.78076171875, 44.42875289916992187, 4.747295856475830078, 0, 0, -0.69465827941894531, 0.719339847564697265, 360, 255, 1, 46779, '42/76 all known Durotar Peacebloom sniffed'), +(@OGUID+59, 1618, 1, 14, 0, 1, 255, -249.421493530273437, -4915.39306640625, 26.49920463562011718, 3.403396368026733398, 0, 0, -0.99144458770751953, 0.130528271198272705, 360, 255, 1, 46779, '59/76 all known Durotar Peacebloom sniffed'), +(@OGUID+52, 1618, 1, 14, 0, 1, 255, -15.9546985626220703, -4872.8359375, 19.71653938293457031, 1.972219824790954589, 0, 0, 0.83388519287109375, 0.55193793773651123, 360, 255, 1, 46779, '52/76 all known Durotar Peacebloom sniffed'), +(@OGUID+48, 1618, 1, 14, 0, 1, 255, 188.7855987548828125, -5087.7841796875, 10.83263683319091796, 5.881760597229003906, 0, 0, -0.19936752319335937, 0.979924798011779785, 360, 255, 1, 46779, '48/76 all known Durotar Peacebloom sniffed'), +(@OGUID+16, 1618, 1, 14, 0, 1, 255, 1022.24871826171875, -4360.6435546875, 17.70088958740234375, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '16/76 all known Durotar Peacebloom sniffed'), +(@OGUID+31, 1618, 1, 14, 0, 1, 255, 411.253570556640625, -4226.1591796875, 25.42971992492675781, 5.794494152069091796, 0, 0, -0.24192142486572265, 0.970295846462249755, 360, 255, 1, 46779, '31/76 all known Durotar Peacebloom sniffed'), +(@OGUID+57, 1618, 1, 14, 0, 1, 255, -125.188812255859375, -4933.2470703125, 19.89044380187988281, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '57/76 all known Durotar Peacebloom sniffed'), +(@OGUID+69, 1618, 1, 14, 0, 1, 255, -1340.7806396484375, -5140.3271484375, 3.484854936599731445, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '69/76 all known Durotar Peacebloom sniffed'), +(@OGUID+19, 1618, 1, 14, 0, 1, 255, 809.23101806640625, -5008.37353515625, 10.34244728088378906, 0.436331570148468017, 0, 0, 0.216439247131347656, 0.976296067237854003, 360, 255, 1, 46779, '19/76 all known Durotar Peacebloom sniffed'), +(@OGUID+30, 1618, 1, 14, 0, 1, 255, 458.79547119140625, -4891.96435546875, 20.88724708557128906, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '30/76 all known Durotar Peacebloom sniffed'), +(@OGUID+47, 1618, 1, 14, 0, 1, 255, 280.476348876953125, -5047.20166015625, 11.75045204162597656, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '47/76 all known Durotar Peacebloom sniffed'); + +-- Make Durotar Peacebloom Pooling: +SET @OBJECTPOOLS :=121; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+75; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+7; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 3, 'Durotar Peacebloom NW Pool 1/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 1/7'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 2/7'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 3/7'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 4/7'), +(@OGUID+4, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 5/7'), +(@OGUID+5, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 6/7'), +(@OGUID+6, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 4, 'Durotar Peacebloom NE Pool 2/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 1/13'), +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 2/13'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 3/13'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 4/13'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 5/13'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 6/13'), +(@OGUID+13, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 7/13'), +(@OGUID+14, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 8/13'), +(@OGUID+15, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 9/13'), +(@OGUID+16, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 10/13'), +(@OGUID+17, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 11/13'), +(@OGUID+18, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 12/13'), +(@OGUID+75, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 13/13'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 5, 'Durotar Peacebloom East Valley Pool 3/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 1/13'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 2/13'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 3/13'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 4/13'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 5/13'), +(@OGUID+24, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 6/13'), +(@OGUID+25, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 7/13'), +(@OGUID+26, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 8/13'), +(@OGUID+27, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 9/13'), +(@OGUID+28, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 10/13'), +(@OGUID+29, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 11/13'), +(@OGUID+30, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 12/13'), +(@OGUID+31, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 13/13'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 2, 'Durotar Peacebloom West Zone Exit Pool 4/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 1/4'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 2/4'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 3/4'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 4, 'Durotar Peacebloom Southern Razormane Pool 5/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+36, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 1/11'), +(@OGUID+37, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 2/11'), +(@OGUID+38, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 3/11'), +(@OGUID+39, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 4/11'), +(@OGUID+40, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 5/11'), +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 6/11'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 7/11'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 8/11'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 9/11'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 10/11'), +(@OGUID+46, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 11/11'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+5, 5, 'Durotar Peacebloom Eastern Stretch Pool 6/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+47, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 1/16'), +(@OGUID+48, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 2/16'), +(@OGUID+49, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 3/16'), +(@OGUID+50, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 4/16'), +(@OGUID+51, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 5/16'), +(@OGUID+52, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 6/16'), +(@OGUID+53, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 7/16'), +(@OGUID+54, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 8/16'), +(@OGUID+55, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 9/16'), +(@OGUID+56, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 10/16'), +(@OGUID+57, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 11/16'), +(@OGUID+58, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 12/16'), +(@OGUID+59, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 13/16'), +(@OGUID+60, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 14/16'), +(@OGUID+61, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 15/16'), +(@OGUID+62, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 16/16'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+6, 3, 'Durotar Peacebloom Senjin Echos Pool 7/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+63, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 1/7'), +(@OGUID+64, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 2/7'), +(@OGUID+65, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 3/7'), +(@OGUID+66, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 4/7'), +(@OGUID+67, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 5/7'), +(@OGUID+68, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 6/7'), +(@OGUID+69, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+7, 1, 'Durotar Peacebloom Echo Isles Pool 8/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+70, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 1/5'), +(@OGUID+71, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 2/5'), +(@OGUID+72, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 3/5'), +(@OGUID+73, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 4/5'), +(@OGUID+74, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 5/5'); + +-- Silverleaf has presumed 68 spawns captured +-- Remove existing Silverleaf from Durotar: +DELETE FROM `gameobject` where `guid` IN (43526, 43530, 43534, 43539, 43541, 43542, 43544, 43545, 43549, 43556, 43558, 43559, 43560, 43562, 43565, 43572, 43573, 43574, 43577, 43578, 43579, 43580, 43581, 43591, 43594, 43595, 43598, 43599, 43602, 43603, 43606, 43607, 43608, 43610, 43611, 43612, 43615, 43618, 43619, 43620, 43621, 43624, 43625, 43630, 43631, 43633, 43634, 43635, 43636, 43640, 43641, 43642, 43643, 43646, 43651, 43654, 43655, 43658, 43661, 43662, 43663, 43664, 43665, 43670, 43671, 43679, 43680, 43681, 43688, 43690, 43691, 43696, 43697, 43698, 43699, 43701, 43702, 43704, 43712, 43715, 43716, 43718, 43720, 43721, 43722, 43724, 43725, 43730, 43732, 43733, 43933, 43936, 43937, 43938, 43979, 43988, 43989, 43990, 43991, 43993, 43994, 43995, 43996, 43997, 43998, 44004, 44005, 44006, 44007, 44014, 44015, 44018, 44019, 44032, 44152, 44153, 44154, 44155, 44163, 44164, 44165, 44169, 44170, 44171, 44172, 44173, 44174, 44178, 44183, 44187, 44188, 44189, 44192, 44196); + +-- Insert Durotar Silverleaf from packets: +SET @OGUID :=55775; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+67; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+5, 1617, 1, 14, 0, 1, 255, 1199.12255859375, -4974.04443359375, 11.18363094329833984, 1.413715124130249023, 0, 0, 0.649447441101074218, 0.760406434535980224, 360, 255, 1, 46779, '5/68 all known Durotar Silverleaf sniffed'), +(@OGUID+6, 1617, 1, 14, 0, 1, 255, 1226.707763671875, -5050.54541015625, 4.648762226104736328, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 360, 255, 1, 46779, '6/68 all known Durotar Silverleaf sniffed'), +(@OGUID+2, 1617, 1, 14, 0, 1, 255, 1428.4954833984375, -4748.66650390625, 30.07084465026855468, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '2/68 all known Durotar Silverleaf sniffed'), +(@OGUID+1, 1617, 1, 14, 0, 1, 255, 1402.1968994140625, -4671.181640625, 32.9783782958984375, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 360, 255, 1, 46779, '1/68 all known Durotar Silverleaf sniffed'), +(@OGUID+24, 1617, 1, 14, 0, 1, 255, 881.399658203125, -4937.3671875, 11.08956336975097656, 1.832594871520996093, 0, 0, 0.793353080749511718, 0.608761727809906005, 360, 255, 1, 46779, '24/68 all known Durotar Silverleaf sniffed'), +(@OGUID+28, 1617, 1, 14, 0, 1, 255, 654.6025390625, -4906.94287109375, 25.16013526916503906, 4.642575740814208984, 0, 0, -0.731353759765625, 0.681998312473297119, 360, 255, 1, 46779, '28/68 all known Durotar Silverleaf sniffed'), +(@OGUID+30, 1617, 1, 14, 0, 1, 255, 478.513031005859375, -4947.251953125, 33.46242523193359375, 1.797688722610473632, 0, 0, 0.7826080322265625, 0.622514784336090087, 360, 255, 1, 46779, '30/68 all known Durotar Silverleaf sniffed'), +(@OGUID+32, 1617, 1, 14, 0, 1, 255, 332.682281494140625, -4996.80908203125, 19.57125663757324218, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 360, 255, 1, 46779, '32/68 all known Durotar Silverleaf sniffed'), +(@OGUID+41, 1617, 1, 14, 0, 1, 255, -116.260200500488281, -5164.296875, 19.90396499633789062, 5.881760597229003906, 0, 0, -0.19936752319335937, 0.979924798011779785, 360, 255, 1, 46779, '41/68 all known Durotar Silverleaf sniffed'), +(@OGUID+45, 1617, 1, 14, 0, 1, 255, -224.297958374023437, -5066.6650390625, 21.06113243103027343, 2.617989301681518554, 0, 0, 0.965925216674804687, 0.258821308612823486, 360, 255, 1, 46779, '45/68 all known Durotar Silverleaf sniffed'), +(@OGUID+46, 1617, 1, 14, 0, 1, 255, -236.168182373046875, -5203.22509765625, 20.0912322998046875, 5.462882041931152343, 0, 0, -0.39874839782714843, 0.917060375213623046, 360, 255, 1, 46779, '46/68 all known Durotar Silverleaf sniffed'), +(@OGUID+62, 1617, 1, 14, 0, 1, 255, -836.31915283203125, -5351.60986328125, 3.831897974014282226, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 360, 255, 1, 46779, '62/68 all known Durotar Silverleaf sniffed'), +(@OGUID+60, 1617, 1, 14, 0, 1, 255, -925.78167724609375, -4689.3427734375, 25.75434494018554687, 2.373644113540649414, 0, 0, 0.927183151245117187, 0.37460830807685852, 360, 255, 1, 46779, '60/68 all known Durotar Silverleaf sniffed'), +(@OGUID+47, 1617, 1, 14, 0, 1, 255, -293.876739501953125, -4903.55712890625, 31.53289222717285156, 5.009094715118408203, 0, 0, -0.59482288360595703, 0.80385679006576538, 360, 255, 1, 46779, '47/68 all known Durotar Silverleaf sniffed'), +(@OGUID+37, 1617, 1, 14, 0, 1, 255, 10.69900226593017578, -4619.18017578125, 44.09099578857421875, 5.480334281921386718, 0, 0, -0.39073085784912109, 0.920504987239837646, 360, 255, 1, 46779, '37/68 all known Durotar Silverleaf sniffed'), +(@OGUID+22, 1617, 1, 14, 0, 1, 255, 64.93099212646484375, -4331.1171875, 61.72869110107421875, 3.22885894775390625, 0, 0, -0.99904823303222656, 0.043619260191917419, 360, 255, 1, 46779, '22/68 all known Durotar Silverleaf sniffed'), +(@OGUID+67, 1617, 1, 14, 0, 1, 255, 20.90711784362792968, -4266.0341796875, 72.0731048583984375, 6.265733242034912109, 0, 0, -0.00872611999511718, 0.999961912631988525, 360, 255, 1, 46779, '67/68 all known Durotar Silverleaf sniffed'), +(@OGUID+20, 1617, 1, 14, 0, 1, 255, 101.7131118774414062, -4080.67529296875, 54.75529098510742187, 1.221729278564453125, 0, 0, 0.573575973510742187, 0.819152355194091796, 360, 255, 1, 46779, '20/68 all known Durotar Silverleaf sniffed'), +(@OGUID+15, 1617, 1, 14, 0, 1, 255, 794.43817138671875, -4269.77783203125, 18.87027931213378906, 2.146752834320068359, 0, 0, 0.878816604614257812, 0.477159708738327026, 360, 255, 1, 46779, '15/68 all known Durotar Silverleaf sniffed'), +(@OGUID+11, 1617, 1, 14, 0, 1, 255, 1098.228271484375, -4026.997314453125, 17.61180686950683593, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '11/68 all known Durotar Silverleaf sniffed'), +(@OGUID+10, 1617, 1, 14, 0, 1, 255, 1303.82275390625, -4208.95361328125, 27.4298095703125, 2.809975385665893554, 0, 0, 0.986285209655761718, 0.165049895644187927, 360, 255, 1, 46779, '10/68 all known Durotar Silverleaf sniffed'), +(@OGUID+17, 1617, 1, 14, 0, 1, 255, 540.0294189453125, -4440.9404296875, 36.00847244262695312, 4.956737518310546875, 0, 0, -0.61566066741943359, 0.788011372089385986, 360, 255, 1, 46779, '17/68 all known Durotar Silverleaf sniffed'), +(@OGUID+51, 1617, 1, 14, 0, 1, 255, -496.944671630859375, -4685.08056640625, 38.02862930297851562, 4.293513298034667968, 0, 0, -0.8386697769165039, 0.544640243053436279, 360, 255, 1, 46779, '51/68 all known Durotar Silverleaf sniffed'), +(@OGUID+55, 1617, 1, 14, 0, 1, 255, -665.78558349609375, -5000.4169921875, 24.34447669982910156, 4.555310726165771484, 0, 0, -0.76040554046630859, 0.649448513984680175, 360, 255, 1, 46779, '55/68 all known Durotar Silverleaf sniffed'), +(@OGUID+64, 1617, 1, 14, 0, 1, 255, -1100.570556640625, -5415.5537109375, 12.51249217987060546, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '64/68 all known Durotar Silverleaf sniffed'), +(@OGUID+49, 1617, 1, 14, 0, 1, 255, -410.6124267578125, -4662.3447265625, 42.35511016845703125, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 360, 255, 1, 46779, '49/68 all known Durotar Silverleaf sniffed'), +(@OGUID+53, 1617, 1, 14, 0, 1, 255, -547.2413330078125, -4659.25537109375, 40.40694046020507812, 0.471238493919372558, 0, 0, 0.233445167541503906, 0.972369968891143798, 360, 255, 1, 46779, '53/68 all known Durotar Silverleaf sniffed'), +(@OGUID+38, 1617, 1, 14, 0, 1, 255, -62.4102668762207031, -5153.82666015625, 9.282894134521484375, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '38/68 all known Durotar Silverleaf sniffed'), +(@OGUID+43, 1617, 1, 14, 0, 1, 255, -168.53515625, -5166.66943359375, 24.97609519958496093, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '43/68 all known Durotar Silverleaf sniffed'), +(@OGUID+48, 1617, 1, 14, 0, 1, 255, -334.918182373046875, -5162.35498046875, 20.76618766784667968, 3.647741317749023437, 0, 0, -0.96814727783203125, 0.250381410121917724, 360, 255, 1, 46779, '48/68 all known Durotar Silverleaf sniffed'), +(@OGUID+40, 1617, 1, 14, 0, 1, 255, -119.825958251953125, -4860.9248046875, 21.40077590942382812, 4.014260292053222656, 0, 0, -0.90630722045898437, 0.422619491815567016, 360, 255, 1, 46779, '40/68 all known Durotar Silverleaf sniffed'), +(@OGUID+39, 1617, 1, 14, 0, 1, 255, -109.583770751953125, -4607.2548828125, 46.388336181640625, 5.340708732604980468, 0, 0, -0.45398998260498046, 0.891006767749786376, 360, 255, 1, 46779, '39/68 all known Durotar Silverleaf sniffed'), +(@OGUID+34, 1617, 1, 14, 0, 1, 255, 145.64874267578125, -4619.6201171875, 29.96367835998535156, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '34/68 all known Durotar Silverleaf sniffed'), +(@OGUID+21, 1617, 1, 14, 0, 1, 255, 135.734161376953125, -4484.05078125, 36.53779983520507812, 6.12610626220703125, 0, 0, -0.07845878601074218, 0.996917366981506347, 360, 255, 1, 46779, '21/68 all known Durotar Silverleaf sniffed'), +(@OGUID+57, 1617, 1, 14, 0, 1, 255, -801.76409912109375, -4569.8369140625, 49.57865524291992187, 2.967041015625, 0, 0, 0.996193885803222656, 0.087165042757987976, 360, 255, 1, 46779, '57/68 all known Durotar Silverleaf sniffed'), +(@OGUID+58, 1617, 1, 14, 0, 1, 255, -783.00457763671875, -4813.3828125, 20.22387313842773437, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '58/68 all known Durotar Silverleaf sniffed'), +(@OGUID+23, 1617, 1, 14, 0, 1, 255, 62.31228256225585937, -4479.89306640625, 47.769866943359375, 1.588248729705810546, 0, 0, 0.713250160217285156, 0.700909554958343505, 360, 255, 1, 46779, '23/68 all known Durotar Silverleaf sniffed'), +(@OGUID+26, 1617, 1, 14, 0, 1, 255, 758.82586669921875, -4728.86474609375, 37.44508743286132812, 3.961898565292358398, 0, 0, -0.91705989837646484, 0.398749500513076782, 360, 255, 1, 46779, '26/68 all known Durotar Silverleaf sniffed'), +(@OGUID+12, 1617, 1, 14, 0, 1, 255, 1053.7669677734375, -4301.228515625, 17.49706840515136718, 1.274088263511657714, 0, 0, 0.594821929931640625, 0.80385744571685791, 360, 255, 1, 46779, '12/68 all known Durotar Silverleaf sniffed'), +(@OGUID+8, 1617, 1, 14, 0, 1, 255, 1285.0394287109375, -4064.3291015625, 33.28411102294921875, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 360, 255, 1, 46779, '8/68 all known Durotar Silverleaf sniffed'), +(@OGUID+7, 1617, 1, 14, 0, 1, 255, 1056.9949951171875, -5000.04345703125, 17.49074172973632812, 4.9218292236328125, 0, 0, -0.62932014465332031, 0.77714616060256958, 360, 255, 1, 46779, '7/68 all known Durotar Silverleaf sniffed'), +(@OGUID+3, 1617, 1, 14, 0, 1, 255, 1429.0692138671875, -4813.3798828125, 24.61579322814941406, 3.769911527633666992, 0, 0, -0.95105648040771484, 0.309017121791839599, 360, 255, 1, 46779, '3/68 all known Durotar Silverleaf sniffed'), +(@OGUID+0, 1617, 1, 14, 0, 1, 255, 1358.301025390625, -4569.46337890625, 37.89192581176757812, 5.969027042388916015, 0, 0, -0.1564340591430664, 0.987688362598419189, 360, 255, 1, 46779, '68/68 all known Durotar Silverleaf sniffed'), +(@OGUID+19, 1617, 1, 14, 0, 1, 255, 295.77886962890625, -4322.27490234375, 33.3949127197265625, 0.488691210746765136, 0, 0, 0.241921424865722656, 0.970295846462249755, 360, 255, 1, 46779, '19/68 all known Durotar Silverleaf sniffed'), +(@OGUID+59, 1617, 1, 14, 0, 1, 255, -840.15277099609375, -4632.03271484375, 40.95009231567382812, 2.164205789566040039, 0, 0, 0.882946968078613281, 0.469472706317901611, 360, 255, 1, 46779, '59/68 all known Durotar Silverleaf sniffed'), +(@OGUID+16, 1617, 1, 14, 0, 1, 255, 776.60968017578125, -4406.03759765625, 18.81634330749511718, 5.532694816589355468, 0, 0, -0.3665008544921875, 0.93041771650314331, 360, 255, 1, 46779, '16/68 all known Durotar Silverleaf sniffed'), +(@OGUID+9, 1617, 1, 14, 0, 1, 255, 1292.541259765625, -4168.68701171875, 27.76622772216796875, 0.226892471313476562, 0, 0, 0.113203048706054687, 0.993571877479553222, 360, 255, 1, 46779, '9/68 all known Durotar Silverleaf sniffed'), +(@OGUID+14, 1617, 1, 14, 0, 1, 255, 763.7265625, -3959.33544921875, 19.37665939331054687, 1.134462952613830566, 0, 0, 0.537299156188964843, 0.843391716480255126, 360, 255, 1, 46779, '14/68 all known Durotar Silverleaf sniffed'), +(@OGUID+25, 1617, 1, 14, 0, 1, 255, 821.03125, -4890.18310546875, 35.38489151000976562, 1.047197580337524414, 0, 0, 0.5, 0.866025388240814208, 360, 255, 1, 46779, '25/68 all known Durotar Silverleaf sniffed'), +(@OGUID+4, 1617, 1, 14, 0, 1, 255, 1216.4288330078125, -4797.841796875, 15.94697761535644531, 1.675513744354248046, 0, 0, 0.743144035339355468, 0.669131457805633544, 360, 255, 1, 46779, '4/68 all known Durotar Silverleaf sniffed'), +(@OGUID+36, 1617, 1, 14, 0, 1, 255, 92.46224212646484375, -4616.64794921875, 49.78679275512695312, 5.044002056121826171, 0, 0, -0.58070278167724609, 0.814115643501281738, 360, 255, 1, 46779, '36/68 all known Durotar Silverleaf sniffed'), +(@OGUID+56, 1617, 1, 14, 0, 1, 255, -690.43206787109375, -5610.8916015625, 26.65709304809570312, 2.129300594329833984, 0, 0, 0.874619483947753906, 0.484810054302215576, 360, 255, 1, 46779, '56/68 all known Durotar Silverleaf sniffed'), +(@OGUID+29, 1617, 1, 14, 0, 1, 255, 553.1600341796875, -4918.81494140625, 27.35105705261230468, 3.857182979583740234, 0, 0, -0.93667125701904296, 0.350209832191467285, 360, 255, 1, 46779, '29/68 all known Durotar Silverleaf sniffed'), +(@OGUID+31, 1617, 1, 14, 0, 1, 255, 429.8603515625, -4974.40625, 36.593505859375, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '31/68 all known Durotar Silverleaf sniffed'), +(@OGUID+33, 1617, 1, 14, 0, 1, 255, 364.98675537109375, -5048.28564453125, 21.98761177062988281, 4.625123500823974609, 0, 0, -0.73727703094482421, 0.67559051513671875, 360, 255, 1, 46779, '33/68 all known Durotar Silverleaf sniffed'), +(@OGUID+18, 1617, 1, 14, 0, 1, 255, 385.5419921875, -4081.228271484375, 32.075347900390625, 4.031712055206298828, 0, 0, -0.90258502960205078, 0.430511653423309326, 360, 255, 1, 46779, '18/68 all known Durotar Silverleaf sniffed'), +(@OGUID+42, 1617, 1, 14, 0, 1, 255, -194.91168212890625, -4635.5029296875, 42.44704055786132812, 3.403396368026733398, 0, 0, -0.99144458770751953, 0.130528271198272705, 360, 255, 1, 46779, '42/68 all known Durotar Silverleaf sniffed'), +(@OGUID+52, 1617, 1, 14, 0, 1, 255, -513.9561767578125, -4869.1884765625, 35.99258041381835937, 6.03883981704711914, 0, 0, -0.12186908721923828, 0.9925462007522583, 360, 255, 1, 46779, '52/68 all known Durotar Silverleaf sniffed'), +(@OGUID+13, 1617, 1, 14, 0, 1, 255, 859.83758544921875, -4397.94384765625, 16.41344642639160156, 4.572763919830322265, 0, 0, -0.75470924377441406, 0.656059443950653076, 360, 255, 1, 46779, '13/68 all known Durotar Silverleaf sniffed'), +(@OGUID+50, 1617, 1, 14, 0, 1, 255, -424.18792724609375, -4871.5634765625, 40.11857986450195312, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '50/68 all known Durotar Silverleaf sniffed'), +(@OGUID+61, 1617, 1, 14, 0, 1, 255, -1028.3353271484375, -4863.8994140625, 8.512418746948242187, 5.567600727081298828, 0, 0, -0.35020732879638671, 0.936672210693359375, 360, 255, 1, 46779, '61/68 all known Durotar Silverleaf sniffed'), +(@OGUID+44, 1617, 1, 14, 0, 1, 255, -255.429473876953125, -4707.501953125, 34.32258224487304687, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 360, 255, 1, 46779, '44/68 all known Durotar Silverleaf sniffed'), +(@OGUID+54, 1617, 1, 14, 0, 1, 255, -609.551025390625, -4933.75146484375, 37.45981979370117187, 1.291541695594787597, 0, 0, 0.60181427001953125, 0.798636078834533691, 360, 255, 1, 46779, '54/68 all known Durotar Silverleaf sniffed'), +(@OGUID+35, 1617, 1, 14, 0, 1, 255, 117.1783828735351562, -4960.396484375, 9.156251907348632812, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 360, 255, 1, 46779, '35/68 all known Durotar Silverleaf sniffed'), +(@OGUID+66, 1617, 1, 14, 0, 1, 255, -1390.3603515625, -5156.8828125, 2.4388580322265625, 2.809975385665893554, 0, 0, 0.986285209655761718, 0.165049895644187927, 360, 255, 1, 46779, '66/68 all known Durotar Silverleaf sniffed'), +(@OGUID+27, 1617, 1, 14, 0, 1, 255, 716.880126953125, -5005.5654296875, 15.14517402648925781, 6.265733242034912109, 0, 0, -0.00872611999511718, 0.999961912631988525, 360, 255, 1, 46779, '27/68 all known Durotar Silverleaf sniffed'), +(@OGUID+65, 1617, 1, 14, 0, 1, 255, -1244.3306884765625, -5499.28369140625, 5.331966876983642578, 1.535889506340026855, 0, 0, 0.694658279418945312, 0.719339847564697265, 360, 255, 1, 46779, '65/68 all known Durotar Silverleaf sniffed'), +(@OGUID+63, 1617, 1, 14, 0, 1, 255, -1118.697509765625, -5156.806640625, 1.814450979232788085, 0.802850961685180664, 0, 0, 0.390730857849121093, 0.920504987239837646, 360, 255, 1, 46779, '63/68 all known Durotar Silverleaf sniffed'); + +-- Make Durotar Silverleaf Pooling: +SET @OBJECTPOOLS :=129; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+67; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+7; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 4, 'Durotar Silverleaf NW Pool 1/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 1/7'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 2/8'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 3/8'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 4/8'), +(@OGUID+4, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 5/8'), +(@OGUID+5, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 6/8'), +(@OGUID+6, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 7/8'), +(@OGUID+7, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 8/8'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 3, 'Durotar Silverleaf NW Pool 2/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 1/5'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 2/5'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 3/5'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 4/5'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 4, 'Durotar Silverleaf West Pool 3/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+13, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 1/12'), +(@OGUID+14, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 2/12'), +(@OGUID+15, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 3/12'), +(@OGUID+16, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 4/12'), +(@OGUID+17, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 5/12'), +(@OGUID+18, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 6/12'), +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 7/12'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 8/12'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 9/12'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 10/12'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 11/12'), +(@OGUID+67, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 12/12'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 5, 'Durotar Silverleaf East Valley Pool 4/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+24, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 1/14'), +(@OGUID+25, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 2/14'), +(@OGUID+26, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 3/14'), +(@OGUID+27, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 4/14'), +(@OGUID+28, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 5/14'), +(@OGUID+29, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 6/14'), +(@OGUID+30, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 7/14'), +(@OGUID+31, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 8/14'), +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 9/14'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 10/14'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 11/14'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 12/14'), +(@OGUID+36, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 13/14'), +(@OGUID+37, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 14/14'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 8, 'Durotar Silverleaf East Coast Pool 5/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+38, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 1/17'), +(@OGUID+39, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 2/17'), +(@OGUID+40, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 3/17'), +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 4/17'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 5/17'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 6/17'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 7/17'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 8/17'), +(@OGUID+46, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 9/17'), +(@OGUID+47, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 10/17'), +(@OGUID+48, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 11/17'), +(@OGUID+49, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 12/17'), +(@OGUID+50, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 13/17'), +(@OGUID+51, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 14/17'), +(@OGUID+52, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 15/17'), +(@OGUID+53, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 16/17'), +(@OGUID+54, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 17/17'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+5, 2, 'Durotar Silverleaf Senjin Echo Pool 6/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+55, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 1/7'), +(@OGUID+56, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 2/7'), +(@OGUID+57, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 3/7'), +(@OGUID+58, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 4/7'), +(@OGUID+59, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 5/7'), +(@OGUID+60, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 6/7'), +(@OGUID+61, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+6, 1, 'Durotar Silverleaf Echo Isles Pool 7/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+62, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 1/5'), +(@OGUID+63, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 2/5'), +(@OGUID+64, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 3/5'), +(@OGUID+65, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 4/5'), +(@OGUID+66, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 5/5'); From 4f2ea0a09023246890e6b6cd0bbf5cb9302cf00c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Oct 2023 08:50:27 +0000 Subject: [PATCH 230/340] chore(DB): import pending files Referenced commit(s): e4b8fef0ba368d7dce66bf544b9400c9f949a533 --- .../rev_1696800156876281900.sql => db_world/2023_10_12_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696800156876281900.sql => db_world/2023_10_12_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1696800156876281900.sql b/data/sql/updates/db_world/2023_10_12_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696800156876281900.sql rename to data/sql/updates/db_world/2023_10_12_00.sql index 2797b19c262925..7b96b319da15d6 100644 --- a/data/sql/updates/pending_db_world/rev_1696800156876281900.sql +++ b/data/sql/updates/db_world/2023_10_12_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_11_01 -> 2023_10_12_00 -- -- Remove existing Durotar Herbalism Nodes: DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN 498 AND 501; From e4eb789e5243457476fd559849519a9bfff481fd Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:16:59 +0300 Subject: [PATCH 231/340] fix(Script/Spells): Script Priest Heal T4 4P Bonus (#17490) * fix(Core/Spells): Script Priest Heal T4 4P Bonus * RemoveAurasDueToSpell * comment out unused stuff --- .../rev_1697102499836430200.sql | 7 ++++++ src/server/scripts/Spells/spell_priest.cpp | 24 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697102499836430200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697102499836430200.sql b/data/sql/updates/pending_db_world/rev_1697102499836430200.sql new file mode 100644 index 00000000000000..c1c96e14bc9537 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697102499836430200.sql @@ -0,0 +1,7 @@ +-- 37565 - Flexibility | Item - Priest T4 Holy/Discipline 4P Bonus +DELETE FROM `spell_script_names` WHERE `spell_id`=37565; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (37565, 'spell_pri_t4_4p_bonus'); + +DELETE FROM `spell_proc_event` WHERE `entry`=37565; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(37565, 0, 6, 4096, 0, 0, 16384, 0, 1, 0, 0, 0); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index c5dc9dd0cacd61..14deba6160fb43 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -48,6 +48,7 @@ enum PriestSpells SPELL_PRIEST_SHADOW_WORD_DEATH = 32409, SPELL_PRIEST_T9_HEALING_2P = 67201, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085, + SPELL_PRIEST_T4_4P_FLEXIBILITY = 37565, SPELL_GENERIC_ARENA_DAMPENING = 74410, SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411, @@ -926,6 +927,28 @@ class spell_pri_mind_control : public AuraScript } }; +// 37565 - Flexibility | Item - Priest T4 Holy/Discipline 4P Bonus +class spell_pri_t4_4p_bonus : public AuraScript +{ + PrepareAuraScript(spell_pri_t4_4p_bonus); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PRIEST_T4_4P_FLEXIBILITY }); + } + + void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + GetTarget()->RemoveAurasDueToSpell(SPELL_PRIEST_T4_4P_FLEXIBILITY); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_pri_t4_4p_bonus::HandleProc, EFFECT_ALL, SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); + } +}; + void AddSC_priest_spell_scripts() { RegisterSpellScript(spell_pri_shadowfiend_scaling); @@ -949,4 +972,5 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_shadow_word_death); RegisterSpellScript(spell_pri_vampiric_touch); RegisterSpellScript(spell_pri_mind_control); + RegisterSpellScript(spell_pri_t4_4p_bonus); } From 1caaed389952f6d5b9dbf531615bec2a71d49749 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:17:28 +0300 Subject: [PATCH 232/340] fix(DB/Spell): Correct Charred Twilight Scale ICD. (#17409) * fix(DB/Spell): Charred Twilight Scale (Normal) missing no icd. * fix hc icd --- .../updates/pending_db_world/rev_1696375442482086300.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696375442482086300.sql diff --git a/data/sql/updates/pending_db_world/rev_1696375442482086300.sql b/data/sql/updates/pending_db_world/rev_1696375442482086300.sql new file mode 100644 index 00000000000000..7369a16ebdc3d7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696375442482086300.sql @@ -0,0 +1,7 @@ +-- Item - Chamber of Aspects 25 Nuker Trinket +DELETE FROM `spell_proc_event` WHERE `entry` = 75465; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(75465,0,0,0,0,0,0,0,0,0,0,45000); + +-- Item - Chamber of Aspects 25 Heroic Nuker Trinket +UPDATE `spell_proc_event` SET `Cooldown` = 45000 WHERE `entry` = 75474; From 28d096e7c7d15773f54340bb5113ab50fd600ecc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Oct 2023 13:18:11 +0000 Subject: [PATCH 233/340] chore(DB): import pending files Referenced commit(s): e4eb789e5243457476fd559849519a9bfff481fd --- .../rev_1696375442482086300.sql => db_world/2023_10_12_01.sql} | 1 + .../rev_1697102499836430200.sql => db_world/2023_10_12_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1696375442482086300.sql => db_world/2023_10_12_01.sql} (91%) rename data/sql/updates/{pending_db_world/rev_1697102499836430200.sql => db_world/2023_10_12_02.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1696375442482086300.sql b/data/sql/updates/db_world/2023_10_12_01.sql similarity index 91% rename from data/sql/updates/pending_db_world/rev_1696375442482086300.sql rename to data/sql/updates/db_world/2023_10_12_01.sql index 7369a16ebdc3d7..3425796661766a 100644 --- a/data/sql/updates/pending_db_world/rev_1696375442482086300.sql +++ b/data/sql/updates/db_world/2023_10_12_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_12_00 -> 2023_10_12_01 -- Item - Chamber of Aspects 25 Nuker Trinket DELETE FROM `spell_proc_event` WHERE `entry` = 75465; INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1697102499836430200.sql b/data/sql/updates/db_world/2023_10_12_02.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1697102499836430200.sql rename to data/sql/updates/db_world/2023_10_12_02.sql index c1c96e14bc9537..af24c967f81664 100644 --- a/data/sql/updates/pending_db_world/rev_1697102499836430200.sql +++ b/data/sql/updates/db_world/2023_10_12_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_12_01 -> 2023_10_12_02 -- 37565 - Flexibility | Item - Priest T4 Holy/Discipline 4P Bonus DELETE FROM `spell_script_names` WHERE `spell_id`=37565; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (37565, 'spell_pri_t4_4p_bonus'); From b3a9f5bef044ec72f43734c9f5f436b02b2faa44 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:19:14 +0300 Subject: [PATCH 234/340] fix(DB/Quests): The Test of Righteousness required quests. (#17471) * fix(DB/Quests): The Test of Righteousness required quests. * nice bait wowhead --- data/sql/updates/pending_db_world/rev_1696874480394168100.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696874480394168100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696874480394168100.sql b/data/sql/updates/pending_db_world/rev_1696874480394168100.sql new file mode 100644 index 00000000000000..06eb18749ac285 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696874480394168100.sql @@ -0,0 +1,2 @@ +-- Seeking the Kor Gem, Bailor's Ore Shipment +UPDATE `quest_template_addon` SET `PrevQuestID` = 1653 WHERE `ID` IN (1442,1655); From 0a6d6f5cd783c237b048495c94f2b94465761815 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Oct 2023 13:19:35 +0000 Subject: [PATCH 235/340] chore(DB): import pending files Referenced commit(s): 28d096e7c7d15773f54340bb5113ab50fd600ecc --- .../rev_1696874480394168100.sql => db_world/2023_10_12_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696874480394168100.sql => db_world/2023_10_12_03.sql} (74%) diff --git a/data/sql/updates/pending_db_world/rev_1696874480394168100.sql b/data/sql/updates/db_world/2023_10_12_03.sql similarity index 74% rename from data/sql/updates/pending_db_world/rev_1696874480394168100.sql rename to data/sql/updates/db_world/2023_10_12_03.sql index 06eb18749ac285..159bffee92347c 100644 --- a/data/sql/updates/pending_db_world/rev_1696874480394168100.sql +++ b/data/sql/updates/db_world/2023_10_12_03.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_12_02 -> 2023_10_12_03 -- Seeking the Kor Gem, Bailor's Ore Shipment UPDATE `quest_template_addon` SET `PrevQuestID` = 1653 WHERE `ID` IN (1442,1655); From 62ef0db09f5f859e60208d6ab25f9f847073af1e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:19:21 +0300 Subject: [PATCH 236/340] fix(Scripts/Karazhan): Side Enterance Door check (#17493) --- .../scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 0fe84199bd3d54..a6dfff1c65d37e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -374,9 +374,9 @@ class instance_karazhan : public InstanceMapScript case GO_SIDE_ENTRANCE_DOOR: m_uiSideEntranceDoor = go->GetGUID(); if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE) - go->SetGameObjectFlag(GO_FLAG_LOCKED); - else go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + else + go->SetGameObjectFlag(GO_FLAG_LOCKED); break; case GO_DUST_COVERED_CHEST: DustCoveredChest = go->GetGUID(); From 7d6a578892a6be892248d989eeb96284b0014b6c Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 12 Oct 2023 22:19:50 +0300 Subject: [PATCH 237/340] fix(DB/SAI): Port Guile of the Raptor RP from Trinity. (#17412) Co-Authored-By: Carlos Morales --- .../pending_db_world/rev_1696402821792959500.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696402821792959500.sql diff --git a/data/sql/updates/pending_db_world/rev_1696402821792959500.sql b/data/sql/updates/pending_db_world/rev_1696402821792959500.sql new file mode 100644 index 00000000000000..b22450be069e63 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696402821792959500.sql @@ -0,0 +1,11 @@ +-- Gor'mul RP +DELETE FROM `smart_scripts` WHERE `entryorguid` = 2792 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 279200 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(2792, 0, 0, 0, 20, 0, 100, 0, 702, 0, 0, 0, 0, 0, 80, 279200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Quest \'Guile of the Raptor (Part 2)\' finished - Run Script'), +(279200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Remove Npc Flag Questgiver'), +(279200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 4153, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Cast Guile of the Raptor'), +(279200, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 0'), +(279200, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 1'), +(279200, 9, 4, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 2'), +(279200, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Add Npc Flag Questgiver'); From 608f1c92fad0d418a0b70f90905ea93a14f70148 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Oct 2023 19:21:01 +0000 Subject: [PATCH 238/340] chore(DB): import pending files Referenced commit(s): 7d6a578892a6be892248d989eeb96284b0014b6c --- .../rev_1696402821792959500.sql => db_world/2023_10_12_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696402821792959500.sql => db_world/2023_10_12_04.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1696402821792959500.sql b/data/sql/updates/db_world/2023_10_12_04.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1696402821792959500.sql rename to data/sql/updates/db_world/2023_10_12_04.sql index b22450be069e63..c2bd265995fe74 100644 --- a/data/sql/updates/pending_db_world/rev_1696402821792959500.sql +++ b/data/sql/updates/db_world/2023_10_12_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_12_03 -> 2023_10_12_04 -- Gor'mul RP DELETE FROM `smart_scripts` WHERE `entryorguid` = 2792 AND `source_type` = 0; DELETE FROM `smart_scripts` WHERE `entryorguid` = 279200 AND `source_type` = 9; From 314cabd66747409659f0771b6ead3eaf63f0a651 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 15 Oct 2023 15:55:19 +0300 Subject: [PATCH 239/340] fix(DB/Conditions): Fix Paelarin race conditions (#17501) --- .../pending_db_world/rev_1697220792861371500.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697220792861371500.sql diff --git a/data/sql/updates/pending_db_world/rev_1697220792861371500.sql b/data/sql/updates/pending_db_world/rev_1697220792861371500.sql new file mode 100644 index 00000000000000..3a62e0df1619d0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697220792861371500.sql @@ -0,0 +1,10 @@ +-- Paelarin +DELETE FROM `gossip_menu` WHERE (`MenuID` = 7311) AND (`TextID` IN (8679)); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(7311, 8679); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 7311) AND (`SourceEntry` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 7311) AND (`SourceEntry` = 8679); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7311, 0, 0, 0, 16, 0, 128, 0, 0, 1, 0, 0, '', 'Show gossip menu 7311 option 0 only if player is not a troll.'), +(14, 7311, 8679, 0, 0, 16, 0, 128, 0, 0, 0, 0, 0, '', 'Show gossip menu 7311, npc text 8679 only if player race is a troll.'); From d1d46074a6d959d03c54de584db96e893cd0b5c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Oct 2023 12:56:31 +0000 Subject: [PATCH 240/340] chore(DB): import pending files Referenced commit(s): 314cabd66747409659f0771b6ead3eaf63f0a651 --- .../rev_1697220792861371500.sql => db_world/2023_10_15_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697220792861371500.sql => db_world/2023_10_15_00.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1697220792861371500.sql b/data/sql/updates/db_world/2023_10_15_00.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1697220792861371500.sql rename to data/sql/updates/db_world/2023_10_15_00.sql index 3a62e0df1619d0..60c9ff02d1c97b 100644 --- a/data/sql/updates/pending_db_world/rev_1697220792861371500.sql +++ b/data/sql/updates/db_world/2023_10_15_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_12_04 -> 2023_10_15_00 -- Paelarin DELETE FROM `gossip_menu` WHERE (`MenuID` = 7311) AND (`TextID` IN (8679)); INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES From c4dc20a814451a27aef8113e829809a2b6587e3b Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Sun, 15 Oct 2023 08:47:09 -0700 Subject: [PATCH 241/340] refactor(Docker): remove prod container distinction (#17419) * refactor(Docker): remove prod containers * workflows: use buildx * properly set tags * comment in Dockerfile * set docker build context * minor CI changes * CI: docker build args shouldnt have quotes * CI: using matrix and caching is too much work * CI: I hate yaml * CI: It was a typo * CI: extra build removed * CI: appease the linter * fixup! CI: appease the linter * fixup! CI: appease the linter * apps: docker: remove extraneous files --- .../actions/docker-tag-and-build/action.yml | 38 ++ .github/workflows/docker_build.yml | 190 ++++--- .gitignore | 3 +- apps/docker/Dockerfile | 479 +++++++----------- apps/docker/Dockerfile.dev-server | 83 +++ apps/docker/README.md | 40 +- apps/docker/config-docker.sh | 8 - apps/docker/docker-build-dev.sh | 14 - apps/docker/docker-build-prod.sh | 5 - apps/docker/docker-cmd.sh | 74 ++- apps/docker/entrypoint.sh | 22 + docker-compose.yml | 400 ++++----------- 12 files changed, 599 insertions(+), 757 deletions(-) create mode 100644 .github/actions/docker-tag-and-build/action.yml create mode 100644 apps/docker/Dockerfile.dev-server delete mode 100644 apps/docker/config-docker.sh delete mode 100644 apps/docker/docker-build-dev.sh delete mode 100755 apps/docker/docker-build-prod.sh create mode 100644 apps/docker/entrypoint.sh diff --git a/.github/actions/docker-tag-and-build/action.yml b/.github/actions/docker-tag-and-build/action.yml new file mode 100644 index 00000000000000..6a37cb53a15b67 --- /dev/null +++ b/.github/actions/docker-tag-and-build/action.yml @@ -0,0 +1,38 @@ +name: docker tag and build +description: a helper action to shorten generating docker tags and building +inputs: + component-name: + description: name of the component/docker image (eg worldserver, authserver) + type: string + required: true + push: + description: whether to push the image or not + type: boolean + required: true + version: + description: version tag to use for docker image + required: true + type: string +runs: + using: composite + steps: + - name: Get Docker Metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: acore/ac-wotlk-${{ inputs.component-name }} + tags: | + type=raw,value=${{ inputs.version }} + type=ref,event=branch + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ${{ github.workspace }} + file: apps/docker/Dockerfile + push: ${{ inputs.push }} + tags: ${{ steps.meta.outputs.tags }} + build-args: | + USER_ID=1000 + GROUP_ID=1000 + DOCKER_USER=acore diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 2dfc535eba3d4e..b3a9822cb23458 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -4,7 +4,11 @@ on: branches: - 'master' pull_request: - types: ['labeled', 'opened', 'synchronize', 'reopened'] + types: + - labeled + - opened + - synchronize + - reopened concurrency: group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) @@ -12,41 +16,24 @@ concurrency: jobs: docker-build-n-deploy-dev: - strategy: - fail-fast: true - matrix: - os: [ubuntu-20.04] - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" if: | github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') + && (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - - name: Configure + - name: Free up disk space run: | sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "$AGENT_TOOLSDIRECTORY" - docker --version - docker compose version - uses: actions/checkout@v4 - # we need the entire history for the ac-dev-server - # with: - # fetch-depth: 2 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - name: Login to Docker Hub if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' @@ -55,123 +42,116 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build Dev - if: github.repository == 'azerothcore/azerothcore-wotlk' - env: - #DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - DOCKER_CLIENT_TIMEOUT: 400 - COMPOSE_HTTP_TIMEOUT: 400 - run: | - export DOCKER_USER_ID=$(id -u) - export DOCKER_GROUP_ID=$(id -u) - # pull the images first to load the docker cache layers - #./acore.sh docker pull - ./acore.sh docker build - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile dev --profile local build - - - name: Deploy Dev - #env: - # DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + - name: Get version + id: version run: | - docker compose --profile dev --profile local push - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile dev --profile local push + output=$(./acore.sh version | grep "AzerothCore Rev. ") + version=${output#"AzerothCore Rev. "} + echo "version=$version" >> $GITHUB_OUTPUT + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: acore/ac-wotlk-dev-server + tags: | + type=raw,value=${{ steps.version.outputs.version }} + type=ref,event=branch + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ${{ github.workspace }} + file: apps/docker/Dockerfile.dev-server + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + tags: ${{ steps.meta.outputs.tags }} + build-args: | + USER_ID=1000 + GROUP_ID=1000 + DOCKER_USER=acore + + # TODO: rename this job docker-build-n-deploy-prod: - strategy: - fail-fast: true - matrix: - os: [ubuntu-20.04] - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" if: | github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') + && (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - - name: Configure + - name: Free up disk space run: | sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "$AGENT_TOOLSDIRECTORY" - docker --version - docker compose version - uses: actions/checkout@v4 - # we need the entire history for the ac-dev-server - # with: - # fetch-depth: 2 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - name: Login to Docker Hub - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Cache - uses: actions/cache@v3 - with: - path: var/docker/ccache - key: ccache:${{ matrix.os }}:clang:without-modules:${{ github.ref }}:${{ github.sha }} - restore-keys: | - ccache:${{ matrix.os }}:clang:without-modules:${{ github.ref }} - ccache:${{ matrix.os }}:clang:without-modules - - - name: Build Production images - if: github.repository == 'azerothcore/azerothcore-wotlk' - env: - #DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - DOCKER_CLIENT_TIMEOUT: 220 - COMPOSE_HTTP_TIMEOUT: 220 - run: | - export DOCKER_USER_ID=$(id -u) - export DOCKER_GROUP_ID=$(id -u) - # pull the images first to load the docker cache layers - #./acore.sh docker prod:pull - ./acore.sh docker prod:build - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version ./acore.sh docker prod:build - # create the container to allow the copy right after - docker compose create ac-build-prod - docker compose cp ac-build-prod:/azerothcore/var/ccache var/docker/ - echo "ccache exported" - - - name: Deploy Production images - #env: - # DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + - name: Get version + id: version run: | - docker compose --profile prod push - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile prod push + output=$(./acore.sh version | grep "AzerothCore Rev. ") + version=${output#"AzerothCore Rev. "} + echo "version=$version" >> $GITHUB_OUTPUT + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: build worldserver + uses: ./.github/actions/docker-tag-and-build + with: + component-name: worldserver + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + - name: build authserver + uses: ./.github/actions/docker-tag-and-build + with: + component-name: authserver + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + + - name: build db-import + uses: ./.github/actions/docker-tag-and-build + with: + component-name: db-import + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + + - name: build client-data + uses: ./.github/actions/docker-tag-and-build + with: + component-name: client-data + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + + - name: build tools + uses: ./.github/actions/docker-tag-and-build + with: + component-name: tools + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} dispatch-acore-docker: needs: [ docker-build-n-deploy-prod , docker-build-n-deploy-dev] runs-on: ubuntu-latest steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Repository Dispatch - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }} diff --git a/.gitignore b/.gitignore index e9f55da7703b33..92e08b0b14ad4e 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,8 @@ /src/server/scripts/Custom/* !/src/server/scripts/Custom/README.md -/docker-compose.override.yml +/*.override.yml +/*.override.yaml !.gitkeep diff --git a/apps/docker/Dockerfile b/apps/docker/Dockerfile index 358a7b2a9f5514..61643260725e3f 100644 --- a/apps/docker/Dockerfile +++ b/apps/docker/Dockerfile @@ -1,344 +1,255 @@ -#syntax=docker/dockerfile:1.2 - -#================================================================ -# -# DEV: Stage used for the development environment -# and the locally built services -# -#================================================================= - -FROM ubuntu:20.04 as base -ARG USER_ID=1000 -ARG GROUP_ID=1000 -ARG DOCKER_USER=acore - -LABEL description="AC base image for dev containers" - -# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones - -ENV DOCKER=1 - -# Ensure ac-dev-server can properly pull versions -ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - -# set timezone environment variable -ENV TZ=Etc/UTC - -# set noninteractive mode so tzdata doesn't ask to set timezone on install -ENV DEBIAN_FRONTEND=noninteractive - -# Do not use acore dashboard to install -# since it's not cacheable by docker -RUN apt-get update && apt-get install -y gdb gdbserver git dos2unix lsb-core sudo curl unzip \ - make cmake clang libmysqlclient-dev \ - libboost-system1.7*-dev libboost-filesystem1.7*-dev libboost-program-options1.7*-dev libboost-iostreams1.7*-dev \ - build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \ - libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \ - libncurses5-dev ccache \ - && rm -rf /var/lib/apt/lists/* - -# Ensure git will work with the AzerothCore source directory -RUN git config --global --add safe.directory /azerothcore - -# change timezone in container -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata - -# Create a non-root user -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ - passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers - -# must be created to set the correct permissions on them -RUN mkdir -p /azerothcore/env/dist/bin -RUN mkdir -p /azerothcore/env/dist/data/Cameras -RUN mkdir -p /azerothcore/env/dist/data/dbc -RUN mkdir -p /azerothcore/env/dist/data/maps -RUN mkdir -p /azerothcore/env/dist/data/mmaps -RUN mkdir -p /azerothcore/env/dist/data/vmaps -RUN mkdir -p /azerothcore/env/dist/logs -RUN mkdir -p /azerothcore/env/dist/temp -RUN mkdir -p /azerothcore/env/dist/etc -RUN mkdir -p /azerothcore/var/build/obj - -# Correct permissions for non-root operations -RUN chown -R $DOCKER_USER:$DOCKER_USER /home/acore -RUN chown -R $DOCKER_USER:$DOCKER_USER /run -RUN chown -R $DOCKER_USER:$DOCKER_USER /opt -RUN chown -R $DOCKER_USER:$DOCKER_USER /azerothcore - -USER $DOCKER_USER - -# copy only necessary files for the acore dashboard -COPY --chown=$DOCKER_USER:$DOCKER_USER apps /azerothcore/apps -COPY --chown=$DOCKER_USER:$DOCKER_USER bin /azerothcore/bin -COPY --chown=$DOCKER_USER:$DOCKER_USER conf /azerothcore/conf -COPY --chown=$DOCKER_USER:$DOCKER_USER data /azerothcore/data -COPY --chown=$DOCKER_USER:$DOCKER_USER deps /azerothcore/deps -COPY --chown=$DOCKER_USER:$DOCKER_USER acore.json /azerothcore/acore.json -COPY --chown=$DOCKER_USER:$DOCKER_USER acore.sh /azerothcore/acore.sh - -# Download deno and make sure the dashboard works -RUN bash /azerothcore/acore.sh quit +ARG UBUNTU_VERSION=22.04 # lts +ARG TZ=Etc/UTC + +# This target lays out the general directory skeleton for AzerothCore, +# This target isn't intended to be directly used +FROM ubuntu:$UBUNTU_VERSION as skeleton + +ARG DOCKER=1 +ARG DEBIAN_FRONTEND=noninteractive + +ENV TZ=$TZ +ENV AC_FORCE_CREATE_DB=1 + +RUN mkdir -pv \ + /azerothcore/bin \ + /azerothcore/data \ + /azerothcore/deps \ + /azerothcore/env/dist/bin \ + /azerothcore/env/dist/data/Cameras \ + /azerothcore/env/dist/data/dbc \ + /azerothcore/env/dist/data/maps \ + /azerothcore/env/dist/data/mmaps \ + /azerothcore/env/dist/data/vmaps \ + /azerothcore/env/dist/logs \ + /azerothcore/env/dist/temp \ + /azerothcore/env/dist/etc \ + /azerothcore/modules \ + /azerothcore/src \ + /azerothcore/build + +# Configure Timezone +RUN apt-get update \ + && apt-get install -y tzdata ca-certificates \ + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone \ + && dpkg-reconfigure --frontend noninteractive tzdata WORKDIR /azerothcore -#================================================================ -# -# Dev: create dev server image -# -#================================================================= - -FROM base as dev +# This target builds the docker image +# This target can be useful to inspect the explicit outputs from the build, +FROM skeleton as build + +ARG CTOOLS_BUILD="all" +ARG CTYPE="RelWithDebInfo" +ARG CCACHE_CPP2="true" +ARG CSCRIPTPCH="OFF" +ARG CSCRIPTS="static" +ARG CMODULES="static" +ARG CSCRIPTS_DEFAULT_LINKAGE="static" +ARG CWITH_WARNINGS="ON" +ARG CMAKE_EXTRA_OPTIONS="" +ARG GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + +ARG CCACHE_DIR="/ccache" +ARG CCACHE_MAXSIZE="1000MB" +ARG CCACHE_SLOPPINESS="pch_defines,time_macros,include_file_mtime" +ARG CCACHE_COMPRESS="" +ARG CCACHE_COMPRESSLEVEL="9" +ARG CCACHE_COMPILERCHECK="content" +ARG CCACHE_LOGFILE="" + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential ccache libtool cmake-data make cmake clang \ + git lsb-base curl unzip default-mysql-client openssl \ + default-libmysqlclient-dev libboost-all-dev libssl-dev libmysql++-dev \ + libreadline-dev zlib1g-dev libbz2-dev libncurses5-dev \ + && rm -rf /var/lib/apt/lists/* + +COPY CMakeLists.txt /azerothcore/CMakeLists.txt +COPY conf /azerothcore/conf +COPY deps /azerothcore/deps +COPY src /azerothcore/src +COPY modules /azerothcore/modules -LABEL description="AC dev image for dev containers" - -USER $DOCKER_USER - -# copy everything so we can work directly within the container -# using tools such as vscode dev-container -# NOTE: this folder is different by the /azerothcore (which is binded instead) -COPY --chown=$DOCKER_USER:$DOCKER_USER . /azerothcore - -#================================================================ -# -# SERVICE BASE: prepare the OS for the production-ready services -# -#================================================================= +ARG CACHEBUST=1 -FROM ubuntu:20.04 as servicebase +WORKDIR /azerothcore/build + +RUN --mount=type=cache,target=/ccache,sharing=locked \ + # This may seem silly (and it is), but AzerothCore wants the git repo at + # build time. The git repo is _huge_ and it's not something that really + # makes sense to mount into the container, but this way we can let the build + # have the information it needs without including the hundreds of megabytes + # of git repo into the container. + --mount=type=bind,target=/azerothcore/.git,source=.git \ + git config --global --add safe.directory /azerothcore \ + && cmake /azerothcore \ + -DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" \ + -DAPPS_BUILD="all" \ + -DTOOLS_BUILD="$CTOOLS_BUILD" \ + -DSCRIPTS="$CSCRIPTS" \ + -DMODULES="$CMODULES" \ + -DWITH_WARNINGS="$CWITH_WARNINGS" \ + -DCMAKE_BUILD_TYPE="$CTYPE" \ + -DCMAKE_CXX_COMPILER="clang++" \ + -DCMAKE_C_COMPILER="clang" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DBoost_USE_STATIC_LIBS="ON" \ + && cmake --build . --config "$CTYPE" -j $(($(nproc) + 1)) \ + && cmake --install . --config "$CTYPE" + +############################# +# Base runtime for services # +############################# + +FROM skeleton as runtime ARG USER_ID=1000 ARG GROUP_ID=1000 ARG DOCKER_USER=acore -LABEL description="AC service image for server applications" - -# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones +ENV ACORE_COMPONENT=undefined -# set timezone environment variable -ENV TZ=Etc/UTC +# Install base dependencies for azerothcore +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libmysqlclient21 libreadline8 \ + gettext-base default-mysql-client && \ + rm -rf /var/lib/apt/lists/* -# set noninteractive mode so tzdata doesn't ask to set timezone on install -ENV DEBIAN_FRONTEND=noninteractive +COPY --from=build /azerothcore/env/dist/etc/ /azerothcore/env/ref/etc -# Create a non-root user -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ - passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers - -# install the required dependencies to run the server -RUN apt-get update && apt-get install -y dos2unix gdb gdbserver google-perftools libgoogle-perftools-dev net-tools \ - libboost-system1.7*-dev libboost-filesystem1.7*-dev libboost-program-options1.7*-dev libboost-iostreams1.7*-dev \ - tzdata libmysqlclient-dev mysql-client curl unzip && rm -rf /var/lib/apt/lists/* ; +VOLUME /azerothcore/env/dist/etc -# change timezone in container -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata +ENV PATH="/azerothcore/env/dist/bin:$PATH" -# Correct permissions for non-root operations -RUN chown -R $DOCKER_USER:$DOCKER_USER /home/acore -RUN chown -R $DOCKER_USER:$DOCKER_USER /run -RUN chown -R $DOCKER_USER:$DOCKER_USER /opt +RUN groupadd --gid "$GROUP_ID" "$DOCKER_USER" && \ + useradd -d /azerothcore --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ + passwd -d "$DOCKER_USER" && \ + chown -R "$DOCKER_USER:$DOCKER_USER" /azerothcore -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=base /azerothcore /azerothcore +COPY apps/docker/entrypoint.sh /entrypoint.sh +RUN chmod -v +x /entrypoint.sh USER $DOCKER_USER -# must be created to avoid permissions errors -RUN mkdir -p /azerothcore/env/dist/data/Cameras -RUN mkdir -p /azerothcore/env/dist/data/dbc -RUN mkdir -p /azerothcore/env/dist/data/maps -RUN mkdir -p /azerothcore/env/dist/data/mmaps -RUN mkdir -p /azerothcore/env/dist/data/vmaps -RUN mkdir -p /azerothcore/env/dist/logs -RUN mkdir -p /azerothcore/env/dist/etc -RUN mkdir -p /azerothcore/env/dist/bin +ENTRYPOINT ["/entrypoint.sh"] -# Download deno and make sure the dashboard works -RUN bash /azerothcore/acore.sh quit +############### +# Auth Server # +############### -WORKDIR /azerothcore/ +FROM runtime as authserver +LABEL description "AzerothCore Auth Server" -#================================================================ -# -# AUTH & WORLD local: images used for local services -# These images don't include binaries by default -# -#================================================================= +ENV ACORE_COMPONENT=authserver +# Don't run database migrations. We can leave that up to the db-import container +ENV AC_UPDATES_ENABLE_DATABASES=0 +# This disables user prompts. The console is still active, however +ENV AC_DISABLE_INTERACTIVE=1 +ENV AC_CLOSE_IDLE_CONNECTIONS=0 -FROM servicebase as authserver-local +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + --from=build \ + /azerothcore/env/dist/bin/authserver /azerothcore/env/dist/bin/authserver -LABEL description="AC authserver image for local environment" -CMD ./acore.sh run-authserver +CMD ["authserver"] -USER $DOCKER_USER +################ +# World Server # +################ -FROM servicebase as worldserver-local +FROM runtime as worldserver -LABEL description="AC worldserver image for local environment" - -CMD ./acore.sh run-worldserver - -USER $DOCKER_USER +LABEL description "AzerothCore World Server" -#================================================================ -# -# BUILD: compile sources -# -#================================================================= -FROM base as build +ENV ACORE_COMPONENT=worldserver +# Don't run database migrations. We can leave that up to the db-import container +ENV AC_UPDATES_ENABLE_DATABASES=0 +# This disables user prompts. The console is still active, however +ENV AC_DISABLE_INTERACTIVE=1 +ENV AC_CLOSE_IDLE_CONNECTIONS=0 -ARG DOCKER_USER=acore -USER $DOCKER_USER +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + --from=build \ + /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver -LABEL description="AC Image used by the build stage to generate production images" - -RUN mkdir -p /azerothcore/env/etc/ - -# .git is needed by the compiler -COPY --chown=$DOCKER_USER:$DOCKER_USER ./.git /azerothcore/.git -COPY --chown=$DOCKER_USER:$DOCKER_USER ./CMakeLists.txt /azerothcore/CMakeLists.txt -COPY --chown=$DOCKER_USER:$DOCKER_USER ./deps /azerothcore/deps -COPY --chown=$DOCKER_USER:$DOCKER_USER ./src /azerothcore/src -COPY --chown=$DOCKER_USER:$DOCKER_USER ./modules /azerothcore/modules -# check if we have ccache files available outside -RUN rm -rf /azerothcore/var/ccache/* -COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache - -# install eluna -RUN git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna.git /azerothcore/modules/mod-eluna - -ENV USER_CONF_PATH=/azerothcore/apps/docker/config-docker.sh -ENV CTYPE=RelWithDebInfo -ENV AC_CCACHE=true -ENV CCACHE_CPP2=true -ENV CSCRIPTPCH=OFF -ENV CCOREPCH=OFF -ENV CTOOLS_BUILD=all -# ENV CTOOLS_BUILD=maps-only -ENV CSCRIPTS=static -RUN bash apps/docker/docker-build-prod.sh - -#================================================================ -# -# AUTH SERVICE: create a ready-to-use authserver image -# with binaries included -# -#================================================================= -FROM authserver-local as authserver - -LABEL description="AC Production: authserver" +VOLUME /azerothcore/env/dist/etc -ARG DOCKER_USER=acore -USER $DOCKER_USER +CMD ["worldserver"] -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/etc /azerothcore/env/dist/etc -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/authserver /azerothcore/env/dist/bin/authserver +############# +# DB Import # +############# -#================================================================ -# -# WORLD SERVICE: create a ready-to-use worldserver image -# with binaries and data included -# -#================================================================= -FROM worldserver-local as worldserver +FROM runtime as db-import -LABEL description="AC Production: worldserver" +LABEL description "AzerothCore Database Import tool" -ARG DOCKER_USER=acore USER $DOCKER_USER -RUN mkdir -p /azerothcore/env/dist/bin/lua_scripts -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/etc /azerothcore/env/dist/etc -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/lua_scripts /azerothcore/env/dist/bin/lua_scripts -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/dbimport /azerothcore/env/dist/bin/dbimport +ENV ACORE_COMPONENT=dbimport -#================================================================ -# -# CLIENT DATA -# -#================================================================= +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + data data -FROM ubuntu:20.04 as client-data -ARG USER_ID=1000 -ARG GROUP_ID=1000 -ARG DOCKER_USER=acore - -LABEL description="AC Production: client-data" +COPY --chown=$DOCKER_USER:$DOCKER_USER\ + --from=build \ + /azerothcore/env/dist/bin/dbimport /azerothcore/env/dist/bin/dbimport -RUN apt-get update && apt-get install -y tzdata curl unzip && rm -rf /var/lib/apt/lists/* ; +CMD /azerothcore/env/dist/bin/dbimport -# set timezone environment variable -ENV TZ=Etc/UTC +############### +# Client Data # +############### -# set noninteractive mode so tzdata doesn't ask to set timezone on install -ENV DEBIAN_FRONTEND=noninteractive +FROM skeleton as client-data -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ - passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers +LABEL description="AzerothCore client-data" -# ENV DATAPATH=/azerothcore/env/dist/data-temp ENV DATAPATH=/azerothcore/env/dist/data -ENV DATAPATH_ZIP=/tmp/data.zip -RUN mkdir -p "$DATAPATH" -ARG CACHEBUST=1 -# RUN --mount=type=bind,target=/azerothcore-temp,readwrite --mount=type=cache,target=/azerothcore/env/dist/data-temp /azerothcore-temp/acore.sh client-data && cp -rT /azerothcore/env/dist/data-temp/ /azerothcore/env/dist/data && chown -R $DOCKER_USER:$DOCKER_USER /azerothcore -RUN --mount=type=bind,target=/azerothcore-temp,readwrite /azerothcore-temp/acore.sh client-data && chown -R $DOCKER_USER:$DOCKER_USER /azerothcore +RUN apt-get update && \ + apt-get install -y curl unzip && \ + rm -rf /var/lib/apt/lists/* -USER $DOCKER_USER +COPY --chown=$DOCKER_USER:$DOCKER_USER apps apps -#================================================================ -# -# TOOLS -# -#================================================================= +VOLUME /azerothcore/env/dist/data -FROM ubuntu:20.04 as tools -ARG USER_ID=1000 -ARG GROUP_ID=1000 -ARG DOCKER_USER=acore - -LABEL description="AC Production: tools" - -# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones +USER $DOCKER_USER -# set timezone environment variable -ENV TZ=Etc/UTC +CMD bash -c "source /azerothcore/apps/installer/includes/functions.sh && inst_download_client_data" -# set noninteractive mode so tzdata doesn't ask to set timezone on install -ENV DEBIAN_FRONTEND=noninteractive +################## +# Map Extractors # +################## -RUN apt-get update && apt-get install -y libmysqlclient-dev libssl-dev libbz2-dev \ - libboost-system1.7*-dev libboost-filesystem1.7*-dev libboost-program-options1.7*-dev libboost-iostreams1.7*-dev \ - sudo && rm -rf /var/lib/apt/lists/* ; +FROM runtime as tools -# Create a non-root user -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ - passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers +LABEL description "AzerothCore Tools" -RUN mkdir -p /azerothcore/env/client/ -RUN chown -R $DOCKER_USER:$DOCKER_USER /azerothcore +WORKDIR /azerothcore/env/dist/ -USER $DOCKER_USER +RUN mkdir -pv /azerothcore/env/dist/Cameras \ + /azerothcore/env/dist/dbc \ + /azerothcore/env/dist/maps \ + /azerothcore/env/dist/mmaps \ + /azerothcore/env/dist/vmaps -WORKDIR /azerothcore/env/client/ +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/map_extractor /azerothcore/env/dist/map_extractor -RUN mkdir -p /azerothcore/env/client/Cameras -RUN mkdir -p /azerothcore/env/client/dbc -RUN mkdir -p /azerothcore/env/client/maps -RUN mkdir -p /azerothcore/env/client/mmaps -RUN mkdir -p /azerothcore/env/client/vmaps +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/dist/mmaps_generator -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/map_extractor /azerothcore/env/client/map_extractor -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/client/mmaps_generator -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/client/vmap4_assembler -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/client/vmap4_extractor +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/dist/vmap4_assembler +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/vmap4_extractor diff --git a/apps/docker/Dockerfile.dev-server b/apps/docker/Dockerfile.dev-server new file mode 100644 index 00000000000000..8924c4688dad55 --- /dev/null +++ b/apps/docker/Dockerfile.dev-server @@ -0,0 +1,83 @@ +#syntax=docker/dockerfile:1.2 + +#================================================================ +# +# DEV: Stage used for the development environment +# and the locally built services +# +#================================================================= + +FROM ubuntu:22.04 as dev +ARG USER_ID=1000 +ARG GROUP_ID=1000 +ARG DOCKER_USER=acore +ARG TZ=Etc/UTC + +LABEL description="AC base image for dev containers" + +# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +ENV DOCKER=1 + +# Ensure ac-dev-server can properly pull versions +ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + +# set timezone environment variable +ENV TZ=$TZ + +# set noninteractive mode so tzdata doesn't ask to set timezone on install +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y \ + gdb gdbserver git dos2unix lsb-core sudo curl unzip \ + make cmake clang libmysqlclient-dev libboost-all-dev \ + build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \ + libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \ + libncurses5-dev ccache tzdata \ + && rm -rf /var/lib/apt/lists/* + +# Ensure git will work with the AzerothCore source directory +RUN git config --global --add safe.directory /azerothcore + +# change timezone in container +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata + +# Create a non-root user +RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ + adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ + passwd -d "$DOCKER_USER" && \ + echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers + +# must be created to set the correct permissions on them +RUN mkdir -p \ + /azerothcore/env/dist/bin \ + /azerothcore/env/dist/data/Cameras \ + /azerothcore/env/dist/data/dbc \ + /azerothcore/env/dist/data/maps \ + /azerothcore/env/dist/data/mmaps \ + /azerothcore/env/dist/data/vmaps \ + /azerothcore/env/dist/logs \ + /azerothcore/env/dist/temp \ + /azerothcore/env/dist/etc \ + /azerothcore/var/build/obj + +# Correct permissions for non-root operations +RUN chown -R $DOCKER_USER:$DOCKER_USER /home/acore /run /opt /azerothcore + +USER $DOCKER_USER + +# copy only necessary files for the acore dashboard +COPY --chown=$DOCKER_USER:$DOCKER_USER apps /azerothcore/apps +COPY --chown=$DOCKER_USER:$DOCKER_USER bin /azerothcore/bin +COPY --chown=$DOCKER_USER:$DOCKER_USER conf /azerothcore/conf +COPY --chown=$DOCKER_USER:$DOCKER_USER data /azerothcore/data +COPY --chown=$DOCKER_USER:$DOCKER_USER deps /azerothcore/deps +COPY --chown=$DOCKER_USER:$DOCKER_USER acore.json /azerothcore/acore.json +COPY --chown=$DOCKER_USER:$DOCKER_USER acore.sh /azerothcore/acore.sh + +# Download deno and make sure the dashboard works +RUN bash /azerothcore/acore.sh quit + +WORKDIR /azerothcore diff --git a/apps/docker/README.md b/apps/docker/README.md index 80cd4fa10022e9..546cbbfaa6d726 100644 --- a/apps/docker/README.md +++ b/apps/docker/README.md @@ -1,27 +1,41 @@ -# Run AzerothCore with Docker +# Docker -*This readme it's a summary of the AzerothCore docker features.* +Full documentation is [on our wiki](https://www.azerothcore.org/wiki/install-with-docker#installation) -Docker. is a software that performs operating-system-level virtualization, allowing to wrap and launch applications inside containers. +## Building -Thanks to Docker, you can quickly setup and run AzerothCore in any operating system. +### Prerequisites -The **only** requirement is having [Docker](https://docs.docker.com/install/) installed into your system. Forget about installing mysql, visual studio, cmake, etc... +Ensure that you have docker, docker compose (v2), and the docker buildx command +installed. -### Installation instructions +It's all bundled with [Docker Desktop](https://docs.docker.com/get-docker/), +though if you're using Linux you can install them through your distribution's +package manage or by using the [documentation from docker](https://docs.docker.com/engine/install/) -Check the [Install with Docker](https://www.azerothcore.org/wiki/Install-with-Docker) guide. +### Running the Build -### Memory usage +1. Build containers with command -The total amount of RAM when running all AzerothCore docker containers is **less than 2 GB**. +```console +$ docker compose build +``` -![AzerothCore containers memory](https://user-images.githubusercontent.com/75517/51078287-10e65b80-16b3-11e9-807f-f59a5844dae5.png) + 1. Note that the initial build will take a long time, though subsequent builds should be faster +2. Start containers with command -### Docker containers vs Virtual machines +```console +$ docker compose up -d +# Skip the build step +$ docker compose up -d --build +``` -Using Docker will have the same benefits as using virtual machines, but with much less overhead: + 1. Note that this command may take a while the first time, for the database import -![Docker containers vs Virtual machines](https://user-images.githubusercontent.com/75517/51078179-d4fec680-16b1-11e9-8ce6-87b5053f55dd.png) +3. (on first install) You'll need to attach to the worldserver and create an Admin account +```console +$ docker compose attach ac-worldserver +AC> account create admin password 3 -1 +``` diff --git a/apps/docker/config-docker.sh b/apps/docker/config-docker.sh deleted file mode 100644 index 7f5482480d581e..00000000000000 --- a/apps/docker/config-docker.sh +++ /dev/null @@ -1,8 +0,0 @@ -CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -CTOOLS_BUILD=all - -# allow the user to override configs -if [ -f "$AC_PATH_CONF/config.sh" ]; then - source "$AC_PATH_CONF/config.sh" # should overwrite previous -fi diff --git a/apps/docker/docker-build-dev.sh b/apps/docker/docker-build-dev.sh deleted file mode 100644 index ced35c437d1912..00000000000000 --- a/apps/docker/docker-build-dev.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -source "$CUR_PATH/docker-build-prod.sh" - -echo "Fixing EOL..." -# using -n (new file mode) should also fix the issue -# when the file is created with the default acore user but you -# set a different user into the docker configurations -for file in "env/dist/etc/"* -do - dos2unix -n $file $file -done diff --git a/apps/docker/docker-build-prod.sh b/apps/docker/docker-build-prod.sh deleted file mode 100755 index 07a42474b4eda5..00000000000000 --- a/apps/docker/docker-build-prod.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -cd /azerothcore - -bash acore.sh compiler build diff --git a/apps/docker/docker-cmd.sh b/apps/docker/docker-cmd.sh index 3a75174adc9e62..c3b61a067e8e56 100644 --- a/apps/docker/docker-cmd.sh +++ b/apps/docker/docker-cmd.sh @@ -54,7 +54,7 @@ while [[ $# -gt 0 ]]; do case "$1" in start:app) set -x - docker compose --profile app up + docker compose up set +x # pop the head off of the queue of args # After this, the value of $1 is the value of $2 @@ -63,102 +63,138 @@ while [[ $# -gt 0 ]]; do start:app:d) set -x - docker compose --profile app up -d + docker compose up -d set +x shift ;; build) set -x - docker compose --profile local --profile dev --profile dev-build build - docker compose --profile dev-build run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh + docker compose build set +x shift ;; pull) set -x - docker compose --profile local --profile dev --profile dev-build pull + docker compose pull set +x shift ;; build:nocache) set -x - docker compose --profile local --profile dev --profile dev-build build --no-cache - docker compose run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh + docker compose build --no-cache set +x shift ;; clean:build) set -x - docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean - docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean + # Don't run 'docker buildx prune' since it may "escape" our bubble + # and affect other projects on the user's workstation/server + cat < https://docs.docker.com/engine/reference/commandline/buildx_prune/ +EOF set +x shift ;; client-data) set -x - docker compose run --rm --no-deps ac-dev-server bash acore.sh client-data + docker compose up ac-client-data-init set +x shift ;; dev:up) set -x - docker compose up -d ac-dev-server + docker compose --profile dev up ac-dev-server -d set +x shift ;; dev:build) set -x - docker compose run --rm ac-dev-server bash acore.sh compiler build + docker compose --profile dev run --rm ac-dev-server bash /azerothcore/acore.sh compiler build set +x shift ;; dev:dash) set -x - docker compose run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2} + docker compose --profile dev run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2} set +x shift ;; dev:shell) set -x - docker compose up -d ac-dev-server - docker compose exec ac-dev-server bash ${@:2} + docker compose --profile dev up -d ac-dev-server + docker compose --profile dev exec ac-dev-server bash ${@:2} set +x shift ;; build:prod|prod:build) + cat < Date: Mon, 16 Oct 2023 14:41:00 +0200 Subject: [PATCH 242/340] fix(DB/Creature): Make Hydross the Unstable immune to taunt (#17514) initial --- data/sql/updates/pending_db_world/hydross-taunt.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/hydross-taunt.sql diff --git a/data/sql/updates/pending_db_world/hydross-taunt.sql b/data/sql/updates/pending_db_world/hydross-taunt.sql new file mode 100644 index 00000000000000..e817e4acaaae23 --- /dev/null +++ b/data/sql/updates/pending_db_world/hydross-taunt.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 21216; From bac4a67c0c8e9b1f4d5291afcdbce76fc408e38f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Oct 2023 12:42:04 +0000 Subject: [PATCH 243/340] chore(DB): import pending files Referenced commit(s): 05361d021d65ee7f977ed0db377dcf1a877de04c --- .../hydross-taunt.sql => db_world/2023_10_16_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/hydross-taunt.sql => db_world/2023_10_16_00.sql} (67%) diff --git a/data/sql/updates/pending_db_world/hydross-taunt.sql b/data/sql/updates/db_world/2023_10_16_00.sql similarity index 67% rename from data/sql/updates/pending_db_world/hydross-taunt.sql rename to data/sql/updates/db_world/2023_10_16_00.sql index e817e4acaaae23..a1dbb5c375396a 100644 --- a/data/sql/updates/pending_db_world/hydross-taunt.sql +++ b/data/sql/updates/db_world/2023_10_16_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_15_00 -> 2023_10_16_00 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 21216; From e30718db363cb1948f79a8d2be2fd8a6dfcd3b03 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:13:54 +0300 Subject: [PATCH 244/340] fix(Core/Spells): Script Scourge Banner (#17523) * fix(Core/Spells): Script Scourge Banner * correct statecheck --- .../rev_1697469523592686600.sql | 3 +++ src/server/scripts/Spells/spell_generic.cpp | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697469523592686600.sql diff --git a/data/sql/updates/pending_db_world/rev_1697469523592686600.sql b/data/sql/updates/pending_db_world/rev_1697469523592686600.sql new file mode 100644 index 00000000000000..f6a425ef5e1ca2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697469523592686600.sql @@ -0,0 +1,3 @@ +-- Scourge Banner +DELETE FROM `spell_script_names` WHERE `spell_id`=16989 AND `ScriptName`='spell_gen_planting_scourge_banner'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (16989, 'spell_gen_planting_scourge_banner'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 548889f9589774..2035ec5a30a469 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5023,6 +5023,30 @@ class spell_gen_valthalak_amulet : public SpellScript } }; +enum ScourgeBanner +{ + GO_COMMAND_TENT = 176210, +}; + +class spell_gen_planting_scourge_banner : public SpellScript +{ + PrepareSpellScript(spell_gen_planting_scourge_banner) + + SpellCastResult CheckCast() + { + if (GameObject* tent = GetCaster()->FindNearestGameObject(GO_COMMAND_TENT, 20.0f)) + if (tent->GetGoState() != GO_STATE_READY) // If tent is burned down + return SPELL_CAST_OK; + + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_planting_scourge_banner::CheckCast); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5172,4 +5196,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_spirit_of_competition_participant); RegisterSpellScript(spell_gen_spirit_of_competition_winner); RegisterSpellScript(spell_gen_valthalak_amulet); + RegisterSpellScript(spell_gen_planting_scourge_banner); } From 22e7a82ad4bc265683716e10b8ddc05c450d2d28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Oct 2023 21:15:04 +0000 Subject: [PATCH 245/340] chore(DB): import pending files Referenced commit(s): e30718db363cb1948f79a8d2be2fd8a6dfcd3b03 --- .../rev_1697469523592686600.sql => db_world/2023_10_16_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697469523592686600.sql => db_world/2023_10_16_01.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1697469523592686600.sql b/data/sql/updates/db_world/2023_10_16_01.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1697469523592686600.sql rename to data/sql/updates/db_world/2023_10_16_01.sql index f6a425ef5e1ca2..4d38e9401f0e89 100644 --- a/data/sql/updates/pending_db_world/rev_1697469523592686600.sql +++ b/data/sql/updates/db_world/2023_10_16_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_16_00 -> 2023_10_16_01 -- Scourge Banner DELETE FROM `spell_script_names` WHERE `spell_id`=16989 AND `ScriptName`='spell_gen_planting_scourge_banner'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (16989, 'spell_gen_planting_scourge_banner'); From 96c30ec639e2899309c1698bd736b7ebee16d9e8 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:41:13 +0300 Subject: [PATCH 246/340] fix(DB/spell_proc_event): Bloodwarder Protector Spell Reflection (#17522) --- data/sql/updates/pending_db_world/rev_1697449664501189600.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697449664501189600.sql diff --git a/data/sql/updates/pending_db_world/rev_1697449664501189600.sql b/data/sql/updates/pending_db_world/rev_1697449664501189600.sql new file mode 100644 index 00000000000000..8d0977b42ed4df --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697449664501189600.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_proc_event` WHERE `entry`=35399; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(35399, 0, 0, 0, 0, 0, 131072, 2048, 0, 0, 0, 0); From fc5be2f98eca9fe5e2867563916dcf816e929d8f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:42:15 +0300 Subject: [PATCH 247/340] fix(DB/SAI): Port Elder Cloud Serpent from Mangos (#17521) fix(DB/SAI): Port Elder Cloud Serpent from mangos --- .../sql/updates/pending_db_world/rev_1697441406032177300.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697441406032177300.sql diff --git a/data/sql/updates/pending_db_world/rev_1697441406032177300.sql b/data/sql/updates/pending_db_world/rev_1697441406032177300.sql new file mode 100644 index 00000000000000..97a6f8ac5f838f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697441406032177300.sql @@ -0,0 +1,5 @@ +-- Elder Cloud Serpent +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4119); +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`, `event_param6`, `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 +(4119, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 0, 11, 8246, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Elder Cloud Serpent - In Combat - Cast \'Lightning Bolt\''), +(4119, 0, 1, 0, 0, 0, 100, 0, 0, 0, 7000, 11000, 0, 0, 11, 421, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Elder Cloud Serpent - In Combat - Cast \'Chain Lightning\''); From 3fe064c197438b96c02156c7a64d209e81d713bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Oct 2023 21:42:22 +0000 Subject: [PATCH 248/340] chore(DB): import pending files Referenced commit(s): 96c30ec639e2899309c1698bd736b7ebee16d9e8 --- .../rev_1697441406032177300.sql => db_world/2023_10_16_02.sql} | 1 + .../rev_1697449664501189600.sql => db_world/2023_10_16_03.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1697441406032177300.sql => db_world/2023_10_16_02.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1697449664501189600.sql => db_world/2023_10_16_03.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1697441406032177300.sql b/data/sql/updates/db_world/2023_10_16_02.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1697441406032177300.sql rename to data/sql/updates/db_world/2023_10_16_02.sql index 97a6f8ac5f838f..23bcc6ae5b1199 100644 --- a/data/sql/updates/pending_db_world/rev_1697441406032177300.sql +++ b/data/sql/updates/db_world/2023_10_16_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_16_01 -> 2023_10_16_02 -- Elder Cloud Serpent DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4119); 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`, `event_param6`, `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 diff --git a/data/sql/updates/pending_db_world/rev_1697449664501189600.sql b/data/sql/updates/db_world/2023_10_16_03.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1697449664501189600.sql rename to data/sql/updates/db_world/2023_10_16_03.sql index 8d0977b42ed4df..8e27ac3a99042d 100644 --- a/data/sql/updates/pending_db_world/rev_1697449664501189600.sql +++ b/data/sql/updates/db_world/2023_10_16_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_16_02 -> 2023_10_16_03 -- DELETE FROM `spell_proc_event` WHERE `entry`=35399; INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES From 6c575e3f6a2f6168729bbfcbb5404cd3c290e78f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:45:07 +0300 Subject: [PATCH 249/340] fix(DB/spell_proc_event): Shamanistic Rage ppm (#17499) --- data/sql/updates/pending_db_world/rev_1697195727896791400.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697195727896791400.sql diff --git a/data/sql/updates/pending_db_world/rev_1697195727896791400.sql b/data/sql/updates/pending_db_world/rev_1697195727896791400.sql new file mode 100644 index 00000000000000..01c5a39ad52793 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697195727896791400.sql @@ -0,0 +1,2 @@ +-- Shamanistic Rage PPM 10 -> 18 +UPDATE `spell_proc_event` SET `ppmRate` = 18 WHERE `entry` = 30823; From f820a964cbf2bb0de9a5e11c44ca2ac79ca8dddd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Oct 2023 21:46:24 +0000 Subject: [PATCH 250/340] chore(DB): import pending files Referenced commit(s): 6c575e3f6a2f6168729bbfcbb5404cd3c290e78f --- .../rev_1697195727896791400.sql => db_world/2023_10_16_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697195727896791400.sql => db_world/2023_10_16_04.sql} (69%) diff --git a/data/sql/updates/pending_db_world/rev_1697195727896791400.sql b/data/sql/updates/db_world/2023_10_16_04.sql similarity index 69% rename from data/sql/updates/pending_db_world/rev_1697195727896791400.sql rename to data/sql/updates/db_world/2023_10_16_04.sql index 01c5a39ad52793..e1979fa67eb175 100644 --- a/data/sql/updates/pending_db_world/rev_1697195727896791400.sql +++ b/data/sql/updates/db_world/2023_10_16_04.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_16_03 -> 2023_10_16_04 -- Shamanistic Rage PPM 10 -> 18 UPDATE `spell_proc_event` SET `ppmRate` = 18 WHERE `entry` = 30823; From 99bf49e0ddc3419daf7645ef3e42c0e0aa8164b3 Mon Sep 17 00:00:00 2001 From: KJack Date: Mon, 16 Oct 2023 18:07:47 -0400 Subject: [PATCH 251/340] Fix (core/SpellEffects): Don't randomize summoned guardian position if target is in the DB (#17506) * Doesn't randomize placement of guardian summons if the target position was specified in the DB * Add `HasRadius()` check * Add check for zero-radius effects, update IF condition style * Accept IF condition statement suggestion Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- src/server/game/Spells/SpellEffects.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ea793ce8ae277b..7080b5c8f3f8f7 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6057,8 +6057,11 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* Position pos; // xinef: do not use precalculated position for effect summon pet in this function - // it means it was cast by NPC and should have its position overridden - if (totalNumGuardians == 1 && GetSpellInfo()->Effects[i].Effect != SPELL_EFFECT_SUMMON_PET) + // it means it was cast by NPC and should have its position overridden unless the + // target position is specified in the DB AND the effect has no or zero radius + if ((totalNumGuardians == 1 && GetSpellInfo()->Effects[i].Effect != SPELL_EFFECT_SUMMON_PET) || + (GetSpellInfo()->Effects[i].TargetA.GetTarget() == TARGET_DEST_DB && + (!GetSpellInfo()->Effects[i].HasRadius() || GetSpellInfo()->Effects[i].RadiusEntry->RadiusMax == 0))) { pos = *destTarget; } From 16e53176a144f2387ec956f6478c17d13e17a14b Mon Sep 17 00:00:00 2001 From: KJack Date: Tue, 17 Oct 2023 04:39:43 -0400 Subject: [PATCH 252/340] fix (DB/SAI): Stratholme/Baron Rivendare (10440) encounter fixes (#17398) * Improvements to Baron Rivendare (10440) encounter --------- Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> --- .../rev_1696128697046487685.sql | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696128697046487685.sql diff --git a/data/sql/updates/pending_db_world/rev_1696128697046487685.sql b/data/sql/updates/pending_db_world/rev_1696128697046487685.sql new file mode 100644 index 00000000000000..71d522e8bf661e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696128697046487685.sql @@ -0,0 +1,42 @@ +-- Move Mindless Skeletons (11197) created by Baron Rivendare (10440) +-- to more accurate locations based on sniffed data. +DELETE FROM `spell_target_position` WHERE `ID`=17475 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17475, 0, 329, 4012.92, -3365.70, 116.251, 0.745, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17476 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17476, 0, 329, 4009.10, -3352.31, 116.712, 0.299, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17477 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17477, 0, 329, 4013.96, -3338.65, 116.242, 6.094, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17478 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17478, 0, 329, 4051.75, -3339.05, 116.241, 3.340, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17479 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17479, 0, 329, 4055.96, -3351.46, 116.586, 2.870, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17480 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17480, 0, 329, 4053.11, -3364.98, 116.402, 2.287, 50664); + +-- Additionally, cause the Baron to despawn his summoned Mindless Skeletons +-- when he is reset. +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10440; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10440); +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`, `event_param6`, `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 +(10440, 0, 0, 0, 0, 0, 100, 0, 4000, 9000, 7000, 11000, 0, 0, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Cleave\''), +(10440, 0, 1, 0, 0, 0, 100, 0, 1000, 6000, 6000, 9000, 0, 0, 11, 17393, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Shadow Bolt\''), +(10440, 0, 2, 0, 0, 0, 100, 0, 7000, 11000, 9000, 15000, 0, 0, 11, 15708, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Mortal Strike\''), +(10440, 0, 3, 0, 0, 0, 100, 513, 0, 0, 0, 0, 0, 0, 11, 17467, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Unholy Aura\' (No Repeat)'), +(10440, 0, 4, 5, 0, 0, 100, 0, 10000, 10000, 20000, 20000, 0, 0, 11, 17473, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Say Line 7'), +(10440, 0, 6, 0, 0, 0, 100, 0, 22000, 22000, 20000, 20000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Say Line 8'), +(10440, 0, 7, 8, 0, 0, 100, 512, 11000, 11000, 20000, 20000, 0, 0, 11, 17475, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 8, 9, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17476, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 9, 10, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17477, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 10, 11, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17478, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 11, 12, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17479, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 12, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17480, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 13, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 16031, 100, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Just Died - Free Prisoner'), +(10440, 0, 14, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Aggro - Set GO State To 1'), +(10440, 0, 15, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Just Died - Set GO State To 0'), +(10440, 0, 16, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Reset - Set GO State To 0'), +(10440, 0, 17, 18, 0, 0, 100, 512, 1000, 1000, 100, 100, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Set GO State To 0'), +(10440, 0, 18, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Evade'), +(10440, 0, 19, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 204, 11197, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Reset - Kill Summoned Creatures'); + From c9ab7e7e967812e0aeb0d08654528b3ab3d986e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Oct 2023 08:40:55 +0000 Subject: [PATCH 253/340] chore(DB): import pending files Referenced commit(s): 16e53176a144f2387ec956f6478c17d13e17a14b --- .../rev_1696128697046487685.sql => db_world/2023_10_17_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696128697046487685.sql => db_world/2023_10_17_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1696128697046487685.sql b/data/sql/updates/db_world/2023_10_17_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696128697046487685.sql rename to data/sql/updates/db_world/2023_10_17_00.sql index 71d522e8bf661e..0e6e9794d428a2 100644 --- a/data/sql/updates/pending_db_world/rev_1696128697046487685.sql +++ b/data/sql/updates/db_world/2023_10_17_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_16_04 -> 2023_10_17_00 -- Move Mindless Skeletons (11197) created by Baron Rivendare (10440) -- to more accurate locations based on sniffed data. DELETE FROM `spell_target_position` WHERE `ID`=17475 AND `EffectIndex`=0; From 8e12029456c5e8113b5a8e3eb1e7cc308874fa50 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:30:28 +0300 Subject: [PATCH 254/340] fix(DB/SAI): Correct Eridan Bluewind not ending RP (#17534) --- .../pending_db_world/rev_1697550662600756500.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697550662600756500.sql diff --git a/data/sql/updates/pending_db_world/rev_1697550662600756500.sql b/data/sql/updates/pending_db_world/rev_1697550662600756500.sql new file mode 100644 index 00000000000000..251a90faf7d6c4 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697550662600756500.sql @@ -0,0 +1,11 @@ +-- Eridan Bluewind +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 911600); +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`, `event_param6`, `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 +(911600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Npc Flags Gossip & Questgiver'), +(911600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 0'), +(911600, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.59669, 'Eridan Bluewind - On Script - Set Orientation 2,59669'), +(911600, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Cast \'Nature Channeling\''), +(911600, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.72271, 'Eridan Bluewind - On Script - Set Orientation 2,72271'), +(911600, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 1'), +(911600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Aura \'Nature Channeling\''), +(911600, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 82, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Add Npc Flags Gossip & Questgiver'); From 1b29f2fb64e2fe29ce07ae932e1637261b393d96 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Tue, 17 Oct 2023 20:31:05 +0200 Subject: [PATCH 255/340] fix(DB/SAI): Make Midsummer Celebrants applaud/cheer (#17503) * fix(DB/SAI): Make Midsummer Celebrants applaud/cheer - react to ribbonPole dancers - react to Master Fire Eater spewing fire * Update data/sql/updates/pending_db_world/rev_1697227385860752900.sql --------- Co-authored-by: Angelo Venturini --- .../pending_db_world/rev_1697227385860752900.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697227385860752900.sql diff --git a/data/sql/updates/pending_db_world/rev_1697227385860752900.sql b/data/sql/updates/pending_db_world/rev_1697227385860752900.sql new file mode 100644 index 00000000000000..87c5a4ffb82bf5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697227385860752900.sql @@ -0,0 +1,13 @@ +-- Midsummer Celebrants - Applause/Cheer +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 16781; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 16781); +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`, `event_param6`, `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 +(16781, 0, 0, 1, 8, 0, 100, 0, 45407, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - On Spellhit \'Reveler - Applause/Cheer\' - Set Orientation Invoker'), +(16781, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 1678100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - On Spellhit \'Reveler - Applause/Cheer\' - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1678100); +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`, `event_param6`, `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 +(1678100, 9, 0, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 0, 10, 4, 21, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - Actionlist - Play Random Emote (4, 21)'), +(1678100, 9, 1, 0, 0, 0, 100, 0, 4200, 4200, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - Actionlist - Set Orientation Home Position'); + From c31f3667daace9cc2d5cd1837aa55240b33dde27 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:32:51 +0300 Subject: [PATCH 256/340] fix(DB/Creature): Minor Manifestation of Earth stealth (#17498) * fix(DB/Creature): Minor Manifestation of Earth stealth * Update data/sql/updates/pending_db_world/rev_1697191216463702200.sql --------- Co-authored-by: Angelo Venturini --- .../sql/updates/pending_db_world/rev_1697191216463702200.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697191216463702200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697191216463702200.sql b/data/sql/updates/pending_db_world/rev_1697191216463702200.sql new file mode 100644 index 00000000000000..9df0d7e06dfc1f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697191216463702200.sql @@ -0,0 +1,5 @@ +-- Minor Manifestation of Earth +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 5891; +UPDATE `creature_template_addon` SET `auras` = '8203' WHERE (`entry` = 5891); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5891) AND (`source_type` = 0); From 429d24064798e96d6889ad23f68cb2b90d68e0e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Oct 2023 18:34:04 +0000 Subject: [PATCH 257/340] chore(DB): import pending files Referenced commit(s): 1b29f2fb64e2fe29ce07ae932e1637261b393d96 --- .../rev_1697191216463702200.sql => db_world/2023_10_17_01.sql} | 1 + .../rev_1697227385860752900.sql => db_world/2023_10_17_02.sql} | 1 + .../rev_1697550662600756500.sql => db_world/2023_10_17_03.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1697191216463702200.sql => db_world/2023_10_17_01.sql} (85%) rename data/sql/updates/{pending_db_world/rev_1697227385860752900.sql => db_world/2023_10_17_02.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1697550662600756500.sql => db_world/2023_10_17_03.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1697191216463702200.sql b/data/sql/updates/db_world/2023_10_17_01.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1697191216463702200.sql rename to data/sql/updates/db_world/2023_10_17_01.sql index 9df0d7e06dfc1f..902b068f0c6429 100644 --- a/data/sql/updates/pending_db_world/rev_1697191216463702200.sql +++ b/data/sql/updates/db_world/2023_10_17_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_00 -> 2023_10_17_01 -- Minor Manifestation of Earth UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 5891; UPDATE `creature_template_addon` SET `auras` = '8203' WHERE (`entry` = 5891); diff --git a/data/sql/updates/pending_db_world/rev_1697227385860752900.sql b/data/sql/updates/db_world/2023_10_17_02.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1697227385860752900.sql rename to data/sql/updates/db_world/2023_10_17_02.sql index 87c5a4ffb82bf5..05fdf6a150d2cb 100644 --- a/data/sql/updates/pending_db_world/rev_1697227385860752900.sql +++ b/data/sql/updates/db_world/2023_10_17_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_01 -> 2023_10_17_02 -- Midsummer Celebrants - Applause/Cheer UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 16781; diff --git a/data/sql/updates/pending_db_world/rev_1697550662600756500.sql b/data/sql/updates/db_world/2023_10_17_03.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1697550662600756500.sql rename to data/sql/updates/db_world/2023_10_17_03.sql index 251a90faf7d6c4..c9dbafdc9a830a 100644 --- a/data/sql/updates/pending_db_world/rev_1697550662600756500.sql +++ b/data/sql/updates/db_world/2023_10_17_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_02 -> 2023_10_17_03 -- Eridan Bluewind DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 911600); 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`, `event_param6`, `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 From bf5878f8dcf44fe3b5b854c7a220699c4461727b Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:37:32 +0200 Subject: [PATCH 258/340] fix(Scripts/SSC): fix issues with Fathomlord and add interactions (#17525) --- .../fathomlord_adds_spawn_to_db.sql | 6 ++ .../boss_fathomlord_karathress.cpp | 59 ++++++++++--------- .../SerpentShrine/instance_serpent_shrine.cpp | 3 + 3 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql diff --git a/data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql b/data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql new file mode 100644 index 00000000000000..6f133d43ca7acf --- /dev/null +++ b/data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature` WHERE `guid` IN (93763, 93764, 93765); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(93763, 21964, 0, 0, 548, 0, 0, 1, 1, 0, 463.83, -540.23, -7.54, 3.15, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL), +(93764, 21965, 0, 0, 548, 0, 0, 1, 1, 1, 459.61, -534.81, -7.54, 3.82, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL), +(93765, 21966, 0, 0, 548, 0, 0, 1, 1, 1, 459.94, -547.28, -7.54, 2.42, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 832a11dcf6419e..edd836dd40aeeb 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -65,16 +65,13 @@ enum Spells enum Misc { - MAX_ADVISORS = 3, + MAX_ADVISORS = 2, NPC_SEER_OLUM = 22820, GO_CAGE = 185952, }; -const Position advisorsPosition[MAX_ADVISORS + 2] = +const Position advisorsPosition[MAX_ADVISORS] = { - {459.61f, -534.81f, -7.54f, 3.82f}, - {463.83f, -540.23f, -7.54f, 3.15f}, - {459.94f, -547.28f, -7.54f, 2.42f}, {448.37f, -544.71f, -7.54f, 0.00f}, {457.37f, -544.71f, -7.54f, 0.00f} }; @@ -94,21 +91,13 @@ struct boss_fathomlord_karathress : public BossAI BossAI::Reset(); _recentlySpoken = false; - me->SummonCreature(NPC_FATHOM_GUARD_TIDALVESS, advisorsPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_SHARKKIS, advisorsPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_CARIBDIS, advisorsPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - ScheduleHealthCheckEvent(75, [&]{ - for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr) - { - if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr)) + instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard) { + if (fathomguard->IsAlive()) { - if (summon->GetMaxHealth() > 500000) - { - summon->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); - } + fathomguard->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); } - } + }); if (me->HasAura(SPELL_BLESSING_OF_THE_TIDES)) { Talk(SAY_GAIN_BLESSING); @@ -122,19 +111,22 @@ struct boss_fathomlord_karathress : public BossAI if (summon->GetEntry() == NPC_SEER_OLUM) { summon->SetWalk(true); - summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS + 1], false); + summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false); } } void SummonedCreatureDies(Creature* summon, Unit*) override { - summons.Despawn(summon); if (summon->GetEntry() == NPC_FATHOM_GUARD_TIDALVESS) Talk(SAY_GAIN_ABILITY1); if (summon->GetEntry() == NPC_FATHOM_GUARD_SHARKKIS) Talk(SAY_GAIN_ABILITY2); if (summon->GetEntry() == NPC_FATHOM_GUARD_CARIBDIS) Talk(SAY_GAIN_ABILITY3); + scheduler.Schedule(1s, [this, summon](TaskContext) + { + summons.Despawn(summon); + }); } void KilledUnit(Unit* /*victim*/) override @@ -154,7 +146,7 @@ struct boss_fathomlord_karathress : public BossAI { Talk(SAY_DEATH); BossAI::JustDied(killer); - me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS], TEMPSUMMON_TIMED_DESPAWN, 3600000); + me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS-2], TEMPSUMMON_TIMED_DESPAWN, 3600000); if (GameObject* gobject = me->FindNearestGameObject(GO_CAGE, 100.0f)) { gobject->SetGoState(GO_STATE_ACTIVE); @@ -207,8 +199,6 @@ struct boss_fathomguard_sharkkis : public ScriptedAI { boss_fathomguard_sharkkis(Creature* creature) : ScriptedAI(creature), summons(creature) { - summons.clear(); - _instance = creature->GetInstanceScript(); _scheduler.SetValidator([this] @@ -224,6 +214,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI _scheduler.CancelAll(); summons.DespawnAll(); + summons.clear(); } void JustSummoned(Creature* summon) override @@ -232,8 +223,12 @@ struct boss_fathomguard_sharkkis : public ScriptedAI summons.Summon(summon); } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(2500ms, [this](TaskContext context) { DoCastRandomTarget(SPELL_HURL_TRIDENT); @@ -268,7 +263,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS); + me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS, true); } } @@ -416,8 +411,12 @@ struct boss_fathomguard_tidalvess : public ScriptedAI } } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(10900ms, [this](TaskContext context) { DoCastVictim(SPELL_FROST_SHOCK); @@ -439,7 +438,7 @@ struct boss_fathomguard_tidalvess : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS); + me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS, true); } } @@ -489,8 +488,12 @@ struct boss_fathomguard_caribdis : public ScriptedAI summons.Summon(summon); } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(27900ms, [this](TaskContext context) { DoCastSelf(SPELL_WATER_BOLT_VOLLEY); @@ -517,7 +520,7 @@ struct boss_fathomguard_caribdis : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS); + me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS, true); } } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 90d4c5e6c3d11b..fdedecd3f1c35e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -138,7 +138,10 @@ class instance_serpent_shrine : public InstanceMapScript if (Creature* vashj = instance->GetCreature(LadyVashjGUID)) vashj->AI()->JustSummoned(creature); break; + default: + break; } + InstanceScript::OnCreatureCreate(creature); } ObjectGuid GetGuidData(uint32 identifier) const override From ad667289733e7d4737912eb7249ae2ad31e97c29 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:37:53 +0300 Subject: [PATCH 259/340] fix(DB/Creature): Drunken Brewfest Reveler model (#17494) * fix(DB/Creature): Drunken Brewfest Reveler model * clarify enum + farm lines --- .../rev_1697139983815406200.sql | 3 +++ src/server/scripts/Events/brewfest.cpp | 17 ++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697139983815406200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697139983815406200.sql b/data/sql/updates/pending_db_world/rev_1697139983815406200.sql new file mode 100644 index 00000000000000..e80389cf701127 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697139983815406200.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template_addon` SET `auras` = '35777 43905' WHERE `entry` = 23698; +UPDATE `creature_addon` SET `auras` = '35777 43905 44096' WHERE `guid` = 88960; diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index b202673cd96b12..53c5ddded3b9ee 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -1367,13 +1367,15 @@ enum BrewfestRevelerEnum FACTION_ALLIANCE = 1934, FACTION_HORDE = 1935, - SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44003, - SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE = 44004, - SPELL_BREWFEST_REVELER_TRANSFORM_BE = 43907, - SPELL_BREWFEST_REVELER_TRANSFORM_ORC = 43914, - SPELL_BREWFEST_REVELER_TRANSFORM_TAUREN = 43915, - SPELL_BREWFEST_REVELER_TRANSFORM_TROLL = 43916, - SPELL_BREWFEST_REVELER_TRANSFORM_UNDEAD = 43917 + SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44003, + SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE = 44004, + SPELL_BREWFEST_REVELER_TRANSFORM_BE = 43907, + SPELL_BREWFEST_REVELER_TRANSFORM_ORC = 43914, + SPELL_BREWFEST_REVELER_TRANSFORM_TAUREN = 43915, + SPELL_BREWFEST_REVELER_TRANSFORM_TROLL = 43916, + SPELL_BREWFEST_REVELER_TRANSFORM_UNDEAD = 43917, + + SPELL_DRUNKEN_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44096 }; class spell_brewfest_reveler_transform : public AuraScript @@ -1394,6 +1396,7 @@ class spell_brewfest_reveler_transform : public AuraScript break; case SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE: case SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE: + case SPELL_DRUNKEN_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE: factionId = FACTION_FRIENDLY; break; default: From 6137b6e076b1180a9220d676b9eefcb64eec07ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Oct 2023 18:38:46 +0000 Subject: [PATCH 260/340] chore(DB): import pending files Referenced commit(s): bf5878f8dcf44fe3b5b854c7a220699c4461727b --- .../2023_10_17_04.sql} | 1 + .../rev_1697139983815406200.sql => db_world/2023_10_17_05.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/fathomlord_adds_spawn_to_db.sql => db_world/2023_10_17_04.sql} (94%) rename data/sql/updates/{pending_db_world/rev_1697139983815406200.sql => db_world/2023_10_17_05.sql} (79%) diff --git a/data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql b/data/sql/updates/db_world/2023_10_17_04.sql similarity index 94% rename from data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql rename to data/sql/updates/db_world/2023_10_17_04.sql index 6f133d43ca7acf..d04d2056151b35 100644 --- a/data/sql/updates/pending_db_world/fathomlord_adds_spawn_to_db.sql +++ b/data/sql/updates/db_world/2023_10_17_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_03 -> 2023_10_17_04 -- DELETE FROM `creature` WHERE `guid` IN (93763, 93764, 93765); INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1697139983815406200.sql b/data/sql/updates/db_world/2023_10_17_05.sql similarity index 79% rename from data/sql/updates/pending_db_world/rev_1697139983815406200.sql rename to data/sql/updates/db_world/2023_10_17_05.sql index e80389cf701127..1c76ed537a7b19 100644 --- a/data/sql/updates/pending_db_world/rev_1697139983815406200.sql +++ b/data/sql/updates/db_world/2023_10_17_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_04 -> 2023_10_17_05 -- UPDATE `creature_template_addon` SET `auras` = '35777 43905' WHERE `entry` = 23698; UPDATE `creature_addon` SET `auras` = '35777 43905 44096' WHERE `guid` = 88960; From 9831689f4834616710bb8293c04406e5343e42ec Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 23:33:07 +0300 Subject: [PATCH 261/340] fix(DB/SAI): Ravenous Windroc not stacking eagle claw (#17531) DB/SAI: Ravenous Windroc not stacking eagle claw --- .../sql/updates/pending_db_world/rev_1697523119963738400.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697523119963738400.sql diff --git a/data/sql/updates/pending_db_world/rev_1697523119963738400.sql b/data/sql/updates/pending_db_world/rev_1697523119963738400.sql new file mode 100644 index 00000000000000..b667c8f471e48a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697523119963738400.sql @@ -0,0 +1,5 @@ +-- Ravenous Windroc +UPDATE `smart_scripts` SET `action_param2` = 0 WHERE `entryorguid` = 18220 AND `source_type` = 0 AND `id` = 0; + +DELETE FROM `spell_custom_attr` WHERE `spell_id`=30285; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (30285, 4194304); From 9ea50a67d2bd81157c96da240b2372f5469504e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Oct 2023 20:35:00 +0000 Subject: [PATCH 262/340] chore(DB): import pending files Referenced commit(s): 9831689f4834616710bb8293c04406e5343e42ec --- .../rev_1697523119963738400.sql => db_world/2023_10_17_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697523119963738400.sql => db_world/2023_10_17_06.sql} (86%) diff --git a/data/sql/updates/pending_db_world/rev_1697523119963738400.sql b/data/sql/updates/db_world/2023_10_17_06.sql similarity index 86% rename from data/sql/updates/pending_db_world/rev_1697523119963738400.sql rename to data/sql/updates/db_world/2023_10_17_06.sql index b667c8f471e48a..aa21f2f400c1f4 100644 --- a/data/sql/updates/pending_db_world/rev_1697523119963738400.sql +++ b/data/sql/updates/db_world/2023_10_17_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_05 -> 2023_10_17_06 -- Ravenous Windroc UPDATE `smart_scripts` SET `action_param2` = 0 WHERE `entryorguid` = 18220 AND `source_type` = 0 AND `id` = 0; From f8b7e95c4255eea2f8ffde9c4d8c591b4e7cb3f4 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Oct 2023 23:40:40 +0300 Subject: [PATCH 263/340] fix(DB/Creature): Baron Rafe Dreuger level (#17497) --- data/sql/updates/pending_db_world/rev_1697186168138525800.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697186168138525800.sql diff --git a/data/sql/updates/pending_db_world/rev_1697186168138525800.sql b/data/sql/updates/pending_db_world/rev_1697186168138525800.sql new file mode 100644 index 00000000000000..9bd4ab0cd59160 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697186168138525800.sql @@ -0,0 +1,2 @@ +-- Moroes guests +UPDATE `creature_template` SET `minlevel` = 70, `maxlevel` = 70 WHERE (`entry` = 19874); From 54ab8dafc25f317459dac7757e33ea80b7b2dcf1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Oct 2023 20:41:47 +0000 Subject: [PATCH 264/340] chore(DB): import pending files Referenced commit(s): f8b7e95c4255eea2f8ffde9c4d8c591b4e7cb3f4 --- .../rev_1697186168138525800.sql => db_world/2023_10_17_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697186168138525800.sql => db_world/2023_10_17_07.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1697186168138525800.sql b/data/sql/updates/db_world/2023_10_17_07.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1697186168138525800.sql rename to data/sql/updates/db_world/2023_10_17_07.sql index 9bd4ab0cd59160..6438a8a53af6ed 100644 --- a/data/sql/updates/pending_db_world/rev_1697186168138525800.sql +++ b/data/sql/updates/db_world/2023_10_17_07.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_17_06 -> 2023_10_17_07 -- Moroes guests UPDATE `creature_template` SET `minlevel` = 70, `maxlevel` = 70 WHERE (`entry` = 19874); From 630b90a63340c80080c6c0e45b2908096fb5e092 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Wed, 18 Oct 2023 14:22:26 +0200 Subject: [PATCH 265/340] fix(Scripts/Midsummer): Implement Ribbon Pole dance effects (#17417) * fix(Scripts/Midsummer): Implement Ribbon Pole dance effects * midsummer.cpp: remove whitespaces at end of lines * midsummer.cpp: fix unused parameter error * add spacing after 0.0f * replace Milliseconds(...) by ...ms and Seconds(...) by ...s * cleanup comments * remove manual cleanups / despawns from DoCleanupChecks() - rely on NPC despawn timers - manual cleanup / removal actually is a bit excessive * set INTERVAL_DANCING_FLAMES to 15s * set despawn time to 1min for big dancing flames according to spell 46827 * set spawnDist to 12 for big dancing flames according so spell 46827 * use library function Acore::Containers::RandomShuffle() to shuffle _danclerList * sql: do not set SmartAI for NPC 17066 already using ScriptName and can't have both * combine 3 sql files into 1 * remove INTERVAL_... enum values * remove unnecessary checks of if(_bunny) * sql: fix smartscript comment * rename spell define to correct spell name --- .../rev_1696767584445542100.sql | 14 + src/server/scripts/Events/midsummer.cpp | 266 +++++++++++++++++- 2 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1696767584445542100.sql diff --git a/data/sql/updates/pending_db_world/rev_1696767584445542100.sql b/data/sql/updates/pending_db_world/rev_1696767584445542100.sql new file mode 100644 index 00000000000000..05d00091d04a3b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696767584445542100.sql @@ -0,0 +1,14 @@ +-- midsummer creatureAI npc_midsummer_ribbon_pole_target +UPDATE `creature_template` SET `ScriptName` = 'npc_midsummer_ribbon_pole_target' WHERE `entry` = 17066; + +-- midsummer NPC Big Dancing Flame - SmartAI - fire dance spell +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26267; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26267); +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`, `event_param6`, `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 +(26267, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 45418, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Big Dancing Flames - On Just Summoned - Cast Spell \'Fire Dancing\''); + +-- midsummer add spell script spell_midsummer_ribbon_pole_firework +DELETE FROM `spell_script_names` WHERE `spell_id` = 46847; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(46847, 'spell_midsummer_ribbon_pole_firework'); diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 998a6211b17b9d..d82b54d99693af 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -23,6 +23,7 @@ #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" +#include enum eBonfire { @@ -210,15 +211,276 @@ class spell_gen_crab_disguise : public AuraScript enum RibbonPole { + GO_RIBBON_POLE = 181605, + SPELL_RIBBON_POLE_CHANNEL_VISUAL = 29172, SPELL_RIBBON_POLE_CHANNEL_VISUAL_2 = 29531, SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE = 29705, SPELL_TEST_RIBBON_POLE_CHANNEL_RED = 29726, SPELL_TEST_RIBBON_POLE_CHANNEL_PINK = 29727, + // player spinning/rorating around himself + SPELL_RIBBON_POLE_PERIODIC_VISUAL = 45406, + // spew lava trails + SPELL_RIBBON_POLE_FIRE_SPIRAL_VISUAL= 45421, + // blue fire ring, duration 5s + SPELL_FLAME_RING = 46842, + // red fire ring, duration 5s + SPELL_FLAME_PATCH = 46836, + // single firework explosion + SPELL_RIBBON_POLE_FIREWORK = 46847, + SPELL_RIBBON_POLE_GROUND_FLOWER = 46969, SPELL_RIBBON_POLE_XP = 29175, - SPELL_RIBBON_POLE_FIREWORKS = 46971, NPC_RIBBON_POLE_DEBUG_TARGET = 17066, + NPC_GROUND_FLOWER = 25518, + NPC_BIG_DANCING_FLAMES = 26267, + NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY = 25303, + + // dancing players count + THRESHOLD_FLAME_CIRCLE = 1, + THRESHOLD_FIREWORK = 2, + THRESHOLD_FIREWORK_3 = 3, + THRESHOLD_FIREWORK_5 = 5, + THRESHOLD_GROUND_FLOWERS = 3, + THRESHOLD_SPEW_LAVA = 6, + THRESHOLD_DANCING_FLAMES = 7, + + MAX_COUNT_GROUND_FLOWERS = 3, + MAX_COUNT_SPEW_LAVA_TARGETS = 2, + MAX_COUNT_DANCING_FLAMES = 4, +}; + +struct npc_midsummer_ribbon_pole_target : public ScriptedAI +{ + npc_midsummer_ribbon_pole_target(Creature* creature) : ScriptedAI(creature) + { + // ribbonPole trap also spawns this NPC (currently unwanted) + if (me->ToTempSummon()) + me->DespawnOrUnsummon(); + + _ribbonPole = nullptr; + _bunny = nullptr; + _dancerList.clear(); + + LocateRibbonPole(); + SpawnFireSpiralBunny(); + + _scheduler.Schedule(1s, [this](TaskContext context) + { + DoCleanupChecks(); + context.Repeat(); + }) + .Schedule(5s, [this](TaskContext context) + { + DoFlameCircleChecks(); + context.Repeat(); + }) + .Schedule(15s, [this](TaskContext context) + { + DoFireworkChecks(); + context.Repeat(); + }) + .Schedule(10s, [this](TaskContext context) + { + DoGroundFlowerChecks(); + context.Repeat(); + }) + .Schedule(10s, [this](TaskContext context) + { + DoSpewLavaChecks(); + context.Repeat(); + }) + .Schedule(15s, [this](TaskContext context) + { + DoDancingFLameChecks(); + context.Repeat(); + }); + } + + void SpellHit(Unit* caster, SpellInfo const* spell) override + { + Player* dancer = caster->ToPlayer(); + if (!dancer) + return; + + switch (spell->Id) + { + case SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE: + case SPELL_TEST_RIBBON_POLE_CHANNEL_RED: + case SPELL_TEST_RIBBON_POLE_CHANNEL_PINK: + break; + default: + return; + } + + // prevent duplicates + if (std::find(_dancerList.begin(), _dancerList.end(), dancer) != _dancerList.end()) + return; + + _dancerList.push_back(dancer); + } + + void LocateRibbonPole() + { + _scheduler.Schedule(420ms, [this](TaskContext context) + { + _ribbonPole = me->FindNearestGameObject(GO_RIBBON_POLE, 10.0f); + + if (!_ribbonPole) + context.Repeat(420ms); + }); + } + + void SpawnFireSpiralBunny() + { + _bunny = me->FindNearestCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, 10.0f); + + if (!_bunny) + _bunny = DoSpawnCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0); + } + + void DoCleanupChecks() + { + if (_dancerList.empty()) + return; + + // remove non-dancing players from list + std::erase_if(_dancerList, [](Player* dancer) + { + return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); + }); + } + + void DoFlameCircleChecks() + { + if (!_ribbonPole) + return; + if (_dancerList.size() >= THRESHOLD_FLAME_CIRCLE) + { + // random blue / red circle + if (urand(0, 1)) + _ribbonPole->CastSpell(me, SPELL_FLAME_RING); + else + _ribbonPole->CastSpell(me, SPELL_FLAME_PATCH); + } + } + + void DoFireworkChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_FIREWORK) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + } + if (_dancerList.size() >= THRESHOLD_FIREWORK_3) + { + _scheduler.Schedule(500ms, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }) + .Schedule(1s, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }); + } + if (_dancerList.size() >= THRESHOLD_FIREWORK_5) + { + _scheduler.Schedule(1500ms, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }) + .Schedule(2s, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }); + } + } + + void DoGroundFlowerChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_GROUND_FLOWERS) + { + std::list crList; + me->GetCreaturesWithEntryInRange(crList, 20.0f, NPC_GROUND_FLOWER); + + if (crList.size() < MAX_COUNT_GROUND_FLOWERS) + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_GROUND_FLOWER); + } + } + + void DoSpewLavaChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_SPEW_LAVA) + { + if (!_dancerList.empty()) + { + Acore::Containers::RandomShuffle(_dancerList); + + for (uint8 i = 0; (i < MAX_COUNT_SPEW_LAVA_TARGETS) && (i < _dancerList.size()); i++) + { + Player* dancerTarget = _dancerList[i]; + + if (dancerTarget) + { + Creature* fireSpiralBunny = dancerTarget->SummonCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, dancerTarget->GetPositionX(), dancerTarget->GetPositionY(), dancerTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + if (fireSpiralBunny) + fireSpiralBunny->CastSpell(_bunny, SPELL_RIBBON_POLE_FIRE_SPIRAL_VISUAL, true); + } + } + } + } + } + + void DoDancingFLameChecks() + { + if (_dancerList.size() >= THRESHOLD_DANCING_FLAMES) + { + std::list crList; + me->GetCreaturesWithEntryInRange(crList, 20.0f, NPC_BIG_DANCING_FLAMES); + + if (crList.size() < MAX_COUNT_DANCING_FLAMES) + { + float spawnDist = 12.0f; + float angle = rand_norm() * 2 * M_PI; + DoSpawnCreature(NPC_BIG_DANCING_FLAMES, spawnDist * cos(angle), spawnDist * std::sin(angle), 0, angle + M_PI, TEMPSUMMON_TIMED_DESPAWN, 60000); + } + } + } + + void UpdateAI(uint32 diff) override + { + _scheduler.Update(diff); + } + +private: + TaskScheduler _scheduler; + std::vector _dancerList; + GameObject* _ribbonPole; + Creature* _bunny; +}; + +class spell_midsummer_ribbon_pole_firework : public SpellScript +{ + PrepareSpellScript(spell_midsummer_ribbon_pole_firework) + + void ModDestHeight(SpellDestination& dest) + { + Position const offset = { 0.0f, 0.0f, 20.0f , 0.0f }; + dest.RelocateOffset(offset); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_midsummer_ribbon_pole_firework::ModDestHeight, EFFECT_0, TARGET_DEST_CASTER_RANDOM); + } }; class spell_midsummer_ribbon_pole : public AuraScript @@ -617,9 +879,11 @@ void AddSC_event_midsummer_scripts() // NPCs new go_midsummer_bonfire(); RegisterCreatureAI(npc_midsummer_torch_target); + RegisterCreatureAI(npc_midsummer_ribbon_pole_target); // Spells RegisterSpellScript(spell_gen_crab_disguise); + RegisterSpellScript(spell_midsummer_ribbon_pole_firework); RegisterSpellScript(spell_midsummer_ribbon_pole); RegisterSpellScript(spell_midsummer_ribbon_pole_visual); RegisterSpellScript(spell_midsummer_torch_quest); From 552a31726402e6831e2f1c3518b9ebb3eb76c307 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Oct 2023 12:23:55 +0000 Subject: [PATCH 266/340] chore(DB): import pending files Referenced commit(s): 630b90a63340c80080c6c0e45b2908096fb5e092 --- .../rev_1696767584445542100.sql => db_world/2023_10_18_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696767584445542100.sql => db_world/2023_10_18_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1696767584445542100.sql b/data/sql/updates/db_world/2023_10_18_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1696767584445542100.sql rename to data/sql/updates/db_world/2023_10_18_00.sql index 05d00091d04a3b..27ab6a99c85d93 100644 --- a/data/sql/updates/pending_db_world/rev_1696767584445542100.sql +++ b/data/sql/updates/db_world/2023_10_18_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_17_07 -> 2023_10_18_00 -- midsummer creatureAI npc_midsummer_ribbon_pole_target UPDATE `creature_template` SET `ScriptName` = 'npc_midsummer_ribbon_pole_target' WHERE `entry` = 17066; From eafb5a4f755818626f5ff01e3c8f27e3f030890c Mon Sep 17 00:00:00 2001 From: Ludwig Date: Wed, 18 Oct 2023 15:07:16 +0200 Subject: [PATCH 267/340] fix(DB): Use sniffed values for Midsummer Music Doodad spawns (#17518) * fix(DB): Add 3 Missing Midsummer Music Doodad * fix(DB): Use sniffed values for Midsummer Music Doodad spawns unfortunately one spawn is missing (guid 50564) * Update data/sql/updates/pending_db_world/rev_1697395883333045400.sql Co-authored-by: Angelo Venturini * also use id in DELETE statement --------- Co-authored-by: Angelo Venturini --- .../rev_1697395883333045400.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697395883333045400.sql diff --git a/data/sql/updates/pending_db_world/rev_1697395883333045400.sql b/data/sql/updates/pending_db_world/rev_1697395883333045400.sql new file mode 100644 index 00000000000000..40505a575c7919 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697395883333045400.sql @@ -0,0 +1,22 @@ +-- Use sniffed values for Midsummer Music Doodad spawns +DELETE FROM `gameobject` WHERE `id` = 188174 AND `guid` IN (50573, 50571, 50557, 50556, 50555, 50554, 50553, 50552); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(50573, 188174, 0, 0, 0, 1, 1, -4695.85888671875, -1218.7857666015625, 501.659393310546875, 5.93412017822265625, 0, 0, -0.17364788055419921, 0.984807789325714111, 120, 255, 1, 50063), +(50571, 188174, 0, 0, 0, 1, 1, 1817.0294189453125, 223.62457275390625, 59.57859420776367187, 3.089183330535888671, 0, 0, 0.99965667724609375, 0.026201646775007247, 120, 255, 1, 50063), +(50557, 188174, 530, 0, 0, 1, 1, -1748.7203369140625, 5333.59619140625, -12.4281425476074218, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 120, 255, 1, 50063), +(50556, 188174, 1, 0, 0, 1, 1, -1023.13018798828125, 298.5625, 135.745941162109375, 1.640606880187988281, 0, 0, 0.731352806091308593, 0.6819993257522583, 120, 255, 1, 50063), +(50555, 188174, 1, 0, 0, 1, 1, 8703.021484375, 947.47265625, 13.45331859588623046, 3.857182979583740234, 0, 0, -0.93667125701904296, 0.350209832191467285, 120, 255, 1, 50063), +(50554, 188174, 0, 0, 0, 1, 1, -8836.6044921875, 866.36004638671875, 98.71681976318359375, 2.094393253326416015, 0, 0, 0.866024971008300781, 0.50000077486038208, 120, 255, 1, 50063), +(50553, 188174, 530, 0, 0, 1, 1, 9794.822265625, -7248.7412109375, 26.09736061096191406, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 120, 255, 1, 50063), +(50552, 188174, 530, 0, 0, 1, 1, -3798.689208984375, -11508.978515625, -134.82122802734375, 5.061456203460693359, 0, 0, -0.57357597351074218, 0.819152355194091796, 120, 255, 1, 50063); + +DELETE FROM `game_event_gameobject` WHERE `eventEntry` = 1 AND `guid` IN (50573, 50571, 50557, 50556, 50555, 50554, 50553, 50552); +INSERT INTO `game_event_gameobject` (`eventEntry`,`guid`) VALUES +(1, 50573), +(1, 50571), +(1, 50557), +(1, 50556), +(1, 50555), +(1, 50554), +(1, 50553), +(1, 50552); From 2303e3b0630fd6bc5ea0aae4140d7d2821e4188d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Oct 2023 13:09:03 +0000 Subject: [PATCH 268/340] chore(DB): import pending files Referenced commit(s): eafb5a4f755818626f5ff01e3c8f27e3f030890c --- .../rev_1697395883333045400.sql => db_world/2023_10_18_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697395883333045400.sql => db_world/2023_10_18_01.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1697395883333045400.sql b/data/sql/updates/db_world/2023_10_18_01.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1697395883333045400.sql rename to data/sql/updates/db_world/2023_10_18_01.sql index 40505a575c7919..1ecbaf70280cdc 100644 --- a/data/sql/updates/pending_db_world/rev_1697395883333045400.sql +++ b/data/sql/updates/db_world/2023_10_18_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_18_00 -> 2023_10_18_01 -- Use sniffed values for Midsummer Music Doodad spawns DELETE FROM `gameobject` WHERE `id` = 188174 AND `guid` IN (50573, 50571, 50557, 50556, 50555, 50554, 50553, 50552); INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES From 39db3de5af9b244e34d228ea0047761893632c04 Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Wed, 18 Oct 2023 17:27:28 +0330 Subject: [PATCH 269/340] refactor(Scripts/Commands): convert cs_guild to new system (#17515) --- src/server/scripts/Commands/cs_guild.cpp | 159 ++++++++++------------- 1 file changed, 66 insertions(+), 93 deletions(-) diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index b5f40ba1001ea8..0eb15e7d16544e 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -25,13 +25,8 @@ EndScriptData */ #include "Chat.h" #include "Guild.h" #include "GuildMgr.h" -#include "Language.h" #include "ScriptMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class guild_commandscript : public CommandScript @@ -43,50 +38,38 @@ class guild_commandscript : public CommandScript { static ChatCommandTable guildCommandTable = { - { "create", SEC_GAMEMASTER, true, &HandleGuildCreateCommand, "" }, - { "delete", SEC_GAMEMASTER, true, &HandleGuildDeleteCommand, "" }, - { "invite", SEC_GAMEMASTER, true, &HandleGuildInviteCommand, "" }, - { "uninvite", SEC_GAMEMASTER, true, &HandleGuildUninviteCommand, "" }, - { "rank", SEC_GAMEMASTER, true, &HandleGuildRankCommand, "" }, - { "rename", SEC_GAMEMASTER, true, &HandleGuildRenameCommand, "" }, - { "info", SEC_GAMEMASTER, true, &HandleGuildInfoCommand, "" } + { "create", HandleGuildCreateCommand, SEC_GAMEMASTER, Console::Yes }, + { "delete", HandleGuildDeleteCommand, SEC_GAMEMASTER, Console::Yes }, + { "invite", HandleGuildInviteCommand, SEC_GAMEMASTER, Console::Yes }, + { "uninvite", HandleGuildUninviteCommand, SEC_GAMEMASTER, Console::Yes }, + { "rank", HandleGuildRankCommand, SEC_GAMEMASTER, Console::Yes }, + { "rename", HandleGuildRenameCommand, SEC_GAMEMASTER, Console::Yes }, + { "info", HandleGuildInfoCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "guild", SEC_GAMEMASTER, true, nullptr, "", guildCommandTable } + { "guild", guildCommandTable } }; return commandTable; } - /** \brief GM command level 3 - Create a guild. - * - * This command allows a GM (level 3) to create a guild. - * - * The "args" parameter contains the name of the guild leader - * and then the name of the guild. - * - */ - static bool HandleGuildCreateCommand(ChatHandler* handler, char const* args) + static bool HandleGuildCreateCommand(ChatHandler* handler, Optional target, std::string_view guildName) { - if (!*args) - return false; - - // if not guild name only (in "") then player name - Player* target; - if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, &target)) - return false; - - char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args; - if (!tailStr) - return false; + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } - char* guildStr = handler->extractQuotedArg(tailStr); - if (!guildStr) + if (!target || !target->IsConnected()) + { + handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); + handler->SetSentErrorMessage(true); return false; + } - std::string guildName = guildStr; + Player* playerTarget = target->GetConnectedPlayer(); - if (target->GetGuildId()) + if (playerTarget->GetGuildId()) { handler->SendSysMessage(LANG_PLAYER_IN_GUILD); handler->SetSentErrorMessage(true); @@ -108,7 +91,7 @@ class guild_commandscript : public CommandScript } Guild* guild = new Guild; - if (!guild->Create(target, guildName)) + if (!guild->Create(playerTarget, guildName)) { delete guild; handler->SendSysMessage(LANG_GUILD_NOT_CREATED); @@ -121,16 +104,12 @@ class guild_commandscript : public CommandScript return true; } - static bool HandleGuildDeleteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildDeleteCommand(ChatHandler*, std::string_view guildName) { - if (!*args) - return false; - - char* guildStr = handler->extractQuotedArg((char*)args); - if (!guildStr) + if (guildName.empty()) + { return false; - - std::string guildName = guildStr; + } Guild* targetGuild = sGuildMgr->GetGuildByName(guildName); if (!targetGuild) @@ -142,41 +121,41 @@ class guild_commandscript : public CommandScript return true; } - static bool HandleGuildInviteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildInviteCommand(ChatHandler* handler, Optional target, std::string_view guildName) { - if (!*args) - return false; - - // if not guild name only (in "") then player name - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, nullptr, &targetGuid)) - return false; - - char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args; - if (!tailStr) - return false; + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } - char* guildStr = handler->extractQuotedArg(tailStr); - if (!guildStr) + if (!target) + { return false; + } - std::string guildName = guildStr; Guild* targetGuild = sGuildMgr->GetGuildByName(guildName); if (!targetGuild) return false; // player's guild membership checked in AddMember before add - return targetGuild->AddMember(targetGuid); + return targetGuild->AddMember(target->GetGUID()); } - static bool HandleGuildUninviteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildUninviteCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid)) + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } + + if (!target) + { return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); - uint32 guildId = target ? target->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(targetGuid); + uint32 guildId = playerTarget ? playerTarget->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(target->GetGUID()); if (!guildId) return false; @@ -184,7 +163,7 @@ class guild_commandscript : public CommandScript if (!targetGuild) return false; - targetGuild->DeleteMember(targetGuid, false, true, true); + targetGuild->DeleteMember(target->GetGUID(), false, true, true); return true; } @@ -207,26 +186,15 @@ class guild_commandscript : public CommandScript return targetGuild->ChangeMemberRank(player->GetGUID(), rank); } - static bool HandleGuildRenameCommand(ChatHandler* handler, char const* _args) + static bool HandleGuildRenameCommand(ChatHandler* handler, std::string_view oldGuildStr, std::string_view newGuildStr) { - if (!*_args) - return false; - - char *args = (char *)_args; - - char const* oldGuildStr = handler->extractQuotedArg(args); - if (!oldGuildStr) + if (!oldGuildStr.empty()) { - handler->SendSysMessage(LANG_BAD_VALUE); - handler->SetSentErrorMessage(true); return false; } - char const* newGuildStr = handler->extractQuotedArg(strtok(nullptr, "")); - if (!newGuildStr) + if (newGuildStr.empty()) { - handler->SendSysMessage(LANG_INSERT_GUILD_NAME); - handler->SetSentErrorMessage(true); return false; } @@ -256,35 +224,40 @@ class guild_commandscript : public CommandScript return true; } - static bool HandleGuildInfoCommand(ChatHandler* handler, char const* args) + static bool HandleGuildInfoCommand(ChatHandler* handler, Optional> const& guildIdentifier) { Guild* guild = nullptr; - if (args && args[0] != '\0') + if (guildIdentifier) { - if (isNumeric(args)) - guild = sGuildMgr->GetGuildById(strtoull(args, nullptr, 10)); + if (ObjectGuid::LowType const* guid = std::get_if(&*guildIdentifier)) + guild = sGuildMgr->GetGuildById(*guid); else - guild = sGuildMgr->GetGuildByName(args); + guild = sGuildMgr->GetGuildByName(guildIdentifier->get()); } - else if (Player* target = handler->getSelectedPlayerOrSelf()) - guild = target->GetGuild(); + else if (Optional target = PlayerIdentifier::FromTargetOrSelf(handler); target && target->IsConnected()) + guild = target->GetConnectedPlayer()->GetGuild(); if (!guild) return false; // Display Guild Information handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name + std::string guildMasterName; if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName)) - { handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master - } - handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, Acore::Time::TimeToHumanReadable(Seconds(guild->GetCreatedDate())).c_str()); // Creation Date + // Format creation date + char createdDateStr[20]; + time_t createdDate = guild->GetCreatedDate(); + tm localTm; + strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", localtime_r(&createdDate, &localTm)); + + handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins) - handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the day + handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the Day handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo().c_str()); // Extra Information return true; } From 574a8778213afd78aae2fbad6c551fce51608825 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Wed, 18 Oct 2023 07:04:34 -0700 Subject: [PATCH 270/340] fix(CI): check ref name instead of non-existent step (#17529) --- .github/workflows/docker_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index b3a9822cb23458..420a0e3d8c1332 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v4 - name: Login to Docker Hub - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} From ed9f35932828424dce7f23dd664cd1543d719cb0 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Wed, 18 Oct 2023 07:04:42 -0700 Subject: [PATCH 271/340] fix(CI): Ensure eluna is installed for acore-docker (#17530) --- .github/workflows/docker_build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 420a0e3d8c1332..4e2f5dd0361f65 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -94,6 +94,18 @@ jobs: - uses: actions/checkout@v4 + # The containers created in this workflow are used by + # acore-docker, which has a dependency on mod-eluna. + # + # If you're wanting containers without mod-eluna, the best solution is to + # build them locally (such as with `docker compose build`) + - name: Download Eluna + if: github.repository == "azerothcore/azerothcore-wotlk" && github.ref_name == 'master' + uses: actions/checkout@v4 + with: + repository: azerothcore/mod-eluna + path: modules/mod-eluna + - name: Login to Docker Hub if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: docker/login-action@v1 From 45bfef19629bb6151848cf9975cd4006d89548d2 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:14:30 +0300 Subject: [PATCH 272/340] fix(DB/Loot): Strange Engine Part should be fishable (#17520) * fix(DB/Loot): Strange Engine Part should be fishable * repeatable + correct gold reward --- .../updates/pending_db_world/rev_1697438519978900900.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697438519978900900.sql diff --git a/data/sql/updates/pending_db_world/rev_1697438519978900900.sql b/data/sql/updates/pending_db_world/rev_1697438519978900900.sql new file mode 100644 index 00000000000000..84b1aa65d6e236 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697438519978900900.sql @@ -0,0 +1,8 @@ +-- Strange Engine Part +DELETE FROM `gameobject_loot_template` WHERE `Entry` = 19605 AND `Item` = 34469; +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(19605, 34469, 0, 0.5, 0, 1, 1, 1, 1, 'Strange Engine Part'); + +-- Make it repeatable + correct gold reward +UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags`|1 WHERE (`ID` = 11531); +UPDATE `quest_template` SET `RewardBonusMoney` = 75900 WHERE (`ID` = 11531); From 1ef50c31b35003caf32bced3e68b995edc575666 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:15:49 +0300 Subject: [PATCH 273/340] fix(Scripts/Spells): Script Leggings of Beast Mastery. (#17428) --- src/server/scripts/Spells/spell_hunter.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index d898922bed8b2a..fafe6bfd236f90 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -69,7 +69,8 @@ enum HunterSpells SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543, SPELL_HUNTER_GLYPH_OF_ARCANE_SHOT = 61389, SPELL_LOCK_AND_LOAD_TRIGGER = 56453, - SPELL_LOCK_AND_LOAD_MARKER = 67544 + SPELL_LOCK_AND_LOAD_MARKER = 67544, + SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY = 38297, // Leggings of Beast Mastery }; class spell_hun_check_pet_los : public SpellScript @@ -165,6 +166,10 @@ class spell_hun_generic_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY) && schoolMask == SPELL_SCHOOL_MASK_NORMAL) + { + amount += 490; + } } } @@ -180,6 +185,10 @@ class spell_hun_generic_scaling : public AuraScript AddPct(modifier, wildHuntEff->GetAmount()); amount = CalculatePct(std::max(0, owner->GetStat(Stats(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue))), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY)) + { + amount += 52; + } } } @@ -201,6 +210,10 @@ class spell_hun_generic_scaling : public AuraScript ownerAP += CalculatePct(owner->GetStat(STAT_STAMINA), HvWEff->GetAmount()); amount = CalculatePct(std::max(0, ownerAP), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY)) + { + amount += 70; + } } } From 12189ffc4be7c9b49829490a33b67f6dec1d5abe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Oct 2023 22:16:12 +0000 Subject: [PATCH 274/340] chore(DB): import pending files Referenced commit(s): 45bfef19629bb6151848cf9975cd4006d89548d2 --- .../rev_1697438519978900900.sql => db_world/2023_10_18_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697438519978900900.sql => db_world/2023_10_18_02.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1697438519978900900.sql b/data/sql/updates/db_world/2023_10_18_02.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1697438519978900900.sql rename to data/sql/updates/db_world/2023_10_18_02.sql index 84b1aa65d6e236..039a3cee41e492 100644 --- a/data/sql/updates/pending_db_world/rev_1697438519978900900.sql +++ b/data/sql/updates/db_world/2023_10_18_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_18_01 -> 2023_10_18_02 -- Strange Engine Part DELETE FROM `gameobject_loot_template` WHERE `Entry` = 19605 AND `Item` = 34469; INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES From a39175bc3b700ab1c9d4812ba0cefa3cc6744670 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:21:46 +0300 Subject: [PATCH 275/340] fix(Core/Spells): Demonic Knowledge missing 1% per rank (#17495) --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 ++-- src/server/game/Spells/Auras/SpellAuraEffects.h | 2 ++ src/server/scripts/Spells/spell_warlock.cpp | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 394621bf205ebd..431897eebcd84e 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -381,8 +381,8 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] = AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* caster): m_base(base), m_spellInfo(base->GetSpellInfo()), - m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_critChance(0), - m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex), + m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_dieSides(m_spellInfo->Effects[effIndex].DieSides), + m_critChance(0), m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex), m_canBeRecalculated(true), m_isPeriodic(false) { CalculatePeriodic(caster, true, false); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index b85984341aa104..6f0c05a27c3be1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -55,6 +55,7 @@ class AuraEffect uint32 GetId() const; uint32 GetEffIndex() const { return m_effIndex; } int32 GetBaseAmount() const { return m_baseAmount; } + int32 GetDieSides() const { return m_dieSides; } int32 GetAmplitude() const { return m_amplitude; } int32 GetMiscValueB() const; @@ -121,6 +122,7 @@ class AuraEffect SpellInfo const* const m_spellInfo; int32 const m_baseAmount; + int32 const m_dieSides; bool m_applyResilience; uint8 m_casterLevel; diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index a41ae5ba5a425c..b32ddc3608bd45 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -243,6 +243,7 @@ class spell_warl_demonic_aegis : public AuraScript } }; +// -35696 - Demonic Knowledge class spell_warl_demonic_knowledge : public AuraScript { PrepareAuraScript(spell_warl_demonic_knowledge); @@ -250,7 +251,10 @@ class spell_warl_demonic_knowledge : public AuraScript void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* caster = GetCaster()) - amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), aurEff->GetBaseAmount()); + { + uint8 pct = aurEff->GetBaseAmount() + aurEff->GetDieSides(); + amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), pct); + } } void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude) From c7324f30662d389949ff376e3c0012368a6a3523 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:19:59 +0200 Subject: [PATCH 276/340] fix(Scripts/Paladin): ensure Judgements of the Just procs Seal of Vengeance/Corruption (#17470) * initial * no spaces * add enum --- src/server/scripts/Spells/spell_paladin.cpp | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 55945914e41045..9b745e24d1f366 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -80,6 +80,12 @@ enum PaladinSpells SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531, SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364, + SPELL_JUDGEMENTS_OF_THE_JUST = 68055, + SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT = 31804, + SPELL_HOLY_VENGEANCE = 31803, + SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT = 53733, + SPELL_BLOOD_CORRUPTION = 53742, + SPELL_GENERIC_ARENA_DAMPENING = 74410, SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411 }; @@ -874,7 +880,26 @@ class spell_pal_judgement : public SpellScript // Judgement of the Just if (GetCaster()->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_PALADIN, 3015, 0)) - GetCaster()->CastSpell(GetHitUnit(), 68055, true); + { + if (GetCaster()->CastSpell(GetHitUnit(), SPELL_JUDGEMENTS_OF_THE_JUST, true) && (spellId2 == SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT || spellId2 == SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT)) + { + //hidden effect only cast when spellcast of judgements of the just is succesful + GetCaster()->CastSpell(GetHitUnit(), SealApplication(spellId2), true); //add hidden seal apply effect for vengeance and corruption + } + } + } + + uint32 SealApplication(uint32 correspondingSpellId) + { + switch (correspondingSpellId) + { + case SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT: + return SPELL_HOLY_VENGEANCE; + case SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT: + return SPELL_BLOOD_CORRUPTION; + default: + return 0; + } } void Register() override From 3537f0852597d00fcfd0ff7c1c6d2aa252a89952 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:35:56 -0700 Subject: [PATCH 277/340] fix(ci): docker build double quotes typo (#17541) --- .github/workflows/docker_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 4e2f5dd0361f65..ffc3104a7e9077 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -100,7 +100,7 @@ jobs: # If you're wanting containers without mod-eluna, the best solution is to # build them locally (such as with `docker compose build`) - name: Download Eluna - if: github.repository == "azerothcore/azerothcore-wotlk" && github.ref_name == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: actions/checkout@v4 with: repository: azerothcore/mod-eluna From 1b2593d763d692017f73487b6b2daaa72a702523 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Fri, 20 Oct 2023 03:39:39 +0300 Subject: [PATCH 278/340] fix(DB/Conditions): Scryer/Aldor repeatable quests (#17533) --- .../sql/updates/pending_db_world/rev_1697533767698549200.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697533767698549200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697533767698549200.sql b/data/sql/updates/pending_db_world/rev_1697533767698549200.sql new file mode 100644 index 00000000000000..d9c5eed94c058e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697533767698549200.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceGroup` = 0 AND `SourceEntry` IN (10024,10017); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 10024, 0, 0, 5, 0, 934, 7, 0, 0, 0, 0, '', 'Show quest \'Voren\'thal\'s Visions\' only if the player is unfriendly or lower towards The Scryers.'), +(19, 0, 10017, 0, 0, 5, 0, 932, 7, 0, 0, 0, 0, '', 'Show quest \'Strained Supplies\' only if the player is unfriendly or lower towards The Aldor.'); From de6ece24629ac2dcee028b7997cb37c093a41cf9 Mon Sep 17 00:00:00 2001 From: Ludwig Date: Fri, 20 Oct 2023 02:40:08 +0200 Subject: [PATCH 279/340] =?UTF-8?q?fix(Core/Spells):=20interrupt=20midsumm?= =?UTF-8?q?er=20ribbonpole=20dance=20on=20mount=20or=20sp=E2=80=A6=20(#174?= =?UTF-8?q?42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): interrupt midsummer ribbonpole dance on mount or spell cast --- src/server/game/Spells/SpellInfoCorrections.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index ff52a96b66b6aa..d52f7eeb944570 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4578,6 +4578,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->ChannelInterruptFlags |= AURA_INTERRUPT_FLAG_MOVE; }); + // Holiday - Midsummer, Ribbon Pole Periodic Visual + ApplySpellFix({ 45406 }, [](SpellInfo* spellInfo) + { + spellInfo->AuraInterruptFlags |= ( AURA_INTERRUPT_FLAG_MOUNT | AURA_INTERRUPT_FLAG_CAST ); + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 470f228bbb5d16ea08d8344032e003a5400f3152 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 00:40:46 +0000 Subject: [PATCH 280/340] chore(DB): import pending files Referenced commit(s): 1b2593d763d692017f73487b6b2daaa72a702523 --- .../rev_1697533767698549200.sql => db_world/2023_10_20_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697533767698549200.sql => db_world/2023_10_20_00.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1697533767698549200.sql b/data/sql/updates/db_world/2023_10_20_00.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1697533767698549200.sql rename to data/sql/updates/db_world/2023_10_20_00.sql index d9c5eed94c058e..77fa00ad0b2f35 100644 --- a/data/sql/updates/pending_db_world/rev_1697533767698549200.sql +++ b/data/sql/updates/db_world/2023_10_20_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_18_02 -> 2023_10_20_00 -- DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceGroup` = 0 AND `SourceEntry` IN (10024,10017); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 6bb16b0c7d6bc780f2f0bb8678f0f5f20167af05 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Fri, 20 Oct 2023 03:44:04 +0300 Subject: [PATCH 281/340] fix(DB/Creature): Adyen the Lightwarden being immune to PC. (#17414) --- data/sql/updates/pending_db_world/rev_1696414669144836700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696414669144836700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696414669144836700.sql b/data/sql/updates/pending_db_world/rev_1696414669144836700.sql new file mode 100644 index 00000000000000..70d9958f2e00fb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696414669144836700.sql @@ -0,0 +1,2 @@ +-- Adyen the Lightwarden +UPDATE `creature_template` SET `unit_flags` = `unit_flags`&~256 WHERE `entry` = 18537; From e0480b1321b08c39a3e3780c46d2b1d7317a93a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 00:45:26 +0000 Subject: [PATCH 282/340] chore(DB): import pending files Referenced commit(s): 6bb16b0c7d6bc780f2f0bb8678f0f5f20167af05 --- .../rev_1696414669144836700.sql => db_world/2023_10_20_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696414669144836700.sql => db_world/2023_10_20_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/rev_1696414669144836700.sql b/data/sql/updates/db_world/2023_10_20_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1696414669144836700.sql rename to data/sql/updates/db_world/2023_10_20_01.sql index 70d9958f2e00fb..8c9e8cc0e2c7be 100644 --- a/data/sql/updates/pending_db_world/rev_1696414669144836700.sql +++ b/data/sql/updates/db_world/2023_10_20_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_10_20_00 -> 2023_10_20_01 -- Adyen the Lightwarden UPDATE `creature_template` SET `unit_flags` = `unit_flags`&~256 WHERE `entry` = 18537; From e3592f7de7bcf8893061ebc1284ce0436b95be40 Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Thu, 19 Oct 2023 21:46:00 -0300 Subject: [PATCH 283/340] fix(Scripts/Quest): improve Path of Conquest (#16353) * fix(DB/Quest): improve Path of Conquest * update * Update rev_1684800494817311100.sql * . * . --- .../rev_1684800494817311100.sql | 19 ++++++ .../Outland/zone_shadowmoon_valley.cpp | 67 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1684800494817311100.sql diff --git a/data/sql/updates/pending_db_world/rev_1684800494817311100.sql b/data/sql/updates/pending_db_world/rev_1684800494817311100.sql new file mode 100644 index 00000000000000..7f11f6793f7293 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1684800494817311100.sql @@ -0,0 +1,19 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_calling_korkron_or_wildhammer'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(38249, 'spell_calling_korkron_or_wildhammer'), +(38119, 'spell_calling_korkron_or_wildhammer'); + +UPDATE `creature_template` SET `ScriptName`='npc_korkron_or_wildhammer' WHERE `entry` IN (22059, 21998); + +UPDATE `creature_template` SET `speed_run` = 2.28571 WHERE `entry` IN (22059, 21998); + +SET @NPC_WILDHAMMER_GRYPHON_RIDER := 22059; +DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_WILDHAMMER_GRYPHON_RIDER; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES +(@NPC_WILDHAMMER_GRYPHON_RIDER, 0, 0, 'What is it, $r? Have you gathered some new information?', 12, 0, 100, 0, 0, 0, 19742, 0, 'SAY_LAND'); + +SET @NPC_KORKRON_WIND_RIDER := 21998; +DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_KORKRON_WIND_RIDER; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES +(@NPC_KORKRON_WIND_RIDER, 0, 0, 'Speak quickly, $n. We haven\'t much time!', 12, 0, 100, 0, 0, 0, 19675, 0, 'SAY_LAND'); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 021600e94e500f..00e2b6619f7aef 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1734,6 +1734,71 @@ class npc_shadowmoon_tuber_node : public CreatureScript } }; +enum KorWild +{ + SAY_LAND = 0, + POINT_LAND = 1 +}; + +class npc_korkron_or_wildhammer : public ScriptedAI +{ +public: + npc_korkron_or_wildhammer(Creature* creature) : ScriptedAI(creature) + { + creature->SetDisableGravity(true); + creature->SetHover(true); + } + + void Reset() override + { + me->SetReactState(REACT_PASSIVE); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + } + + void JustDied(Unit* /*killer*/) override + { + me->DespawnOrUnsummon(3s, 0s); + } + + void IsSummonedBy(WorldObject* summoner) override + { + _playerGUID = summoner->GetGUID(); + me->SetFacingToObject(summoner); + Position pos = summoner->GetPosition(); + me->GetMotionMaster()->MovePoint(POINT_LAND, pos); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_LAND) + { + if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID)) + Talk(SAY_LAND, player); + + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + } + } +private: + ObjectGuid _playerGUID; +}; + +class spell_calling_korkron_or_wildhammer : public SpellScript +{ + PrepareSpellScript(spell_calling_korkron_or_wildhammer); + + void SetDest(SpellDestination& dest) + { + // Adjust effect summon position + Position const offset = { -14.0f, -14.0f, 16.0f, 0.0f }; + dest.RelocateOffset(offset); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_calling_korkron_or_wildhammer::SetDest, EFFECT_0, TARGET_DEST_CASTER); + } +}; + void AddSC_shadowmoon_valley() { // Ours @@ -1755,4 +1820,6 @@ void AddSC_shadowmoon_valley() new npc_torloth_the_magnificent(); new npc_enraged_spirit(); new npc_shadowmoon_tuber_node(); + RegisterCreatureAI(npc_korkron_or_wildhammer); + RegisterSpellScript(spell_calling_korkron_or_wildhammer); } From 6a53acd9ed9396924a20d5d46160a685cd9a6d09 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 00:46:48 +0000 Subject: [PATCH 284/340] chore(DB): import pending files Referenced commit(s): e0480b1321b08c39a3e3780c46d2b1d7317a93a8 --- .../rev_1684800494817311100.sql => db_world/2023_10_20_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1684800494817311100.sql => db_world/2023_10_20_02.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1684800494817311100.sql b/data/sql/updates/db_world/2023_10_20_02.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1684800494817311100.sql rename to data/sql/updates/db_world/2023_10_20_02.sql index 7f11f6793f7293..589f57d5833f3c 100644 --- a/data/sql/updates/pending_db_world/rev_1684800494817311100.sql +++ b/data/sql/updates/db_world/2023_10_20_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_20_01 -> 2023_10_20_02 -- DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_calling_korkron_or_wildhammer'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 2c5994757486e6b584fa31179ab3a02418cadbe1 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:22:30 +0200 Subject: [PATCH 285/340] fix(DB/SSC): add Frostbrand Weapon proc to Greyheart Tidecaller (#17528) * initial * change to perma aura --- .../pending_db_world/greyheart-tidecaller-frostbrand.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql diff --git a/data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql b/data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql new file mode 100644 index 00000000000000..ce74741e6f3e0d --- /dev/null +++ b/data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry` = 21229; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(21229, 0, 0, 0, 1, 0, 0, '38620'); From b9087a46d1a5f17a52fd6458fa0229c3354d8c7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 10:23:41 +0000 Subject: [PATCH 286/340] chore(DB): import pending files Referenced commit(s): 2c5994757486e6b584fa31179ab3a02418cadbe1 --- .../2023_10_20_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/greyheart-tidecaller-frostbrand.sql => db_world/2023_10_20_03.sql} (84%) diff --git a/data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql b/data/sql/updates/db_world/2023_10_20_03.sql similarity index 84% rename from data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql rename to data/sql/updates/db_world/2023_10_20_03.sql index ce74741e6f3e0d..ea8448b82e5e74 100644 --- a/data/sql/updates/pending_db_world/greyheart-tidecaller-frostbrand.sql +++ b/data/sql/updates/db_world/2023_10_20_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_20_02 -> 2023_10_20_03 -- DELETE FROM `creature_template_addon` WHERE `entry` = 21229; INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES From 1510830147b283640133db53efaebabcb5d1752f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:49:53 +0300 Subject: [PATCH 287/340] fix(DB/Spell): Karazhan Bloodlust/Heroism (#17486) --- .../sql/updates/pending_db_world/rev_1697054767620988200.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697054767620988200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697054767620988200.sql b/data/sql/updates/pending_db_world/rev_1697054767620988200.sql new file mode 100644 index 00000000000000..68794057c9ba18 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697054767620988200.sql @@ -0,0 +1,5 @@ +-- Bloodlust/Heroism - Karazhan chest event +DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37472,37471); +INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES +(37472, 15000, 15000, 0, 0), +(37471, 15000, 15000, 0, 0); From 2217563fb1dc5143e3a9c386642f812dc2997465 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 12:50:59 +0000 Subject: [PATCH 288/340] chore(DB): import pending files Referenced commit(s): 1510830147b283640133db53efaebabcb5d1752f --- .../rev_1697054767620988200.sql => db_world/2023_10_20_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697054767620988200.sql => db_world/2023_10_20_04.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1697054767620988200.sql b/data/sql/updates/db_world/2023_10_20_04.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1697054767620988200.sql rename to data/sql/updates/db_world/2023_10_20_04.sql index 68794057c9ba18..12ba3f71b61a68 100644 --- a/data/sql/updates/pending_db_world/rev_1697054767620988200.sql +++ b/data/sql/updates/db_world/2023_10_20_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_20_03 -> 2023_10_20_04 -- Bloodlust/Heroism - Karazhan chest event DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37472,37471); INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES From ec724cda898b3bdca12c750abb213d1db8923798 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:26:07 +0200 Subject: [PATCH 289/340] chore(Core/Conf): Remove unused config (#17544) --- src/server/apps/worldserver/worldserver.conf.dist | 11 ----------- src/server/game/World/IWorld.h | 1 - src/server/game/World/World.cpp | 12 ------------ 3 files changed, 24 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 9770e459e6a571..8e728460b8fc97 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -1372,17 +1372,6 @@ DetectPosCollision = 1 CheckGameObjectLoS = 1 -# -# TargetPosRecalculateRange -# Description: Max distance from movement target point (+moving unit size) and targeted -# object (+size) after that new target movement point calculated. -# Range: 0.5-5.0 -# Default: 1.5 -# 0.5 - (Minimum, Contact Range, More sensitive reaction to target movement) -# 5.0 - (Maximum, Melee attack range, Less CPU usage) - -TargetPosRecalculateRange = 1.5 - # # PreloadAllNonInstancedMapGrids # Description: Preload all grids on all non-instanced maps. This will take a great amount diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index addd4069f0c6ce..f2ed3289b5e45b 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -506,7 +506,6 @@ enum Rates RATE_TALENT, RATE_CORPSE_DECAY_LOOTED, RATE_INSTANCE_RESET_TIME, - RATE_TARGET_POS_RECALCULATION_RANGE, RATE_DURABILITY_LOSS_ON_DEATH, RATE_DURABILITY_LOSS_DAMAGE, RATE_DURABILITY_LOSS_PARRY, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index dff5f5a9155ee2..f41e523b890614 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -586,18 +586,6 @@ void World::LoadConfigSettings(bool reload) for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) playerBaseMoveSpeed[i] = baseMoveSpeed[i] * _rate_values[RATE_MOVESPEED]; _rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption("Rate.Corpse.Decay.Looted", 0.5f); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = sConfigMgr->GetOption("TargetPosRecalculateRange", 1.5f); - if (_rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE) - { - LOG_ERROR("server.loading", "TargetPosRecalculateRange ({}) must be >= {}. Using {} instead.", _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = CONTACT_DISTANCE; - } - else if (_rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] > NOMINAL_MELEE_RANGE) - { - LOG_ERROR("server.loading", "TargetPosRecalculateRange ({}) must be <= {}. Using {} instead.", _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], NOMINAL_MELEE_RANGE, NOMINAL_MELEE_RANGE); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = NOMINAL_MELEE_RANGE; - } - _rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = sConfigMgr->GetOption("DurabilityLoss.OnDeath", 10.0f); if (_rate_values[RATE_DURABILITY_LOSS_ON_DEATH] < 0.0f) { From 332ff49c1327cf315ec79c7549dfd17239ea6823 Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Sat, 21 Oct 2023 02:11:02 +0330 Subject: [PATCH 290/340] refactor(Scripts/Commands): convert cs_reset to new system (#17546) Update cs_reset.cpp --- src/server/scripts/Commands/cs_reset.cpp | 214 +++++++++++------------ 1 file changed, 102 insertions(+), 112 deletions(-) diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index fc2f78ddcf7312..1f637315811132 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -30,10 +30,6 @@ EndScriptData */ #include "Player.h" #include "ScriptMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class reset_commandscript : public CommandScript @@ -45,48 +41,53 @@ class reset_commandscript : public CommandScript { static ChatCommandTable resetCommandTable = { - { "achievements", SEC_CONSOLE, true, &HandleResetAchievementsCommand, "" }, - { "honor", SEC_ADMINISTRATOR, true, &HandleResetHonorCommand, "" }, - { "level", SEC_ADMINISTRATOR, true, &HandleResetLevelCommand, "" }, - { "spells", SEC_ADMINISTRATOR, true, &HandleResetSpellsCommand, "" }, - { "stats", SEC_ADMINISTRATOR, true, &HandleResetStatsCommand, "" }, - { "talents", SEC_ADMINISTRATOR, true, &HandleResetTalentsCommand, "" }, - { "all", SEC_CONSOLE, true, &HandleResetAllCommand, "" } + { "achievements", HandleResetAchievementsCommand, SEC_CONSOLE, Console::Yes }, + { "honor", HandleResetHonorCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "level", HandleResetLevelCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "spells", HandleResetSpellsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "stats", HandleResetStatsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "talents", HandleResetTalentsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "all", HandleResetAllCommand, SEC_CONSOLE, Console::Yes } }; static ChatCommandTable commandTable = { - { "reset", SEC_ADMINISTRATOR, true, nullptr, "", resetCommandTable } + { "reset", resetCommandTable } }; return commandTable; } - static bool HandleResetAchievementsCommand(ChatHandler* handler, char const* args) + static bool HandleResetAchievementsCommand(ChatHandler*, Optional target) { - Player* target; - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid)) + if (!target) + { return false; + } - if (target) - target->ResetAchievements(); + Player* playerTarget = target->GetConnectedPlayer(); + + if (playerTarget) + playerTarget->ResetAchievements(); else - AchievementMgr::DeleteFromDB(targetGuid.GetCounter()); + AchievementMgr::DeleteFromDB(target->GetGUID().GetCounter()); return true; } - static bool HandleResetHonorCommand(ChatHandler* handler, char const* args) + static bool HandleResetHonorCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); - target->SetHonorPoints(0); - target->SetUInt32Value(PLAYER_FIELD_KILLS, 0); - target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0); - target->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0); - target->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0); - target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL); + playerTarget->SetHonorPoints(0); + playerTarget->SetUInt32Value(PLAYER_FIELD_KILLS, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0); + playerTarget->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL); return true; } @@ -123,156 +124,145 @@ class reset_commandscript : public CommandScript return true; } - static bool HandleResetLevelCommand(ChatHandler* handler, char const* args) + static bool HandleResetLevelCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { return false; + } - if (!HandleResetStatsOrLevelHelper(target)) + Player* playerTarget = target->GetConnectedPlayer(); + + if (!HandleResetStatsOrLevelHelper(playerTarget)) return false; - uint8 oldLevel = target->GetLevel(); + uint8 oldLevel = playerTarget->GetLevel(); // set starting level - uint32 startLevel = target->getClass() != CLASS_DEATH_KNIGHT + uint32 startLevel = playerTarget->getClass() != CLASS_DEATH_KNIGHT ? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) : sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL); - target->_ApplyAllLevelScaleItemMods(false); - target->SetLevel(startLevel); - target->InitRunes(); - target->InitStatsForLevel(true); - target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); - target->InitTalentForLevel(); - target->SetUInt32Value(PLAYER_XP, 0); + playerTarget->_ApplyAllLevelScaleItemMods(false); + playerTarget->SetLevel(startLevel); + playerTarget->InitRunes(); + playerTarget->InitStatsForLevel(true); + playerTarget->InitTaxiNodesForLevel(); + playerTarget->InitGlyphsForLevel(); + playerTarget->InitTalentForLevel(); + playerTarget->SetUInt32Value(PLAYER_XP, 0); - target->_ApplyAllLevelScaleItemMods(true); + playerTarget->_ApplyAllLevelScaleItemMods(true); // reset level for pet - if (Pet* pet = target->GetPet()) + if (Pet* pet = playerTarget->GetPet()) pet->SynchronizeLevelWithOwner(); - sScriptMgr->OnPlayerLevelChanged(target, oldLevel); + sScriptMgr->OnPlayerLevelChanged(playerTarget, oldLevel); return true; } - static bool HandleResetSpellsCommand(ChatHandler* handler, char const* args) + static bool HandleResetSpellsCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - std::string targetName; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } + + if (!target) + { return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); if (target) { - target->resetSpells(/* bool myClassOnly */); + playerTarget->resetSpells(/* bool myClassOnly */); - ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS); - if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) - handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str()); + ChatHandler(playerTarget->GetSession()).SendSysMessage(LANG_RESET_SPELLS); + if (!handler->GetSession() || handler->GetSession()->GetPlayer() != playerTarget) + handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget).c_str()); } else { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->SetData(0, uint16(AT_LOGIN_RESET_SPELLS)); - stmt->SetData(1, targetGuid.GetCounter()); + stmt->SetData(1, playerTarget->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); - handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, targetName.c_str()); + handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, target->GetName()); } return true; } - static bool HandleResetStatsCommand(ChatHandler* handler, char const* args) + static bool HandleResetStatsCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); - if (!HandleResetStatsOrLevelHelper(target)) + if (!HandleResetStatsOrLevelHelper(playerTarget)) return false; - target->InitRunes(); - target->InitStatsForLevel(true); - target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); - target->InitTalentForLevel(); + playerTarget->InitRunes(); + playerTarget->InitStatsForLevel(true); + playerTarget->InitTaxiNodesForLevel(); + playerTarget->InitGlyphsForLevel(); + playerTarget->InitTalentForLevel(); return true; } - static bool HandleResetTalentsCommand(ChatHandler* handler, char const* args) + static bool HandleResetTalentsCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - std::string targetName; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) - { - // Try reset talents as Hunter Pet - Creature* creature = handler->getSelectedCreature(); - if (!*args && creature && creature->IsPet()) - { - Unit* owner = creature->GetOwner(); - if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer())) - { - creature->ToPet()->resetTalents(); - 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()); - } - return true; - } + Player* targetPlayer = nullptr; + if (target) + { + targetPlayer = target->GetConnectedPlayer(); + } + else + { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); handler->SetSentErrorMessage(true); return false; } - if (target) + if (targetPlayer) { - 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); + targetPlayer->resetTalents(true); + targetPlayer->SendTalentsInfoData(false); + ChatHandler(targetPlayer->GetSession()).SendSysMessage(LANG_RESET_TALENTS); + if (!handler->GetSession() || handler->GetSession()->GetPlayer() != targetPlayer) + handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer).c_str()); + + Pet* pet = targetPlayer->GetPet(); + Pet::resetTalentsForAllPetsOf(targetPlayer, pet); if (pet) - target->SendTalentsInfoData(true); + targetPlayer->SendTalentsInfoData(true); return true; } - else if (targetGuid) + else { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->SetData(0, uint16(AT_LOGIN_RESET_TALENTS | AT_LOGIN_RESET_PET_TALENTS)); - stmt->SetData(1, targetGuid.GetCounter()); + stmt->SetData(1, target->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); - std::string nameLink = handler->playerLink(targetName); + std::string nameLink = handler->playerLink(target->GetName()); handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink.c_str()); return true; } - - handler->SendSysMessage(LANG_NO_CHAR_SELECTED); - handler->SetSentErrorMessage(true); - return false; } - static bool HandleResetAllCommand(ChatHandler* handler, char const* args) + static bool HandleResetAllCommand(ChatHandler* handler, std::string_view caseName) { - if (!*args) - return false; - - std::string caseName = args; - AtLoginFlags atLogin; // Command specially created as single command to prevent using short case names @@ -292,7 +282,7 @@ class reset_commandscript : public CommandScript } else { - handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, args); + handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, caseName); handler->SetSentErrorMessage(true); return false; } @@ -303,7 +293,7 @@ class reset_commandscript : public CommandScript std::shared_lock lock(*HashMapHolder::GetLock()); HashMapHolder::MapType const& plist = ObjectAccessor::GetPlayers(); - for (HashMapHolder::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) + for (auto itr = plist.begin(); itr != plist.end(); ++itr) itr->second->SetAtLoginFlag(atLogin); return true; From 359985dd4ca277f8dd2d22db814f789664227c0b Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 01:41:26 +0300 Subject: [PATCH 291/340] feat(Core/Conditions): Add GoState condition for near gameobject. (#17524) * feat(Core/Conditions): Add GoState check for near gameobject. * log_error * Update ConditionMgr.h --- src/server/game/Conditions/ConditionMgr.cpp | 22 +++++++++++++++++---- src/server/game/Conditions/ConditionMgr.h | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index d43a96f5b73d80..62751edba4ac1e 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -289,8 +289,22 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) } case CONDITION_NEAR_GAMEOBJECT: { - condMeets = static_cast(GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))); - break; + if (!ConditionValue3) + { + condMeets = static_cast(GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))); + break; + } + else + { + if (GameObject* go = GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))) + { + if ((go->GetGoState() == GO_STATE_READY && ConditionValue3 == 1) || (go->GetGoState() != GO_STATE_READY && ConditionValue3 == 2)) + condMeets = true; + else + condMeets = false; + } + break; + } } case CONDITION_OBJECT_ENTRY_GUID: { @@ -2124,8 +2138,8 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) LOG_ERROR("sql.sql", "NearGameObject condition has non existing gameobject template entry ({}), skipped", cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - LOG_ERROR("sql.sql", "NearGameObject condition has useless data in value3 ({})!", cond->ConditionValue3); + if (cond->ConditionValue3 > 2) + LOG_ERROR("sql.sql", "NearGameObject condition for gameobject ID ({}) has data over 2 for value3 ({})!", cond->ConditionValue1, cond->ConditionValue3); break; } case CONDITION_OBJECT_ENTRY_GUID: diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 185a5e1bdafcda..9f963a96fddd2c 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -62,7 +62,7 @@ enum ConditionTypes CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement) CONDITION_QUEST_COMPLETE = 28, // quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded CONDITION_NEAR_CREATURE = 29, // creature entry distance dead true if there is a creature of entry in range - CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance 0 true if there is a gameobject of entry in range + CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance GoState true if there is a gameobject of entry in range (param3 can check for GoState, 0 = dont't check, 1 = Ready , 2 = Not Ready) CONDITION_OBJECT_ENTRY_GUID = 31, // TypeID entry guid/Attackable true if object is type TypeID and the entry is 0 or matches entry of the object or matches guid of the object CONDITION_TYPE_MASK = 32, // TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask CONDITION_RELATION_TO = 33, // ConditionTarget RelationType 0 true if object is in given relation with object specified by ConditionTarget From 2c28cc0eb7de65329d1167f631f0abf92e071cc3 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 02:39:04 +0300 Subject: [PATCH 292/340] fix(DB/Items): Unhatched Jubling Egg obtaining + RP (#17478) --- .../rev_1696938364647176900.sql | 38 +++++++++++++++++++ src/server/scripts/Spells/spell_generic.cpp | 30 +++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696938364647176900.sql diff --git a/data/sql/updates/pending_db_world/rev_1696938364647176900.sql b/data/sql/updates/pending_db_world/rev_1696938364647176900.sql new file mode 100644 index 00000000000000..9c49d78d6fbd7b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696938364647176900.sql @@ -0,0 +1,38 @@ +-- Morja +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 6227) AND (`SourceEntry` = 7401); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 6227, 7401, 0, 0, 8, 0, 7946, 0, 0, 0, 0, 0, '', 'Show gossip menu only if quest \'Spawn of Jubjub\' has been completed.'); + +DELETE FROM `npc_text` WHERE `ID`=7401; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`) VALUES +(7401, '', 'I\'m so happy that Jubjub returned! I only hope that I don\'t run out of Dark Iron ale soon, or I fear my pet frog might once again escape!', 10169); + +DELETE FROM `creature_text` WHERE `CreatureID`=14871; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(14871, 0, 0, 'Hi Jubjub. I missed you!', 12, 0, 100, 0, 0, 0, 10170, 0, 'Morja - Jubjub Summon'), +(14871, 1, 0, 'Jubjub? Where are you, Jubjub? Oh no! Where did you go this time!', 12, 0, 100, 0, 0, 0, 10171, 0, 'Morja - Jubjub Despawn'); + +DELETE FROM `gossip_menu` WHERE (`MenuID` = 6227) AND (`TextID` = 7401); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(6227, 7401); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14871; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 14871); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1487100); +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`, `event_param6`, `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 +(14871, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - On Respawn - Remove Npc Flags Questgiver'), +(14871, 0, 1, 0, 38, 0, 100, 0, 1, 1, 60000, 60000, 0, 0, 80, 1487100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - On Data Set 1 1 - Run Script'), +(1487100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Say Line 0'), +(1487100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Add Npc Flags Questgiver'), +(1487100, 9, 2, 0, 0, 0, 100, 0, 60000, 60000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Say Line 1'), +(1487100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Remove Npc Flags Questgiver'); + +-- Dark Iron Ale +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 165578) AND (`source_type` = 1) AND (`id` IN (3)); +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`, `event_param6`, `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 +(165578, 1, 3, 0, 63, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 14871, 5, 0, 0, 0, 0, 0, 0, 'Dark Iron Ale Mug - On Just Created - Set Data to Morja'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=23853 AND `ScriptName`='spell_gen_jubling_cooldown'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(23853, 'spell_gen_jubling_cooldown'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 2035ec5a30a469..1e4d4b184af55a 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5047,6 +5047,35 @@ class spell_gen_planting_scourge_banner : public SpellScript } }; +enum Jubling +{ + SPELL_JUBLING_COOLDOWN_1_WEEK = 23852 +}; + +// 23853 - Jubling Cooldown +class spell_gen_jubling_cooldown : public SpellScript +{ + PrepareSpellScript(spell_gen_jubling_cooldown); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_JUBLING_COOLDOWN_1_WEEK }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + { + target->CastSpell(target, SPELL_JUBLING_COOLDOWN_1_WEEK); // 1 week + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_jubling_cooldown::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5197,4 +5226,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_spirit_of_competition_winner); RegisterSpellScript(spell_gen_valthalak_amulet); RegisterSpellScript(spell_gen_planting_scourge_banner); + RegisterSpellScript(spell_gen_jubling_cooldown); } From ac30d8f6fc8efb8d4c1b773eb37a350373148a7f Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:39:34 -0400 Subject: [PATCH 293/340] fix(CI): Ensure targeted stage for docker is specified in CI (#17545) --- .github/actions/docker-tag-and-build/action.yml | 1 + apps/docker/Dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/docker-tag-and-build/action.yml b/.github/actions/docker-tag-and-build/action.yml index 6a37cb53a15b67..af988bed6894b7 100644 --- a/.github/actions/docker-tag-and-build/action.yml +++ b/.github/actions/docker-tag-and-build/action.yml @@ -32,6 +32,7 @@ runs: file: apps/docker/Dockerfile push: ${{ inputs.push }} tags: ${{ steps.meta.outputs.tags }} + target: ${{ inputs.component-name }} build-args: | USER_ID=1000 GROUP_ID=1000 diff --git a/apps/docker/Dockerfile b/apps/docker/Dockerfile index 61643260725e3f..d500efe438d0a6 100644 --- a/apps/docker/Dockerfile +++ b/apps/docker/Dockerfile @@ -243,13 +243,13 @@ RUN mkdir -pv /azerothcore/env/dist/Cameras \ /azerothcore/env/dist/vmaps COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ - /azerothcore/env/dist/bin/map_extractor /azerothcore/env/dist/map_extractor + /azerothcore/env/dist/bin/map_extractor /azerothcore/env/dist/bin/map_extractor COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ - /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/dist/mmaps_generator + /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/dist/bin/mmaps_generator COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ - /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/dist/vmap4_assembler + /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/dist/bin/vmap4_assembler COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ - /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/vmap4_extractor + /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/bin/vmap4_extractor From fd183a4f96c07cf4eed9fc5f10effa9822f6fe0e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 23:40:13 +0000 Subject: [PATCH 294/340] chore(DB): import pending files Referenced commit(s): 2c28cc0eb7de65329d1167f631f0abf92e071cc3 --- .../rev_1696938364647176900.sql => db_world/2023_10_20_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696938364647176900.sql => db_world/2023_10_20_05.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1696938364647176900.sql b/data/sql/updates/db_world/2023_10_20_05.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1696938364647176900.sql rename to data/sql/updates/db_world/2023_10_20_05.sql index 9c49d78d6fbd7b..e1c094bf44ea36 100644 --- a/data/sql/updates/pending_db_world/rev_1696938364647176900.sql +++ b/data/sql/updates/db_world/2023_10_20_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_20_04 -> 2023_10_20_05 -- Morja DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 6227) AND (`SourceEntry` = 7401); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 894732f11e6f0fa1edcbb8d48e29f82aae703883 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 02:49:17 +0300 Subject: [PATCH 295/340] fix(Scripts/EscortAI): Do not remove auras on evade (#17542) --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index fc8212b0cd22ea..7369277d59319e 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -200,7 +200,6 @@ void npc_escortAI::ReturnToLastPoint() void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/) { - me->RemoveAllAuras(); me->GetThreatMgr().ClearAllThreat(); me->CombatStop(true); me->SetLootRecipient(nullptr); From 39bad395c208fb804f307ef79259831aac661db6 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:10:00 +0300 Subject: [PATCH 296/340] fix(Core/Spells): Script Yeh'kinya's Bramble (#17516) * fix(Core/Spells): Script Yeh'kinya's Bramble * rogue screechers --- .../rev_1697371691796198300.sql | 5 ++++ src/server/scripts/Spells/spell_generic.cpp | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697371691796198300.sql diff --git a/data/sql/updates/pending_db_world/rev_1697371691796198300.sql b/data/sql/updates/pending_db_world/rev_1697371691796198300.sql new file mode 100644 index 00000000000000..ad4346251f1f50 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697371691796198300.sql @@ -0,0 +1,5 @@ +-- Yehkinya Bramble +DELETE FROM `spell_script_names` WHERE `spell_id`=12699 AND `ScriptName`='spell_gen_yehkinya_bramble'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (12699, 'spell_gen_yehkinya_bramble'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 12699) AND (`SourceId` = 0); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 1e4d4b184af55a..bfd937f033940b 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5076,6 +5076,32 @@ class spell_gen_jubling_cooldown : public SpellScript } }; +// 12699 - Yeh'kinya's Bramble +enum YehkinyaBramble +{ + NPC_VALE_SCREECHER = 5307, + NPC_ROGUE_VALE_SCREECHER = 5308 +}; + +class spell_gen_yehkinya_bramble : public SpellScript +{ + PrepareSpellScript(spell_gen_yehkinya_bramble) + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if ((target->GetEntry() == NPC_VALE_SCREECHER || target->GetEntry() == NPC_ROGUE_VALE_SCREECHER) && target->isDead()) + return SPELL_CAST_OK; + + return SPELL_FAILED_BAD_TARGETS; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_yehkinya_bramble::CheckCast); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5227,4 +5253,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_valthalak_amulet); RegisterSpellScript(spell_gen_planting_scourge_banner); RegisterSpellScript(spell_gen_jubling_cooldown); + RegisterSpellScript(spell_gen_yehkinya_bramble); } From 5bf64a164a7d8a9f4767af63d04988a037dfae4f Mon Sep 17 00:00:00 2001 From: Hasn Date: Sat, 21 Oct 2023 13:10:34 +0200 Subject: [PATCH 297/340] fix(Core/Player) Stop small durability loss from still occuring when DurabilityLoss options in worldserver.conf are set to 0 (#17407) Fix durability loss even when "DurabilityLoss"-settings in worldserver.conf are zeroed --- src/server/game/Entities/Player/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4d885098c0d509..14adb01c826c79 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4653,7 +4653,7 @@ void Player::DurabilityLossAll(double percent, bool inventory) void Player::DurabilityLoss(Item* item, double percent) { - if(!item) + if(!item || percent == 0.0) return; uint32 pMaxDurability = item ->GetUInt32Value(ITEM_FIELD_MAXDURABILITY); From feae5ee61810ddb5c67de5632bcc72549fe19c43 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 11:11:21 +0000 Subject: [PATCH 298/340] chore(DB): import pending files Referenced commit(s): 39bad395c208fb804f307ef79259831aac661db6 --- .../rev_1697371691796198300.sql => db_world/2023_10_21_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697371691796198300.sql => db_world/2023_10_21_00.sql} (89%) diff --git a/data/sql/updates/pending_db_world/rev_1697371691796198300.sql b/data/sql/updates/db_world/2023_10_21_00.sql similarity index 89% rename from data/sql/updates/pending_db_world/rev_1697371691796198300.sql rename to data/sql/updates/db_world/2023_10_21_00.sql index ad4346251f1f50..c1d5352fe1a18e 100644 --- a/data/sql/updates/pending_db_world/rev_1697371691796198300.sql +++ b/data/sql/updates/db_world/2023_10_21_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_20_05 -> 2023_10_21_00 -- Yehkinya Bramble DELETE FROM `spell_script_names` WHERE `spell_id`=12699 AND `ScriptName`='spell_gen_yehkinya_bramble'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (12699, 'spell_gen_yehkinya_bramble'); From fb8e34367707ae204b6238122e30d96d6f06cbee Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Sat, 21 Oct 2023 08:12:22 -0300 Subject: [PATCH 299/340] fix(Core/Arena): Fix logging scores in db (#17504) --- src/server/game/Battlegrounds/Arena.cpp | 16 +++++++++++++--- src/server/game/Battlegrounds/Battleground.h | 3 --- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp index bfc27f00d19783..1c4a873d583baf 100644 --- a/src/server/game/Battlegrounds/Arena.cpp +++ b/src/server/game/Battlegrounds/Arena.cpp @@ -242,6 +242,7 @@ void Arena::EndBattleground(TeamId winnerTeamId) uint8 memberId = 0; for (auto const& [playerGuid, arenaLogEntryData] : ArenaLogEntries) { + auto const& score = PlayerScores.find(playerGuid.GetCounter()); stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_LOG_MEMBERSTATS); stmt2->SetData(0, fightId); stmt2->SetData(1, ++memberId); @@ -250,9 +251,18 @@ void Arena::EndBattleground(TeamId winnerTeamId) stmt2->SetData(4, arenaLogEntryData.ArenaTeamId); stmt2->SetData(5, arenaLogEntryData.Acc); stmt2->SetData(6, arenaLogEntryData.IP); - stmt2->SetData(7, arenaLogEntryData.DamageDone); - stmt2->SetData(8, arenaLogEntryData.HealingDone); - stmt2->SetData(9, arenaLogEntryData.KillingBlows); + if (score != PlayerScores.end()) + { + stmt2->SetData(7, score->second->GetDamageDone()); + stmt2->SetData(8, score->second->GetHealingDone()); + stmt2->SetData(9, score->second->GetKillingBlows()); + } + else + { + stmt2->SetData(7, 0); + stmt2->SetData(8, 0); + stmt2->SetData(9, 0); + } trans->Append(stmt2); } diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index e60c511d2d74ea..710c324128e7bc 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -267,9 +267,6 @@ class ArenaLogEntryData uint32 Acc{0}; uint32 ArenaTeamId{0}; std::string IP{}; - uint32 DamageDone{0}; - uint32 HealingDone{0}; - uint32 KillingBlows{0}; }; enum BGHonorMode From a0985f59b695d29308a2c5ae982a144ce9168457 Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Sat, 21 Oct 2023 14:52:53 +0330 Subject: [PATCH 300/340] refactor(Scripts/Commands): convert cs_ticket to new system (#17547) Update cs_ticket.cpp --- src/server/scripts/Commands/cs_ticket.cpp | 141 +++++++--------------- 1 file changed, 42 insertions(+), 99 deletions(-) diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 39b7c3780e933c..8e29933bccad88 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" -#include "Language.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" @@ -32,10 +31,6 @@ EndScriptData */ #include "ScriptMgr.h" #include "TicketMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class ticket_commandscript : public CommandScript @@ -47,48 +42,38 @@ class ticket_commandscript : public CommandScript { static ChatCommandTable ticketResponseCommandTable = { - { "append", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendCommand, "" }, - { "appendln", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendLnCommand, "" } + { "append", HandleGMTicketResponseAppendCommand, SEC_GAMEMASTER, Console::Yes }, + { "appendln", HandleGMTicketResponseAppendLnCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable ticketCommandTable = { - { "assign", SEC_GAMEMASTER, true, &HandleGMTicketAssignToCommand, "" }, - { "close", SEC_GAMEMASTER, true, &HandleGMTicketCloseByIdCommand, "" }, - { "closedlist", SEC_GAMEMASTER, true, &HandleGMTicketListClosedCommand, "" }, - { "comment", SEC_GAMEMASTER, true, &HandleGMTicketCommentCommand, "" }, - { "complete", SEC_GAMEMASTER, true, &HandleGMTicketCompleteCommand, "" }, - { "delete", SEC_ADMINISTRATOR, true, &HandleGMTicketDeleteByIdCommand, "" }, - { "escalate", SEC_GAMEMASTER, true, &HandleGMTicketEscalateCommand, "" }, - { "escalatedlist", SEC_GAMEMASTER, true, &HandleGMTicketListEscalatedCommand, "" }, - { "list", SEC_GAMEMASTER, true, &HandleGMTicketListCommand, "" }, - { "onlinelist", SEC_GAMEMASTER, true, &HandleGMTicketListOnlineCommand, "" }, - { "reset", SEC_CONSOLE, true, &HandleGMTicketResetCommand, "" }, - { "response", SEC_GAMEMASTER, true, nullptr, "", ticketResponseCommandTable }, - { "togglesystem", SEC_ADMINISTRATOR, true, &HandleToggleGMTicketSystem, "" }, - { "unassign", SEC_GAMEMASTER, true, &HandleGMTicketUnAssignCommand, "" }, - { "viewid", SEC_GAMEMASTER, true, &HandleGMTicketGetByIdCommand, "" }, - { "viewname", SEC_GAMEMASTER, true, &HandleGMTicketGetByNameCommand, "" } + { "assign", HandleGMTicketAssignToCommand, SEC_GAMEMASTER, Console::Yes }, + { "close", HandleGMTicketCloseByIdCommand, SEC_GAMEMASTER, Console::Yes }, + { "closedlist", HandleGMTicketListClosedCommand, SEC_GAMEMASTER, Console::Yes }, + { "comment", HandleGMTicketCommentCommand, SEC_GAMEMASTER, Console::Yes }, + { "complete", HandleGMTicketCompleteCommand, SEC_GAMEMASTER, Console::Yes }, + { "delete", HandleGMTicketDeleteByIdCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "escalate", HandleGMTicketEscalateCommand, SEC_GAMEMASTER, Console::Yes }, + { "escalatedlist", HandleGMTicketListEscalatedCommand, SEC_GAMEMASTER, Console::Yes }, + { "list", HandleGMTicketListCommand, SEC_GAMEMASTER, Console::Yes }, + { "onlinelist", HandleGMTicketListOnlineCommand, SEC_GAMEMASTER, Console::Yes }, + { "reset", HandleGMTicketResetCommand, SEC_CONSOLE, Console::Yes }, + + { "response", ticketResponseCommandTable }, + { "togglesystem", HandleToggleGMTicketSystem, SEC_ADMINISTRATOR, Console::Yes }, + { "unassign", HandleGMTicketUnAssignCommand, SEC_GAMEMASTER, Console::Yes }, + { "viewid", HandleGMTicketGetByIdCommand, SEC_GAMEMASTER, Console::Yes }, + { "viewname", HandleGMTicketGetByNameCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "ticket", SEC_GAMEMASTER, false, nullptr, "", ticketCommandTable } + { "ticket", ticketCommandTable } }; return commandTable; } - static bool HandleGMTicketAssignToCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketAssignToCommand(ChatHandler* handler, uint32 ticketId, std::string target) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - - char* targetStr = strtok(nullptr, " "); - if (!targetStr) - return false; - - std::string target(targetStr); if (!normalizePlayerName(target)) return false; @@ -138,12 +123,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -177,14 +158,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketCommentCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCommentCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - char* comment = strtok(nullptr, "\n"); if (!comment) return false; @@ -218,20 +193,14 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketListClosedCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListClosedCommand(ChatHandler* handler) { sTicketMgr->ShowClosedList(*handler); return true; } - static bool HandleGMTicketCompleteCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -272,12 +241,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket) { @@ -308,12 +273,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketEscalateCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketEscalateCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted() || ticket->GetEscalatedStatus() != TICKET_UNASSIGNED) { @@ -330,25 +291,25 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler) { sTicketMgr->ShowEscalatedList(*handler); return true; } - static bool HandleGMTicketListCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListCommand(ChatHandler* handler) { sTicketMgr->ShowList(*handler, false); return true; } - static bool HandleGMTicketListOnlineCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListOnlineCommand(ChatHandler* handler) { sTicketMgr->ShowList(*handler, true); return true; } - static bool HandleGMTicketResetCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketResetCommand(ChatHandler* handler) { if (sTicketMgr->GetOpenTicketCount()) { @@ -364,7 +325,7 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleToggleGMTicketSystem(ChatHandler* handler, char const* /*args*/) + static bool HandleToggleGMTicketSystem(ChatHandler* handler) { bool status = !sTicketMgr->GetStatus(); sTicketMgr->SetStatus(status); @@ -372,12 +333,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed()) { @@ -425,12 +382,8 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -442,16 +395,12 @@ class ticket_commandscript : public CommandScript ticket->SetViewed(); ticket->SaveToDB(trans); - handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str()); + handler->SendSysMessage(ticket->FormatMessageString(*handler, true)); return true; } - static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, std::string name) { - if (!*args) - return false; - - std::string name(args); if (!normalizePlayerName(name)) return false; @@ -485,18 +434,12 @@ class ticket_commandscript : public CommandScript ticket->SetViewed(); ticket->SaveToDB(trans); - handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str()); + handler->SendSysMessage(ticket->FormatMessageString(*handler, true)); return true; } - static bool _HandleGMTicketResponseAppendCommand(char const* args, bool newLine, ChatHandler* handler) + static bool _HandleGMTicketResponseAppendCommand(uint32 ticketId, bool newLine, ChatHandler* handler) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - char* response = strtok(nullptr, "\n"); if (!response) return false; @@ -526,14 +469,14 @@ class ticket_commandscript : public CommandScript return true; } - static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, uint32 ticketId) { - return _HandleGMTicketResponseAppendCommand(args, false, handler); + return _HandleGMTicketResponseAppendCommand(ticketId, false, handler); } - static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, uint32 ticketId) { - return _HandleGMTicketResponseAppendCommand(args, true, handler); + return _HandleGMTicketResponseAppendCommand(ticketId, true, handler); } }; From b281988dbc166f553844a08afcfb8582897c8beb Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:14:50 +0300 Subject: [PATCH 301/340] fix(DB/Spell): Karazhan Shadow Mend/Healing (#17496) --- .../sql/updates/pending_db_world/rev_1697185542266723800.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697185542266723800.sql diff --git a/data/sql/updates/pending_db_world/rev_1697185542266723800.sql b/data/sql/updates/pending_db_world/rev_1697185542266723800.sql new file mode 100644 index 00000000000000..b738162f61caa5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697185542266723800.sql @@ -0,0 +1,5 @@ +-- Shadow Mend/Healing - Karazhan chest event +DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37456,37455); +INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES +(37456, 20000, 20000, 0, 0), +(37455, 20000, 20000, 0, 0); From 228f6635c0acba196bf1225033f17cdf70bf4357 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:15:20 +0300 Subject: [PATCH 302/340] fix(Core/Scripts): ScriptEffect Frog Kiss (#17482) --- .../rev_1697002994350126800.sql | 6 ++++ .../scripts/Northrend/zone_grizzly_hills.cpp | 28 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697002994350126800.sql diff --git a/data/sql/updates/pending_db_world/rev_1697002994350126800.sql b/data/sql/updates/pending_db_world/rev_1697002994350126800.sql new file mode 100644 index 00000000000000..4729de0487fd0a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697002994350126800.sql @@ -0,0 +1,6 @@ +-- Duplicated gossip option +DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 10316) AND (`OptionID` = 1); + +DELETE FROM `spell_script_names` WHERE `spell_id`=62536 AND `ScriptName`='spell_frog_kiss'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(62536, 'spell_frog_kiss'); diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index e5cd77c38f60b7..255c4a4d5a59de 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -918,7 +918,8 @@ class npc_lake_frog : public CreatureScript player->AddAura(SPELL_WARTS, player); else { - DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM + // Removes SPELL_WARTSBGONE_LIP_BALM + player->CastSpell(player, SPELL_FROG_KISS, true); if (me->GetEntry() == NPC_LAKE_FROG) { @@ -1298,6 +1299,30 @@ class spell_warhead_fuse : public SpellScriptLoader } }; +// 62536 - Frog Kiss +class spell_frog_kiss : public SpellScript +{ + PrepareSpellScript(spell_frog_kiss); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_WARTSBGONE_LIP_BALM }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + { + target->RemoveAurasDueToSpell(SPELL_WARTSBGONE_LIP_BALM); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_frog_kiss::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_grizzly_hills() { // Theirs @@ -1319,4 +1344,5 @@ void AddSC_grizzly_hills() new spell_warhead_fuse(); RegisterSpellScript(spell_q12227_outhouse_groans); RegisterSpellScript(spell_q12227_camera_shake); + RegisterSpellScript(spell_frog_kiss); } From 216f4ba6e2901e1d09737374019fef66c0652927 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 12:16:00 +0000 Subject: [PATCH 303/340] chore(DB): import pending files Referenced commit(s): b281988dbc166f553844a08afcfb8582897c8beb --- .../rev_1697002994350126800.sql => db_world/2023_10_21_01.sql} | 1 + .../rev_1697185542266723800.sql => db_world/2023_10_21_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1697002994350126800.sql => db_world/2023_10_21_01.sql} (87%) rename data/sql/updates/{pending_db_world/rev_1697185542266723800.sql => db_world/2023_10_21_02.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1697002994350126800.sql b/data/sql/updates/db_world/2023_10_21_01.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1697002994350126800.sql rename to data/sql/updates/db_world/2023_10_21_01.sql index 4729de0487fd0a..376d10dd6a8595 100644 --- a/data/sql/updates/pending_db_world/rev_1697002994350126800.sql +++ b/data/sql/updates/db_world/2023_10_21_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_00 -> 2023_10_21_01 -- Duplicated gossip option DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 10316) AND (`OptionID` = 1); diff --git a/data/sql/updates/pending_db_world/rev_1697185542266723800.sql b/data/sql/updates/db_world/2023_10_21_02.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1697185542266723800.sql rename to data/sql/updates/db_world/2023_10_21_02.sql index b738162f61caa5..be03e4f3423b1b 100644 --- a/data/sql/updates/pending_db_world/rev_1697185542266723800.sql +++ b/data/sql/updates/db_world/2023_10_21_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_01 -> 2023_10_21_02 -- Shadow Mend/Healing - Karazhan chest event DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37456,37455); INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES From 3228d7d762fd3490d8b0dbf72a8a5df2ff75199a Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:28:16 +0300 Subject: [PATCH 304/340] fix(DB/Gameobject): Witherbark Village spell focus locations (#17463) * fix(DB/Gameobject):Witherbark Village spell focus locations * remove rotation --- .../sql/updates/pending_db_world/rev_1696847020812342700.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696847020812342700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696847020812342700.sql b/data/sql/updates/pending_db_world/rev_1696847020812342700.sql new file mode 100644 index 00000000000000..7bbaaf4f3cb5d1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696847020812342700.sql @@ -0,0 +1,5 @@ +-- Quest: Grim Message +DELETE FROM `gameobject` WHERE `id` = 142698; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(99872, 142698, 0, 0, 0, 1, 1, -21.77, -2802.7, 121.85, 0, 0, 0, 0, 0, 180, 0, 1, '', 0), +(99873, 142698, 0, 0, 0, 1, 1, -24.2883, -2468.25, 122.442, 0, 0, 0, 0, 0, 180, 0, 1, '', 0); From 8c8d459c6f80ff814bf1a21b7c5997eb73ef0592 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:28:57 +0300 Subject: [PATCH 305/340] fix(Core/Spells): Marked for Death affecting wrong spells. (#17406) --- src/server/game/Spells/SpellInfoCorrections.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index d52f7eeb944570..d290ef9e24b7e2 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -416,7 +416,7 @@ void SpellMgr::LoadSpellInfoCorrections() // Marked for Death ApplySpellFix({ 53241, 53243, 53244, 53245, 53246 }, [](SpellInfo* spellInfo) { - spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(423937, 276955137, 2049); + spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(399361, 276955137, 1); }); ApplySpellFix({ From 61e8bb7ee4baa8e545836e77ece4d21a524e2793 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 13:29:26 +0000 Subject: [PATCH 306/340] chore(DB): import pending files Referenced commit(s): 3228d7d762fd3490d8b0dbf72a8a5df2ff75199a --- .../rev_1696847020812342700.sql => db_world/2023_10_21_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696847020812342700.sql => db_world/2023_10_21_03.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1696847020812342700.sql b/data/sql/updates/db_world/2023_10_21_03.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1696847020812342700.sql rename to data/sql/updates/db_world/2023_10_21_03.sql index 7bbaaf4f3cb5d1..b0ff3b18473e72 100644 --- a/data/sql/updates/pending_db_world/rev_1696847020812342700.sql +++ b/data/sql/updates/db_world/2023_10_21_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_02 -> 2023_10_21_03 -- Quest: Grim Message DELETE FROM `gameobject` WHERE `id` = 142698; INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES From 8530460695d87e25a5f1e5c6df8b50c460df3e2a Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:29:42 +0300 Subject: [PATCH 307/340] fix(DB/SAI): Quest: Corrupted Sabers (#17435) --- .../rev_1696616045340960700.sql | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1696616045340960700.sql diff --git a/data/sql/updates/pending_db_world/rev_1696616045340960700.sql b/data/sql/updates/pending_db_world/rev_1696616045340960700.sql new file mode 100644 index 00000000000000..4c69d50dbf0177 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1696616045340960700.sql @@ -0,0 +1,31 @@ +-- Quest: Corrupted Sabers +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 55002) AND (`SourceEntry` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 55002, 1, 0, 0, 47, 0, 4506, 8, 0, 0, 0, 0, '', 'Show Corrupted Saber gossip menu option only if player is on the quest "Corrupted Sabers".'); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (9936,10042); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(10042, 0, 0, '%s follows $n obediently.', 16, 0, 100, 0, 0, 0, 5940, 0, 'Corrupted Saber'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `gossip_menu_id` = 55002, `npcflag` = `npcflag`|1 WHERE (`entry` = 10042); +UPDATE `creature_template` SET `AIName` = '', `gossip_menu_id` = 0, `npcflag` = `npcflag`&~1 WHERE (`entry` = 9936); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 9937); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 993700); +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`, `event_param6`, `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 +(9937, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 993700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Just Summoned - Run Script'), +(9937, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Just Summoned - Remove Npc Flags Gossip'), +(9937, 0, 2, 3, 75, 0, 100, 0, 0, 9996, 5, 2000, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Distance 5y To Creature - Set Rooted On'), +(9937, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Distance 5y To Creature - Add Npc Flags Gossip'), +(9937, 0, 4, 5, 62, 0, 100, 0, 55002, 1, 0, 0, 0, 0, 26, 4506, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Quest Credit \'Corrupted Sabers\' to Owner or Summoner'), +(9937, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Close Gossip'), +(9937, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Despawn In 10000 ms'), +(993700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Say Line 0'), +(993700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 136, 1, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Set Run Speed to 0.5'), +(993700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 4582.23, -216.14, 300.23, 0, 'Common Kitten - Actionlist - Move To Position'), +(993700, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 36, 10042, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Update Template To \'Corrupted Saber\''), +(993700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 16510, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Cast \'Corrupted Saber Visual (DND)\''), +(993700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Remove Npc Flags Gossip'), +(993700, 9, 6, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Say Line 0'), +(993700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 29, 2, 90, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Start Follow Owner Or Summoner'), +(993700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 136, 1, 1, 42, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Set Run Speed to 1.42'); From 8a7fee53df3b8943080445108489e47176559035 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 13:30:08 +0000 Subject: [PATCH 308/340] chore(DB): import pending files Referenced commit(s): 8c8d459c6f80ff814bf1a21b7c5997eb73ef0592 --- .../rev_1696616045340960700.sql => db_world/2023_10_21_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1696616045340960700.sql => db_world/2023_10_21_04.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1696616045340960700.sql b/data/sql/updates/db_world/2023_10_21_04.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1696616045340960700.sql rename to data/sql/updates/db_world/2023_10_21_04.sql index 4c69d50dbf0177..4b6a276458188e 100644 --- a/data/sql/updates/pending_db_world/rev_1696616045340960700.sql +++ b/data/sql/updates/db_world/2023_10_21_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_03 -> 2023_10_21_04 -- Quest: Corrupted Sabers DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 55002) AND (`SourceEntry` = 1); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 25328b54f9f2d602f2f59a8c68878052fe1ca72b Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:48:39 -0300 Subject: [PATCH 309/340] fix(Scripts/Mechanar): Remove polarity shift stacks on polarity change (#17548) --- .../TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 79568a64b154bd..d83619f0cc9448 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -208,7 +208,11 @@ class spell_capacitus_polarity_shift : public SpellScript void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) + { + target->RemoveAurasDueToSpell(SPELL_POSITIVE_CHARGE_STACK); + target->RemoveAurasDueToSpell(SPELL_NEGATIVE_CHARGE_STACK); target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, nullptr, nullptr, GetCaster()->GetGUID()); + } } void Register() override From 1894e13a098342d21b7a6f9d2257fd2b27581248 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 22 Oct 2023 01:00:30 +0300 Subject: [PATCH 310/340] feat(DB): Add column for comment (spell_cooldown_overrides) (#17487) --- .../pending_db_world/rev_1697055881866266500.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697055881866266500.sql diff --git a/data/sql/updates/pending_db_world/rev_1697055881866266500.sql b/data/sql/updates/pending_db_world/rev_1697055881866266500.sql new file mode 100644 index 00000000000000..ba35360a64cb3d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697055881866266500.sql @@ -0,0 +1,10 @@ +-- +ALTER TABLE `spell_cooldown_overrides` + ADD COLUMN `Comment` TEXT; + +UPDATE `spell_cooldown_overrides` SET `Comment`='Karazhan Chest - Heroism' WHERE `Id`=37471; +UPDATE `spell_cooldown_overrides` SET `Comment`='Karazhan Chest - Bloodlust' WHERE `Id`=37472; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Turbo Boost' WHERE `Id`=37920; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - World Breaker' WHERE `Id`=38006; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Sonic Boom' WHERE `Id`=38052; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Destroy Deathforged Infernal' WHERE `Id`=38055; From 5ea73fb9ef0d63e0adc26c452b6e53858021eae4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 22:01:35 +0000 Subject: [PATCH 311/340] chore(DB): import pending files Referenced commit(s): 1894e13a098342d21b7a6f9d2257fd2b27581248 --- .../rev_1697055881866266500.sql => db_world/2023_10_21_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697055881866266500.sql => db_world/2023_10_21_05.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1697055881866266500.sql b/data/sql/updates/db_world/2023_10_21_05.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1697055881866266500.sql rename to data/sql/updates/db_world/2023_10_21_05.sql index ba35360a64cb3d..522eefeae6d3cf 100644 --- a/data/sql/updates/pending_db_world/rev_1697055881866266500.sql +++ b/data/sql/updates/db_world/2023_10_21_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_04 -> 2023_10_21_05 -- ALTER TABLE `spell_cooldown_overrides` ADD COLUMN `Comment` TEXT; From 4fa74c1152f90a2479f76a6dfc86b5bb2f6db631 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Oct 2023 19:42:06 -0300 Subject: [PATCH 312/340] fix(DB/Creature): Shade of Aran should not path (#17550) --- data/sql/updates/pending_db_world/rev_1697923671065331000.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697923671065331000.sql diff --git a/data/sql/updates/pending_db_world/rev_1697923671065331000.sql b/data/sql/updates/pending_db_world/rev_1697923671065331000.sql new file mode 100644 index 00000000000000..ee7a9c718a35b8 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697923671065331000.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_addon` WHERE `guid` = 135692; +DELETE FROM `waypoint_data` WHERE `id` = 1356920; +UPDATE `creature` SET `MovementType` = 1 WHERE `guid` = 135692; From bf2128552803d552cec8b010369101059f7dfd13 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 22:43:13 +0000 Subject: [PATCH 313/340] chore(DB): import pending files Referenced commit(s): 4fa74c1152f90a2479f76a6dfc86b5bb2f6db631 --- .../rev_1697923671065331000.sql => db_world/2023_10_21_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697923671065331000.sql => db_world/2023_10_21_06.sql} (79%) diff --git a/data/sql/updates/pending_db_world/rev_1697923671065331000.sql b/data/sql/updates/db_world/2023_10_21_06.sql similarity index 79% rename from data/sql/updates/pending_db_world/rev_1697923671065331000.sql rename to data/sql/updates/db_world/2023_10_21_06.sql index ee7a9c718a35b8..9b3a02f60b385a 100644 --- a/data/sql/updates/pending_db_world/rev_1697923671065331000.sql +++ b/data/sql/updates/db_world/2023_10_21_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_05 -> 2023_10_21_06 -- DELETE FROM `creature_addon` WHERE `guid` = 135692; DELETE FROM `waypoint_data` WHERE `id` = 1356920; From d9d500923a5f1bfe219b55682c5192185dfe532b Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Sun, 22 Oct 2023 08:03:50 +0800 Subject: [PATCH 314/340] fix(DB/SAI): Move the Ashbringer event AI of the Bloody Monastery mob to Smartai (#17078) * Move scarlet_guard's Ashbringer event to smartAI * Remove the code from the script * Delete the commented out code * Modify the distance of the "Scarlet Wizard" Cast Arcane Explosion * Fix errors * Update rev_1692891765582381000.sql * Update rev_1692891765582381000.sql * Remove duplicate statements * Remove duplicate statements --- .../rev_1692891765582381000.sql | 278 ++++++++++++++++++ .../instance_scarlet_monastery.cpp | 47 --- 2 files changed, 278 insertions(+), 47 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1692891765582381000.sql diff --git a/data/sql/updates/pending_db_world/rev_1692891765582381000.sql b/data/sql/updates/pending_db_world/rev_1692891765582381000.sql new file mode 100644 index 00000000000000..5d4d1215cdb473 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1692891765582381000.sql @@ -0,0 +1,278 @@ +SET @As_Probability=100; +SET @AE_Probability=50; +-- ------------------------------Scarlet Sorcerer----------------------------- +-- Scarlet Sorcerer say +DELETE FROM `creature_text` WHERE `CreatureID`=4294; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4294, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Sorcerer'), + (4294, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Sorcerer'), + (4294, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Sorcerer'), + (4294, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Sorcerer'), + (4294, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Sorcerer'), + (4294, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Sorcerer'), + (4294, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Sorcerer'), +-- On Aggro Talk + (4294, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Sorcerer'), + (4294, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Sorcerer'), + (4294, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Sorcerer'), + (4294, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Sorcerer'); + +-- Scarlet Sorcerer SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4294; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4294); +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`, `event_param6`, `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 +(4294, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - On Aggro - Say Line 1'), +(4294, 0, 1, 0, 0, 0, 100, 0, 4000, 8000, 15000, 25000, 0, 0, 11, 6146, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Slow'), +(4294, 0, 2, 0, 0, 0, 100, 0, 0, 1000, 3000, 3500, 0, 0, 11, 9672, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Frostbolt'), +(4294, 0, 3, 0, 0, 0, 100, 0, 14000, 29000, 19000, 28000, 0, 0, 11, 9672, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Blizzard'), +(4294, 0, 4, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4294, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - spellhit_target - AshbringerEvent'); + +-- AshbringerEvent Timed Actionlis +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 429400); +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`, `event_param6`, `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 +(429400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Set_Faction Friend'), +(429400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - stop movement'), +(429400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Set Facing player'), +(429400, 9, 3, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetStandState UNIT_STAND_STATE_STAND'), +(429400, 9, 4, 0, 0, 0, 100, 0, 500, 2500, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetSheath SHEATH_STATE_UNARMED'), +(429400, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetSheath UNIT_STAND_STATE_KNEEL'), +(429400, 9, 6, 0, 0, 0, @AE_Probability, 0, 1000, 2000, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Talk 0'); + +-- ------------------------------Scarlet Myrmidon----------------------------- +-- Scarlet Myrmidon say +DELETE FROM `creature_text` WHERE `CreatureID`=4295; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4295, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Myrmidon'), + (4295, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Myrmidon'), + (4295, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Myrmidon'), + (4295, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Myrmidon'), + (4295, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Myrmidon'), + (4295, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Myrmidon'), + (4295, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Myrmidon'), +-- On Aggro Talk + (4295, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Myrmidon'), + (4295, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Myrmidon'), + (4295, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Myrmidon'), + (4295, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Myrmidon'), + (4295, 2, 0, '%s goes into a frenzy!', 16, 0, 100, 0, 0, 0, 1191, 0, 'Scarlet Myrmidon'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4295; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4295); +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`, `event_param6`, `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 +(4295, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - On Aggro - Say Line 1'), +(4295, 0, 1, 2, 2, 0, 100, 1, 0, 40, 0, 0, 0, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - Between 0-40% Health - Cast Frenzy'), +(4295, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - Between 0-40% Health - Say Line 2'), +-- AshbringerEvent +(4295, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - spellhit_target - AshbringerEvent'); + + +-- ------------------------------Scarlet Defender ----------------------------- +-- Scarlet Defender say +DELETE FROM `creature_text` WHERE `CreatureID`=4298; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4298, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Defender'), + (4298, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Defender'), + (4298, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Defender'), + (4298, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Defender'), + (4298, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Defender'), + (4298, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Defender'), + (4298, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Defender'), +-- On Aggro Talk + (4298, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Defender'), + (4298, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Defender'), + (4298, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Defender'), + (4298, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Defender'); + +-- Scarlet Defender SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4298; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4298); +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`, `event_param6`, `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 +(4298, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 3637, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - On Reset - Cast Improved Blocking III'), +(4298, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - On Aggro - Say Line 1'), +(4298, 0, 2, 0, 0, 0, 100, 0, 0, 2000, 180000, 180000, 0, 0, 11, 7164, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - In Combat - Cast Defensive Stance'), +(4298, 0, 3, 0, 13, 0, 100, 0, 8000, 11000, 0, 0, 0, 0, 11, 11972, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - Victim Casting - Cast Shield Bash'), +(4298, 0, 4, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4298, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Chaplain ----------------------------- +-- Scarlet Chaplain say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4299; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4299, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Ashbringer Event'), + (4299, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Ashbringer Event'), + (4299, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Chaplain'), + (4299, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Chaplain'), + (4299, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Chaplain'), + (4299, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Chaplain'), + (4299, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Chaplain'), +-- On Aggro Talk + (4299, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Chaplain'), + (4299, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Chaplain'), + (4299, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Chaplain'), + (4299, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Chaplain'); + +-- Scarlet Chaplain SmartAI-- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4299; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4299); +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`, `event_param6`, `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 +(4299, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 1200000, 1200000, 0, 0, 11, 1006, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Out of Combat - Cast Inner Fire'), +(4299, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - On Aggro - Say Line 1'), +(4299, 0, 2, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - On Aggro - Set Event Phase'), +(4299, 0, 3, 0, 16, 1, 100, 0, 6066, 40, 8000, 8000, 0, 0, 11, 6066, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Friendly Missing Buff - Cast Power Word: Shield'), +(4299, 0, 4, 0, 14, 0, 100, 0, 400, 40, 8000, 8000, 0, 0, 11, 8362, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Friendly Missing Health - Cast Renew'), +(4299, 0, 5, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Between 0-15% Health - Flee For Assist'), + +-- AshbringerEvent +(4299, 0, 6, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Wizard ----------------------------- +-- Scarlet Wizard say--- +DELETE FROM `creature_text` WHERE `CreatureID`=4300; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4300, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Wizard'), + (4300, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Wizard'), + (4300, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Wizard'), + (4300, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Wizard'), + (4300, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Wizard'), + (4300, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Wizard'), + (4300, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Wizard'), +-- On Aggro Talk + (4300, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Wizard'), + (4300, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Wizard'), + (4300, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Wizard'); + +-- Scarlet Wizard SmartAI--- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4300; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4300); +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`, `event_param6`, `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 +(4300, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - On Aggro - Say Line 1'), +(4300, 0, 1, 0, 106, 0, 100, 0, 2000, 6000, 7000, 11000, 0, 10, 11, 8439, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - In Combat - Cast Arcane Explosion'), +(4300, 0, 2, 0, 0, 0, 100, 0, 1000, 5000, 30000, 30000, 0, 0, 11, 2601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - In Combat - Cast Fire Shield III'), +(4300, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4300, 0, 4, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Centurion ----------------------------- +-- Scarlet Centurion say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4301; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4301, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Centurion'), + (4301, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Centurion'), + (4301, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Centurion'), + (4301, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Centurion'), + (4301, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Centurion'), + (4301, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Centurion'), + (4301, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Centurion'), +-- On Aggro Talk + (4301, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Centurion'), + (4301, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Centurion'), + (4301, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Centurion'), + (4301, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Centurion'); + +-- Scarlet Centurion SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4301; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4301); +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`, `event_param6`, `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 +(4301, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - On Aggro - Say Line 1'), +(4301, 0, 1, 0, 0, 0, 100, 0, 2000, 6000, 50000, 70000, 0, 0, 11, 31403, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - In Combat - Cast Battle Shout'), +(4301, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4301, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Champion-- ------------------------------ +-- Scarlet Champion say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4302; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4302, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Champion'), + (4302, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Champion'), + (4302, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Champion'), + (4302, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Champion'), + (4302, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Champion'), + (4302, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Champion'), + (4302, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Champion'), +-- On Aggro Talk + (4302, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Champion'), + (4302, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Champion'), + (4302, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Champion'), + (4302, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Champion'); +-- Scarlet Champion SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4302; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4302); +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`, `event_param6`, `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 +(4302, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - On Aggro - Say Line 1'), +(4302, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 6000, 9000, 0, 0, 11, 17143, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - In Combat - Cast Holy Strike'), +(4302, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4302, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Abbot ------- +-- Scarlet Abbot say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4303; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4303, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Abbot'), + (4303, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Abbot'), + (4303, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Abbot'), + (4303, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Abbot'), + (4303, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Abbot'), + (4303, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Abbot'), + (4303, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Abbot'), +-- On Aggro Talk + (4303, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Abbot'), + (4303, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Abbot'), + (4303, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Abbot'), + (4303, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Abbot'), + (4303, 2, 0, '%s becomes enraged!', 16, 0, 100, 0, 0, 0, 24144, 0, 'Scarlet Abbot'); + +-- Scarlet Abbot SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4303; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4303); +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`, `event_param6`, `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 +(4303, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - On Aggro - Say Line 1'), +(4303, 0, 1, 0, 14, 0, 100, 0, 400, 40, 8000, 8000, 0, 0, 11, 8362, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Friendly Missing Health - Cast Renew'), +(4303, 0, 2, 0, 14, 0, 100, 0, 600, 40, 4000, 8000, 0, 0, 11, 6064, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Friendly Missing Health - Cast Heal'), +(4303, 0, 3, 4, 2, 0, 100, 1, 0, 40, 0, 0, 0, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Between 0-40% Health - Cast Frenzy'), +(4303, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Between 0-40% Health - Say Line 2'), +-- AshbringerEvent +(4303, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - spellhit_target - AshbringerEvent'); + + +-- ------------------------------Scarlet Monk ------- +-- Scarlet Monk say -- +DELETE FROM `creature_text` WHERE `CreatureID`=4540; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent TALK + (4540, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Monk'), + (4540, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Monk'), + (4540, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Monk'), + (4540, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Monk'), + (4540, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Monk'), + (4540, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Monk'), + (4540, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Monk'), +-- On Aggro TALK + (4540, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Monk'), + (4540, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Monk'), + (4540, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Monk'), + (4540, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Monk'); + +-- Scarlet Monk SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 4540); +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4540); +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`, `event_param6`, `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 +(4540, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 3417, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - On Reset - Cast Thrash'), +(4540, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - On Aggro - Say Line 1'), +(4540, 0, 2, 0, 13, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 11, 11978, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - Victim Casting - Cast Kick'), +(4540, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4540, 0, 4, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - spellhit_target - AshbringerEvent'); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 65b8c64f16cb81..edfa3fb6e7ed3c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -203,52 +203,6 @@ enum ScarletMonasteryTrashMisc SPELL_FORGIVENESS = 28697, }; -class npc_scarlet_guard : public CreatureScript -{ -public: - npc_scarlet_guard() : CreatureScript("npc_scarlet_guard") { } - - struct npc_scarlet_guardAI : public SmartAI - { - npc_scarlet_guardAI(Creature* creature) : SmartAI(creature) { } - - void Reset() override - { - SayAshbringer = false; - } - - void MoveInLineOfSight(Unit* who) override - { - if (who && who->GetDistance2d(me) < 12.0f) - { - if (Player* player = who->ToPlayer()) - { - if (player->HasAura(AURA_ASHBRINGER) && !SayAshbringer) - { - Talk(SAY_WELCOME); - me->SetFaction(FACTION_FRIENDLY); - me->SetSheath(SHEATH_STATE_UNARMED); - me->SetFacingToObject(player); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->AddAura(SPELL_AURA_MOD_ROOT, me); - me->CastSpell(me, SPELL_AURA_MOD_ROOT, true); - SayAshbringer = true; - } - } - } - - SmartAI::MoveInLineOfSight(who); - } - private: - bool SayAshbringer = false; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return GetScarletMonasteryAI(creature); - } -}; - enum MograineEvents { EVENT_SPELL_CRUSADER_STRIKE = 1, @@ -733,7 +687,6 @@ class npc_fairbanks : public CreatureScript void AddSC_instance_scarlet_monastery() { new instance_scarlet_monastery(); - new npc_scarlet_guard(); new npc_fairbanks(); new npc_mograine(); new boss_high_inquisitor_whitemane(); From 0815241cb9d09e03f26884ff920cf7b85eef8555 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:04:56 +0000 Subject: [PATCH 315/340] chore(DB): import pending files Referenced commit(s): d9d500923a5f1bfe219b55682c5192185dfe532b --- .../rev_1692891765582381000.sql => db_world/2023_10_22_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1692891765582381000.sql => db_world/2023_10_22_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1692891765582381000.sql b/data/sql/updates/db_world/2023_10_22_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1692891765582381000.sql rename to data/sql/updates/db_world/2023_10_22_00.sql index 5d4d1215cdb473..3d79379b9f711d 100644 --- a/data/sql/updates/pending_db_world/rev_1692891765582381000.sql +++ b/data/sql/updates/db_world/2023_10_22_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_21_06 -> 2023_10_22_00 SET @As_Probability=100; SET @AE_Probability=50; -- ------------------------------Scarlet Sorcerer----------------------------- From a3d728f791c466f6bb350a024bfc9c70d14189e2 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:08:12 -0300 Subject: [PATCH 316/340] fix(Scripts/Karazhan): Script Aran's Flame Wreath ability (#17551) --- .../rev_1697929174535985900.sql | 5 + .../Karazhan/boss_shade_of_aran.cpp | 224 +++++++++--------- 2 files changed, 115 insertions(+), 114 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697929174535985900.sql diff --git a/data/sql/updates/pending_db_world/rev_1697929174535985900.sql b/data/sql/updates/pending_db_world/rev_1697929174535985900.sql new file mode 100644 index 00000000000000..4c3882f2a79d19 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697929174535985900.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` IN (30004, 29946); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(30004, 'spell_flamewreath'), +(29946, 'spell_flamewreath_aura'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 01a3c39b56461f..b8ca05175a2f5e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -18,7 +18,9 @@ #include "GameObject.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellAuras.h" #include "SpellInfo.h" +#include "SpellScript.h" #include "karazhan.h" #include "TaskScheduler.h" @@ -40,31 +42,34 @@ enum Texts enum Spells { //Spells - SPELL_FROSTBOLT = 29954, - SPELL_FIREBALL = 29953, - SPELL_ARCMISSLE = 29955, - SPELL_CHAINSOFICE = 29991, - SPELL_DRAGONSBREATH = 29964, - SPELL_MASSSLOW = 30035, - SPELL_FLAME_WREATH = 29946, - SPELL_AOE_CS = 29961, - SPELL_PLAYERPULL = 32265, - SPELL_AEXPLOSION = 29973, - SPELL_MASS_POLY = 29963, - SPELL_BLINK_CENTER = 29967, - SPELL_CONJURE = 29975, - SPELL_DRINK = 30024, - SPELL_POTION = 32453, - SPELL_AOE_PYROBLAST = 29978, - - SPELL_SUMMON_WELEMENTAL_1 = 29962, - SPELL_SUMMON_WELEMENTAL_2 = 37051, - SPELL_SUMMON_WELEMENTAL_3 = 37052, - SPELL_SUMMON_WELEMENTAL_4 = 37053, - - SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC - - SPELL_SHADOW_PYRO = 29978 + SPELL_FROSTBOLT = 29954, + SPELL_FIREBALL = 29953, + SPELL_ARCMISSLE = 29955, + SPELL_CHAINSOFICE = 29991, + SPELL_DRAGONSBREATH = 29964, + SPELL_MASSSLOW = 30035, + SPELL_FLAME_WREATH = 30004, + SPELL_FLAME_WREATH_RING = 29946, + SPELL_FLAME_WREATH_RAN_THRU = 29947, // You ran through the flames! + SPELL_FLAME_WREATH_EXPLOSION = 29949, + SPELL_AOE_CS = 29961, + SPELL_PLAYERPULL = 32265, + SPELL_AEXPLOSION = 29973, + SPELL_MASS_POLY = 29963, + SPELL_BLINK_CENTER = 29967, + SPELL_CONJURE = 29975, + SPELL_DRINK = 30024, + SPELL_POTION = 32453, + SPELL_AOE_PYROBLAST = 29978, + + SPELL_SUMMON_WELEMENTAL_1 = 29962, + SPELL_SUMMON_WELEMENTAL_2 = 37051, + SPELL_SUMMON_WELEMENTAL_3 = 37052, + SPELL_SUMMON_WELEMENTAL_4 = 37053, + + SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC + + SPELL_SHADOW_PYRO = 29978 }; enum Creatures @@ -81,20 +86,11 @@ enum SuperSpell enum Groups { - GROUP_FLAMEWREATH = 0, - GROUP_DRINKING = 1 + GROUP_DRINKING = 0 }; Position const roomCenter = {-11158.f, -1920.f}; -Position const elementalPos[4] = -{ - {-11168.1f, -1939.29f, 232.092f, 1.46f}, - {-11138.2f, -1915.38f, 232.092f, 3.00f}, - {-11161.7f, -1885.36f, 232.092f, 4.59f}, - {-11192.4f, -1909.36f, 232.092f, 6.19f} -}; - struct boss_shade_of_aran : public BossAI { boss_shade_of_aran(Creature* creature) : BossAI(creature, DATA_ARAN) @@ -111,9 +107,6 @@ struct boss_shade_of_aran : public BossAI _drinkScheduler.CancelAll(); _lastSuperSpell = rand() % 3; - for (uint8 i = 0; i < 3; ++i) - FlameWreathTarget[i].Clear(); - CurrentNormalSpell = 0; _arcaneCooledDown = true; @@ -329,15 +322,7 @@ struct boss_shade_of_aran : public BossAI { if (!_drinking) { - switch (urand(0, 1)) - { - case 0: - DoCastSelf(SPELL_AOE_CS); - break; - case 1: - DoCastRandomTarget(SPELL_CHAINSOFICE); - break; - } + urand(0, 1) ? DoCastSelf(SPELL_AOE_CS) : DoCastRandomTarget(SPELL_CHAINSOFICE); } context.Repeat(5s, 20s); }).Schedule(6s, [this](TaskContext context) @@ -377,37 +362,10 @@ struct boss_shade_of_aran : public BossAI DoCastSelf(SPELL_MASSSLOW, true); DoCastSelf(SPELL_AEXPLOSION, false); break; - case SUPER_FLAME: Talk(SAY_FLAMEWREATH); - - scheduler.Schedule(20s, GROUP_FLAMEWREATH, [this](TaskContext) - { - scheduler.CancelGroup(GROUP_FLAMEWREATH); - }).Schedule(500ms, GROUP_FLAMEWREATH, [this](TaskContext context) - { - for (uint8 i = 0; i < 3; ++i) - { - if (!FlameWreathTarget[i]) - continue; - - Unit* unit = ObjectAccessor::GetUnit(*me, FlameWreathTarget[i]); - if (unit && !unit->IsWithinDist2d(FWTargPosX[i], FWTargPosY[i], 3)) - { - unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID()); - FlameWreathTarget[i].Clear(); - } - } - context.Repeat(500ms); - }); - - FlameWreathTarget[0].Clear(); - FlameWreathTarget[1].Clear(); - FlameWreathTarget[2].Clear(); - - FlameWreathEffect(); + DoCastAOE(SPELL_FLAME_WREATH); break; - case SUPER_BLIZZARD: Talk(SAY_BLIZZARD); DoCastAOE(SPELL_SUMMON_BLIZZARD); @@ -432,41 +390,6 @@ struct boss_shade_of_aran : public BossAI }); } - void FlameWreathEffect() - { - std::vector targets; - ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); - - if (t_list.empty()) - return; - - //store the threat list in a different container - for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) - { - Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()); - //only on alive players - if (target && target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); - } - - //cut down to size if we have more than 3 targets - while (targets.size() > 3) - targets.erase(targets.begin() + rand() % targets.size()); - - uint32 i = 0; - for (std::vector::const_iterator itr = targets.begin(); itr != targets.end(); ++itr) - { - if (*itr) - { - FlameWreathTarget[i] = (*itr)->GetGUID(); - FWTargPosX[i] = (*itr)->GetPositionX(); - FWTargPosY[i] = (*itr)->GetPositionY(); - DoCast((*itr), SPELL_FLAME_WREATH, true); - ++i; - } - } - } - void UpdateAI(uint32 diff) override { scheduler.Update(diff); @@ -514,10 +437,6 @@ struct boss_shade_of_aran : public BossAI uint32 _lastSuperSpell; - ObjectGuid FlameWreathTarget[3]; - float FWTargPosX[3]; - float FWTargPosY[3]; - uint32 CurrentNormalSpell; bool _arcaneCooledDown; @@ -527,7 +446,84 @@ struct boss_shade_of_aran : public BossAI bool _hasDrunk; }; +// 30004 - Flame Wreath +class spell_flamewreath : public SpellScript +{ + PrepareSpellScript(spell_flamewreath); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_FLAME_WREATH_RING }); + } + + void FilterTargets(std::list& targets) + { + uint8 maxSize = 3; + + if (targets.size() > maxSize) + { + Acore::Containers::RandomResize(targets, maxSize); + } + + _targets = targets; + } + + void HandleFinish() + { + for (auto const& target : _targets) + { + if (Unit* targetUnit = target->ToUnit()) + { + GetCaster()->CastSpell(targetUnit, SPELL_FLAME_WREATH_RING, true); + } + } + } + +private: + std::list _targets; + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_flamewreath::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY); + AfterCast += SpellCastFn(spell_flamewreath::HandleFinish); + } +}; + +// 29946 - Flame Wreath (visual effect) +class spell_flamewreath_aura : public AuraScript +{ + PrepareAuraScript(spell_flamewreath_aura); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_FLAME_WREATH_RAN_THRU, SPELL_FLAME_WREATH_EXPLOSION }); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEFAULT && GetDuration()) + { + if (Unit* target = GetTarget()) + { + target->CastSpell(target, SPELL_FLAME_WREATH_RAN_THRU, true); + + target->m_Events.AddEventAtOffset([target] { + target->RemoveAurasDueToSpell(SPELL_FLAME_WREATH_RAN_THRU); + target->CastSpell(target, SPELL_FLAME_WREATH_EXPLOSION, true); + }, 1s); + } + } + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_flamewreath_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_boss_shade_of_aran() { RegisterKarazhanCreatureAI(boss_shade_of_aran); + RegisterSpellScript(spell_flamewreath); + RegisterSpellScript(spell_flamewreath_aura); } From 134d6575c58c4e4b3626da2912434fc5b15b5384 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:10:20 +0000 Subject: [PATCH 317/340] chore(DB): import pending files Referenced commit(s): a3d728f791c466f6bb350a024bfc9c70d14189e2 --- .../rev_1697929174535985900.sql => db_world/2023_10_22_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697929174535985900.sql => db_world/2023_10_22_01.sql} (82%) diff --git a/data/sql/updates/pending_db_world/rev_1697929174535985900.sql b/data/sql/updates/db_world/2023_10_22_01.sql similarity index 82% rename from data/sql/updates/pending_db_world/rev_1697929174535985900.sql rename to data/sql/updates/db_world/2023_10_22_01.sql index 4c3882f2a79d19..e818f16c210cd2 100644 --- a/data/sql/updates/pending_db_world/rev_1697929174535985900.sql +++ b/data/sql/updates/db_world/2023_10_22_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_00 -> 2023_10_22_01 -- DELETE FROM `spell_script_names` WHERE `spell_id` IN (30004, 29946); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 453d6978758ec1a33e5221f23f133c74d1f2413c Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 22 Oct 2023 02:14:45 +0200 Subject: [PATCH 318/340] fix(DB/Quests): Darkshore emotes (#17552) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/af89ef8cca1a3705fb3386921e3b87300a3dbaa0) * closes https://github.com/azerothcore/azerothcore-wotlk/issues/4484 Co-authored-by: Carlos Morales --- .../rev_1697930734514279300.sql | 339 ++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697930734514279300.sql diff --git a/data/sql/updates/pending_db_world/rev_1697930734514279300.sql b/data/sql/updates/pending_db_world/rev_1697930734514279300.sql new file mode 100644 index 00000000000000..162523dcb3d08c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697930734514279300.sql @@ -0,0 +1,339 @@ +-- +-- Emotes for Quest "For Love Eternal" +DELETE FROM `quest_details` WHERE `ID`=963; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(963,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=963; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=963; + +-- Emotes for Quest "Cave Mushrooms" +DELETE FROM `quest_details` WHERE `ID`=947; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(947,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=947; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=947; + +-- Emotes for Quest "Onu" +DELETE FROM `quest_details` WHERE `ID`=948; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(948,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Buzzbox 827" +DELETE FROM `quest_details` WHERE `ID`=983; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(983,5,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Washed Ashore" +DELETE FROM `quest_details` WHERE `ID`=3524; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3524,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3524; + +-- Emotes for Quest "Washed Ashore (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=4681; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4681,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=4681; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4681; + +-- Emotes for Quest "The Family and the Fishing Pole" +DELETE FROM `quest_details` WHERE `ID`=1141; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1141,4,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=1141; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1141; + +-- Emotes for Quest "Fruit of the Sea" +DELETE FROM `quest_details` WHERE `ID`=1138; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1138,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=1138; +UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=1138; + +-- Emotes for Quest "The Red Crystal" +DELETE FROM `quest_details` WHERE `ID`=4811; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4811,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=4811; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4811; + +-- Emotes for Quest "As Water Cascades" +DELETE FROM `quest_details` WHERE `ID`=4812; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4812,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "The Fragments Within" +UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=1 WHERE `ID`=4813; + +-- Emotes for Quest "Tools of the Highborne" +DELETE FROM `quest_details` WHERE `ID`=958; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(958,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=958; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=958; + +-- Emotes for Quest "BashalAran" +DELETE FROM `quest_details` WHERE `ID`=954; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(954,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=954; + +-- Emotes for Quest "BashalAran (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=955; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(955,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "BashalAran (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=956; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(956,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=956; + +-- Emotes for Quest "BashalAran (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=957; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(957,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=15 WHERE `ID`=957; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4723; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4728; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4730; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4722; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4722; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4727; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4731; + +-- Emotes for Quest "WANTED: Murkdeep!" +UPDATE `quest_request_items` SET `EmoteOnComplete`=1 WHERE `ID`=4740; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4740; + +-- Emotes for Quest "Gaffer Jacks" +DELETE FROM `quest_details` WHERE `ID`=1579; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1579,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=1579; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=1579; + +-- Emotes for Quest "Electropellers" +DELETE FROM `quest_details` WHERE `ID`=1580; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1580,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=1580; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1580; + +-- Emotes for Quest "Trouble In Darkshore?" +DELETE FROM `quest_details` WHERE `ID`=730; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(730,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=730; + +-- Emotes for Quest "The Absent Minded Prospector" +DELETE FROM `quest_details` WHERE `ID`=729; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(729,1,1,20,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=729; + +-- Emotes for Quest "The Absent Minded Prospector (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=731; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(731,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=731; + +-- Emotes for Quest "The Absent Minded Prospector (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=741; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(741,6,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=741; + +-- Emotes for Quest "The Absent Minded Prospector (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=942; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(942,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=5 WHERE `ID`=942; + +-- Emotes for Quest "The Absent Minded Prospector (Part 5)" +DELETE FROM `quest_details` WHERE `ID`=943; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(943,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=943; + +-- Emotes for Quest "Deep Ocean, Vast Sea" +DELETE FROM `quest_details` WHERE `ID`=982; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(982,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=982; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=982; + +-- Emotes for Quest "Plagued Lands" +DELETE FROM `quest_details` WHERE `ID`=2118; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2118,2,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=2118; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=2118; + +-- Emotes for Quest "Cleansing of the Infected" +DELETE FROM `quest_details` WHERE `ID`=2138; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2138,274,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Tharnariun's Hope" +DELETE FROM `quest_details` WHERE `ID`=2139; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2139,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "How Big a Threat?" +DELETE FROM `quest_details` WHERE `ID`=984; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(984,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=18 WHERE `ID`=984; + +-- Emotes for Quest "How Big a Threat? (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=985; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(985,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=985; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=985; + +-- Emotes for Quest "A Lost Master (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=993; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(993,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=993; + +-- Emotes for Quest "Escape Through Force" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=994; + +-- Emotes for Quest "Escape Through Stealth" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=995; + +-- Emotes for Quest "Thundris Windweaver" +DELETE FROM `quest_details` WHERE `ID`=4761; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4761,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=4761; + +-- Emotes for Quest "The Cliffspring River" +DELETE FROM `quest_details` WHERE `ID`=4762; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4762,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=4762; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=4762; + +-- Emotes for Quest "The Blackwood Corrupted" +DELETE FROM `quest_details` WHERE `ID`=4763; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4763,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=4763; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4763; + +-- Emotes for Quest "Easy Strider Living" +DELETE FROM `quest_details` WHERE `ID`=2178; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2178,273,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=5, `EmoteOnComplete`=5 WHERE `ID`=2178; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=2178; + +-- Emotes for Quest "The Tower of Althalaxx" +DELETE FROM `quest_details` WHERE `ID`=965; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(965,2,1,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=965; + +-- Emotes for Quest "The Tower of Althalaxx (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=966; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(966,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=966; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=966; + +-- Emotes for Quest "The Tower of Althalaxx (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=967; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(967,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=967; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=967; + +-- Emotes for Quest "The Tower of Althalaxx (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=970; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(970,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=970; + +-- Emotes for Quest "The Tower of Althalaxx (Part 5)" +DELETE FROM `quest_details` WHERE `ID`=973; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(973,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=973; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=973; + +-- Emotes for Quest "The Tower of Althalaxx (Part 6)" +DELETE FROM `quest_details` WHERE `ID`=1140; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1140,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=1140; + +-- Emotes for Quest "The Tower of Althalaxx (Part 7)" +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=1167; + +-- Emotes for Quest "The Tower of Althalaxx (Part 8)" +DELETE FROM `quest_details` WHERE `ID`=1143; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1143,273,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=1143; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1143; + +-- Emotes for Quest "The Tower of Althalaxx (Part 9)" +UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=981; + +-- Emotes for Quest "Gyromast's Retrieval" +DELETE FROM `quest_details` WHERE `ID`=2098; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2098,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=2098; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=2098; + +-- Emotes for Quest "Gyromast's Revenge" +DELETE FROM `quest_details` WHERE `ID`=2078; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2078,5,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=397 WHERE `ID`=2078; + +-- Emotes for Quest "The Fall of Ameth'Aran" +DELETE FROM `quest_details` WHERE `ID`=953; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(953,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=2 WHERE `ID`=953; + +-- Emotes for Quest "One Shot. One Kill" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=5713; + +-- Emotes for Quest "The Powers Below" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=968; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=968; + +-- Emotes for Quest "The Sleeper Has Awakened" +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=5321; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=5321; + +-- Emotes for Quest "Onward to Ashenvale" +DELETE FROM `quest_details` WHERE `ID`=10752; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(10752,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=10752; + +-- Emotes for Quest "Trek to Ashenvale" +DELETE FROM `quest_details` WHERE `ID`=990; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(990,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=990; From 2cae7b0e52b87070a35990db8e0bf547f4298a35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:16:04 +0000 Subject: [PATCH 319/340] chore(DB): import pending files Referenced commit(s): 453d6978758ec1a33e5221f23f133c74d1f2413c --- .../rev_1697930734514279300.sql => db_world/2023_10_22_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697930734514279300.sql => db_world/2023_10_22_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1697930734514279300.sql b/data/sql/updates/db_world/2023_10_22_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1697930734514279300.sql rename to data/sql/updates/db_world/2023_10_22_02.sql index 162523dcb3d08c..66bb1694b982fc 100644 --- a/data/sql/updates/pending_db_world/rev_1697930734514279300.sql +++ b/data/sql/updates/db_world/2023_10_22_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_01 -> 2023_10_22_02 -- -- Emotes for Quest "For Love Eternal" DELETE FROM `quest_details` WHERE `ID`=963; From 0895ed0899cdd52818c94e3dda1795e1db4447be Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Sun, 22 Oct 2023 08:16:49 +0800 Subject: [PATCH 320/340] =?UTF-8?q?fix(DB/Conditions):=20Restriction=20AB?= =?UTF-8?q?=5FEffect=5F000=20(28441)=20Spell=20effects=20only=20work=20on?= =?UTF-8?q?=20NPCs=20rel=E2=80=A6=20(#17535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restriction AB_Effect_000 (28441) Spell effects only work on NPCs related to the Ashbringer event in "Scarlet Monastery" --- .../rev_1697552226633277000.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697552226633277000.sql diff --git a/data/sql/updates/pending_db_world/rev_1697552226633277000.sql b/data/sql/updates/pending_db_world/rev_1697552226633277000.sql new file mode 100644 index 00000000000000..aaac4644f56dca --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697552226633277000.sql @@ -0,0 +1,18 @@ +-- AB_Effect_000 28441 spell effect only works on NPCs related to Ashbringers in "Scarlet Monastery" +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=28441 AND `SourceId`=0 AND `ConditionTypeOrReference`=31 AND `ConditionTarget`=0 AND `ConditionValue1`=3 AND `ConditionValue3`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 28441, 0, 0, 31, 0, 3, 3976, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Commander Mograine'), +(13, 1, 28441, 0, 1, 31, 0, 3, 4294, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Sorcerer'), +(13, 1, 28441, 0, 2, 31, 0, 3, 4295, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Myrmidon'), +(13, 1, 28441, 0, 3, 31, 0, 3, 4298, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Defender'), +(13, 1, 28441, 0, 4, 31, 0, 3, 4299, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Chaplain'), +(13, 1, 28441, 0, 5, 31, 0, 3, 4300, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Wizard'), +(13, 1, 28441, 0, 6, 31, 0, 3, 4301, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Centurion'), +(13, 1, 28441, 0, 7, 31, 0, 3, 4302, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Champion'), +(13, 1, 28441, 0, 8, 31, 0, 3, 4303, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Abbot'), +(13, 1, 28441, 0, 9, 31, 0, 3, 4540, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Monk'), +(13, 1, 28441, 0, 10, 31, 0, 3, 4542, 0, 0, 0, 0, '', 'AB_Effect_000 target High Inquisitor Fairbanks'); + +-- Forgiveness 28697 adds comments +UPDATE `conditions` SET `Comment`='Forgiveness target Scarlet Commander Mograine' WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=28697 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=31 AND `ConditionTarget`=0 AND `ConditionValue1`=3 AND `ConditionValue2`=3976 AND `ConditionValue3`=0; + From ed033349acfcbfda7e68d5957f0d144c38de8146 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:17:13 +0000 Subject: [PATCH 321/340] chore(DB): import pending files Referenced commit(s): 2cae7b0e52b87070a35990db8e0bf547f4298a35 --- .../rev_1697552226633277000.sql => db_world/2023_10_22_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697552226633277000.sql => db_world/2023_10_22_03.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1697552226633277000.sql b/data/sql/updates/db_world/2023_10_22_03.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1697552226633277000.sql rename to data/sql/updates/db_world/2023_10_22_03.sql index aaac4644f56dca..34cd2ecb389858 100644 --- a/data/sql/updates/pending_db_world/rev_1697552226633277000.sql +++ b/data/sql/updates/db_world/2023_10_22_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_02 -> 2023_10_22_03 -- AB_Effect_000 28441 spell effect only works on NPCs related to Ashbringers in "Scarlet Monastery" DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=28441 AND `SourceId`=0 AND `ConditionTypeOrReference`=31 AND `ConditionTarget`=0 AND `ConditionValue1`=3 AND `ConditionValue3`=0; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 968bc8d47b23b2d3e0cbe8658e6d5c90340bbef6 Mon Sep 17 00:00:00 2001 From: damnablebear <127447064+damnablebear@users.noreply.github.com> Date: Sat, 21 Oct 2023 20:20:27 -0400 Subject: [PATCH 322/340] fix:(DB/Gameobject) Re-arrange location of Webwinder Path's signpost gps so they sit on the sign (#17308) * webwinder-signpost-gps Fixing the webwinder path signpost gps locations so they actually sit on the post rather than floating * Update data/sql/updates/pending_db_world/webwinder-signpost-gps.sql Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> * Update webwinder-signpost-gps.sql adding whitespace and updating syntax --------- Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com> --- data/sql/updates/pending_db_world/webwinder-signpost-gps.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/webwinder-signpost-gps.sql diff --git a/data/sql/updates/pending_db_world/webwinder-signpost-gps.sql b/data/sql/updates/pending_db_world/webwinder-signpost-gps.sql new file mode 100644 index 00000000000000..c286c86a3a9327 --- /dev/null +++ b/data/sql/updates/pending_db_world/webwinder-signpost-gps.sql @@ -0,0 +1,5 @@ +UPDATE `gameobject` SET `position_x` = 634.220, `position_y` = 359.989 WHERE `guid` = 47468 AND `id` = 19569; + +UPDATE `gameobject` SET `position_x` = 634.065, `position_y` = 360.295 WHERE `guid` = 47480 AND `id` = 19570; + +UPDATE `gameobject` SET `position_x` = 633.923, `position_y` = 359.858, `position_z` = 50.713 WHERE `guid` = 47481 AND `id` = 19571; From 13acb24e656ea1c624aa4013f1da03a38c1c01df Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:21:35 +0000 Subject: [PATCH 323/340] chore(DB): import pending files Referenced commit(s): 968bc8d47b23b2d3e0cbe8658e6d5c90340bbef6 --- .../webwinder-signpost-gps.sql => db_world/2023_10_22_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/webwinder-signpost-gps.sql => db_world/2023_10_22_04.sql} (89%) diff --git a/data/sql/updates/pending_db_world/webwinder-signpost-gps.sql b/data/sql/updates/db_world/2023_10_22_04.sql similarity index 89% rename from data/sql/updates/pending_db_world/webwinder-signpost-gps.sql rename to data/sql/updates/db_world/2023_10_22_04.sql index c286c86a3a9327..8dffed9a74f3d7 100644 --- a/data/sql/updates/pending_db_world/webwinder-signpost-gps.sql +++ b/data/sql/updates/db_world/2023_10_22_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_03 -> 2023_10_22_04 UPDATE `gameobject` SET `position_x` = 634.220, `position_y` = 359.989 WHERE `guid` = 47468 AND `id` = 19569; UPDATE `gameobject` SET `position_x` = 634.065, `position_y` = 360.295 WHERE `guid` = 47480 AND `id` = 19570; From d9094187066188c0d9de00b091aeaa0b0fce865b Mon Sep 17 00:00:00 2001 From: Ludwig Date: Sun, 22 Oct 2023 02:47:19 +0200 Subject: [PATCH 324/340] fix(DB/Creature): Use sniffed values for 16781 Midsummer Celebrant spawns (#17549) * fix(DB): Use sniffed values for 16781 Midsummer Celebrant spawns * Update data/sql/updates/pending_db_world/rev_1697918911416150200.sql * Update data/sql/updates/pending_db_world/rev_1697918911416150200.sql --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../rev_1697918911416150200.sql | 724 ++++++++++++++++++ 1 file changed, 724 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1697918911416150200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697918911416150200.sql b/data/sql/updates/pending_db_world/rev_1697918911416150200.sql new file mode 100644 index 00000000000000..a9dc89b7d0b5d5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697918911416150200.sql @@ -0,0 +1,724 @@ +-- Use sniffed values for 16781 Midsummer Celebrant spawns +-- updated spawns +DELETE FROM `creature` WHERE `id1` = 16781 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(202714, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 127.0819168090820312, -4722.9560546875, 18.60128211975097656, 5.515240192413330078, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202715, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 131.1795806884765625, -4725.8388671875, 17.80640029907226562, 2.705260276794433593, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202716, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 131.3594818115234375, -4731.74853515625, 16.76935005187988281, 0.122173048555850982, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202717, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 136.675994873046875, -4729.85205078125, 16.67755126953125, 3.543018341064453125, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202741, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9371.484375, -6786.65087890625, 14.43894767761230468, 5.8817596435546875, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202742, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9374.86328125, -6787.50732421875, 14.52208423614501953, 3.019419670104980468, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202743, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9384.71875, -6786.87109375, 14.20661067962646484, 6.0737457275390625, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202744, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9388.751953125, -6787.9951171875, 14.10687828063964843, 2.792526721954345703, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202746, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9793.185546875, -7259.97412109375, 26.3159332275390625, 5.8817596435546875, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202747, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9796.865234375, -7261.2578125, 26.35243606567382812, 3.019419670104980468, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202748, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9797.412109375, -7244.806640625, 26.14875984191894531, 5.480333805084228515, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202749, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9800.8662109375, -7248.796875, 26.21503257751464843, 2.234021425247192382, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202752, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7670.49658203125, -6830.04296875, 78.69478607177734375, 5.8817596435546875, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202753, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7674.27685546875, -6840.67578125, 79.92003631591796875, 6.0737457275390625, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202754, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7674.87841796875, -6831.93115234375, 78.88452911376953125, 3.019419670104980468, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202755, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7678.85498046875, -6843.01416015625, 79.78014373779296875, 2.792526721954345703, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202759, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2278.226318359375, 439.366607666015625, 34.14168548583984375, 4.97418832778930664, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202760, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2279.183837890625, 435.570220947265625, 34.17606353759765625, 1.797689080238342285, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202761, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2289.63525390625, 428.393829345703125, 34.87903594970703125, 1.047197580337524414, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202762, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2291.09521484375, 432.0240478515625, 35.47864532470703125, 4.590215682983398437, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202764, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3790.318603515625, -11510.521484375, -134.645401000976562, 3.281219005584716796, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202765, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3795.79345703125, -11510.4296875, -134.709365844726562, 0.174532920122146606, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202766, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3814.237548828125, -11505.810546875, -138.451461791992187, 4.433136463165283203, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202767, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3815.921875, -11510.287109375, -138.488174438476562, 1.117010712623596191, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94529, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8709.51953125, 953.97393798828125, 13.64090156555175781, 4.258603572845458984, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94530, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1895.0660400390625, -4344.84912109375, 21.20777511596679687, 5.672319889068603515, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +-- 94531 not sniffed +(94532, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3103.629150390625, -2740.179443359375, 35.01421737670898437, 2.914699792861938476, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94533, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3107.486328125, -2738.833251953125, 35.2755889892578125, 5.829399585723876953, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94534, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3114.165283203125, -2737.15478515625, 34.85781478881835937, 4.293509960174560546, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94535, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3116.45751953125, -2741.033935546875, 34.89273452758789062, 0.907571196556091308, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94536, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9773.2451171875, 1007.27520751953125, 1299.075439453125, 4.258603572845458984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94537, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6837.92919921875, -4560.8798828125, 710.037353515625, 1.2042771577835083, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94538, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6830.61279296875, -4564.916015625, 710.4595947265625, 5.573488235473632812, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94539, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6850.12939453125, -4748.908203125, 697.37890625, 6.2657318115234375, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94540, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -50.4992942810058593, 1243.124755859375, 90.835296630859375, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94541, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2001.78955078125, -2350.227783203125, 90.30035400390625, 3.822271108627319335, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94542, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1987.349853515625, -2335.2705078125, 90.3668365478515625, 0.331612557172775268, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94543, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6312.31494140625, 527.88427734375, 16.63825225830078125, 5.235987663269042968, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94544, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6309.24658203125, 509.717681884765625, 17.81841850280761718, 2.059488534927368164, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94545, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1846.579833984375, 3044.63427734375, 1.992398381233215332, 3.543018341064453125, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94546, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1842.068603515625, 3054.227783203125, 0.818315327167510986, 2.705260276794433593, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +-- 94547 not sniffed +(94548, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9449.1767578125, -2123.471435546875, 69.1136474609375, 1.431169986724853515, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94549, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3433.665283203125, -959.2987060546875, 9.565944671630859375, 2.216568231582641601, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94550, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14277.845703125, 54.59401702880859375, 0.903981447219848632, 2.879793167114257812, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94551, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14289.595703125, 46.96712112426757812, 0.852089285850524902, 6.021385669708251953, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94552, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14285.2275390625, 45.27360153198242187, 0.565200328826904296, 2.687807083129882812, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94554, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14282.404296875, 55.37071609497070312, 0.4672013521194458, 6.213372230529785156, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94556, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1197.2857666015625, -2680.873291015625, 46.3772430419921875, 6.126105785369873046, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94557, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1202.4639892578125, -2657.933349609375, 45.80363845825195312, 5.235987663269042968, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94558, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10968.0048828125, -3234.336669921875, 41.47556686401367187, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94559, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9375.13671875, 26.34857940673828125, 61.71401596069335937, 4.834561824798583984, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94560, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9383.171875, 11.5457916259765625, 61.1361541748046875, 1.448623299598693847, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94561, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9373.3623046875, 22.89648056030273437, 62.09075927734375, 2.216568231582641601, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94562, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5428.44970703125, -486.615234375, 396.645751953125, 4.258603572845458984, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94563, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5250.07177734375, -2891.317626953125, 339.26678466796875, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94564, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6686.6455078125, -2194.682861328125, 248.433074951171875, 2.338741064071655273, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94565, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6685.30419921875, -2199.441650390625, 249.0545501708984375, 3.211405754089355468, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94566, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -474.94091796875, -4528.29833984375, 12.83812427520751953, 4.660028934478759765, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94567, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -463.081878662109375, -4537.73388671875, 9.435498237609863281, 3.071779489517211914, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94568, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -468.08880615234375, -4537.65478515625, 10.32885360717773437, 0.03490658476948738, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94569, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1792.443603515625, 219.5408477783203125, 60.01215744018554687, 1.570796370506286621, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94570, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1793.1646728515625, 224.844451904296875, 59.71418380737304687, 4.468042850494384765, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94571, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1816.4825439453125, 217.62310791015625, 59.92689132690429687, 2.042035102844238281, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94572, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 216.6368560791015625, 7684.775390625, 23.00917816162109375, 0.907571196556091308, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94573, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 219.3437042236328125, 7688.07666015625, 23.05628585815429687, 4.118977069854736328, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94574, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 940.41290283203125, 789.0902099609375, 104.0225296020507812, 1.692969322204589843, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94575, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6786.50537109375, 544.6658935546875, 1.599180340766906738, 0.366519153118133544, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94576, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9773.314453125, 1033.0955810546875, 1299.56298828125, 3.839724302291870117, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94577, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9769.7119140625, 1030.63427734375, 1300.171875, 0.453785598278045654, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94578, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9772.8662109375, 1004.4332275390625, 1298.8970947265625, 1.448623299598693847, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94579, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6774.9521484375, 553.74176025390625, 3.734848260879516601, 4.258603572845458984, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94580, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6775.8408203125, 550.70379638671875, 3.138088226318359375, 1.274090290069580078, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94581, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6834.138671875, -4568.12451171875, 709.71368408203125, 2.757620096206665039, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94582, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7229.51513671875, -3843.727783203125, 12.14379501342773437, 4.258603572845458984, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94583, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6854.1123046875, -4749.861328125, 697.02130126953125, 3.001966238021850585, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94584, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6845.67724609375, -4757.61181640625, 697.64105224609375, 1.518436431884765625, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94585, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6846.1201171875, -4752.99462890625, 697.61151123046875, 4.537856101989746093, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94587, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1998.3646240234375, -2352.390380859375, 90.135009765625, 0.506145477294921875, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94588, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1990.5501708984375, -2333.865234375, 91.22491455078125, 3.630284786224365234, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94589, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -62.8863945007324218, 1247.8487548828125, 90.82196044921875, 4.258603572845458984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94590, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -63.0911445617675781, 1244.8236083984375, 91.153228759765625, 1.448623299598693847, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94591, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -52.60400390625, 1246.91796875, 90.813232421875, 5.235987663269042968, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94592, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3472.85205078125, -4218.52978515625, 9.612421035766601562, 0.78539818525314331, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94593, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1845.1126708984375, 3056.318359375, 0.594067335128784179, 5.515240192413330078, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94594, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1851.7235107421875, 3043.050537109375, 2.750925302505493164, 0.122173048555850982, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94595, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -5511.3203125, -2279.45947265625, -58.929840087890625, 3.612831592559814453, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94596, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -5514.57470703125, -2283.4931640625, -58.7320175170898437, 1.256637096405029296, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94597, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1898.49658203125, -4346.82470703125, 21.24923324584960937, 2.705260276794433593, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94598, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10351.283203125, -3292.098876953125, 23.25424385070800781, 4.520402908325195312, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94599, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9437.4248046875, -2137.572509765625, 66.7628173828125, 0.471238881349563598, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94600, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9434.021484375, -2135.5712890625, 66.296875, 3.752457857131958007, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94601, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 178.85015869140625, -2118.315673828125, 105.0109481811523437, 2.216568231582641601, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94602, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3427.63671875, -949.9451904296875, 9.669668197631835937, 4.258603572845458984, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94605, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1201.2806396484375, -2660.020751953125, 45.40309524536132812, 2.216568231582641601, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94606, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10936.1943359375, -3219.516357421875, 41.4308319091796875, 1.448623299598693847, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94607, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10968.8740234375, -3230.70703125, 41.53336334228515625, 5.235987663269042968, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94608, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10935.7001953125, -3215.9775390625, 41.4308319091796875, 4.258603572845458984, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94609, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5430.01806640625, -489.223052978515625, 396.78741455078125, 1.448623299598693847, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94610, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5243.39599609375, -2868.24951171875, 337.046142578125, 5.235987663269042968, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94611, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6688.79443359375, -2191.264892578125, 247.8145599365234375, 5.113814830780029296, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94612, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -475.42340087890625, -4532.37255859375, 12.32702064514160156, 1.570796370506286621, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94613, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1740.6671142578125, 5351.794921875, -12.3448028564453125, 6.0737457275390625, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94614, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1735.1473388671875, 5351.087890625, -12.3448066711425781, 2.967059612274169921, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94615, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1814.1285400390625, 220.9268646240234375, 59.59687423706054687, 5.218534469604492187, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94616, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6313.17822265625, 525.60357666015625, 17.21449089050292968, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94617, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6307.56103515625, 512.287109375, 17.76943397521972656, 5.375614166259765625, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94618, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9449.2509765625, -2120.39404296875, 69.13653564453125, 4.572762489318847656, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94619, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9382.33203125, 14.481719970703125, 61.61740875244140625, 4.258603572845458984, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94620, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5431.736328125, -502.4267578125, 397.757720947265625, 2.216568231582641601, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94621, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5433.92822265625, -500.603302001953125, 397.292236328125, 5.235987663269042968, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94622, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5242.91943359375, -2871.70458984375, 338.06793212890625, 2.216568231582641601, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94623, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5250.7705078125, -2895.20458984375, 338.6141357421875, 1.448623299598693847, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94624, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 34.11257553100585937, 2604.561767578125, 71.0569000244140625, 5.8817596435546875, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94625, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 214.86187744140625, 7681.31591796875, 22.78777694702148437, 2.792526721954345703, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94626, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 209.9723052978515625, 7682.06884765625, 22.66131210327148437, 0.05235987901687622, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94627, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1026.5867919921875, 304.890625, 135.8292694091796875, 0.715584993362426757, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94628, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1023.05902099609375, 307.598968505859375, 135.807464599609375, 3.88965606689453125, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94629, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1918.671875, -4348.6474609375, 20.8673858642578125, 5.026548385620117187, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94630, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1919.467041015625, -4353.54541015625, 20.84742355346679687, 1.623156189918518066, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94631, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1764.56298828125, 5311.56982421875, -12.3448047637939453, 3.019419670104980468, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94632, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1769.8411865234375, 5313.84912109375, -12.3448028564453125, 5.8817596435546875, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94633, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -515.7862548828125, 2339.665771484375, 37.94459152221679687, 2.216568231582641601, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94636, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1195.37109375, -2682.076416015625, 47.0075531005859375, 2.530727386474609375, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94638, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 186.3649139404296875, -2115.523193359375, 105.463714599609375, 1.448623299598693847, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94639, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 187.436737060546875, -2112.564697265625, 106.0841522216796875, 4.258603572845458984, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94640, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 177.1781768798828125, -2115.2431640625, 105.3067855834960937, 5.235987663269042968, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94641, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1143.935546875, -3549.910888671875, 52.43030929565429687, 5.235987663269042968, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94642, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1142.06201171875, -3553.01171875, 52.26158523559570312, 2.216568231582641601, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94643, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1115.127197265625, -3547.663330078125, 50.0686492919921875, 2.530727386474609375, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94644, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1117.8231201171875, -3543.859619140625, 50.28672409057617187, 4.547890186309814453, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94645, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10684.3466796875, -1148.5767822265625, 25.8847808837890625, 0.01745329238474369, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94646, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10682.5556640625, -1168.065673828125, 24.84414100646972656, 1.448623299598693847, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94647, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10681.478515625, -1164.2542724609375, 25.25356101989746093, 4.258603572845458984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94648, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10680.306640625, -1147.926513671875, 25.908477783203125, 3.385938644409179687, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94650, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10351.9716796875, -3296.738037109375, 23.66120338439941406, 1.48352980613708496, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94651, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10350.076171875, -3307.586181640625, 23.21487236022949218, 0.191986218094825744, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94652, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10344.3994140625, -3306.411376953125, 23.19609832763671875, 3.368485450744628906, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94653, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14371.4580078125, 132.8599700927734375, 1.042927384376525878, 1.780235767364501953, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94654, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14388.7724609375, 125.6664810180664062, 1.14530336856842041, 5.567600250244140625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94655, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14385.0595703125, 122.5594100952148437, 1.325597405433654785, 2.408554315567016601, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94656, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14374.603515625, 137.5897674560546875, 0.442370355129241943, 5.270894527435302734, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94657, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -122.378196716308593, -813.28106689453125, 55.64160919189453125, 3.019419670104980468, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94658, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -125.859756469726562, -811.30780029296875, 55.3297119140625, 5.8817596435546875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94659, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -129.013504028320312, -823.60845947265625, 55.25949478149414062, 0.593411922454833984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94660, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -125.360298156738281, -821.475830078125, 55.401031494140625, 3.560471534729003906, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94661, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4708.4287109375, -1236.9578857421875, 501.74273681640625, 1.117010712623596191, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94662, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4692.7177734375, -1218.0670166015625, 501.74267578125, 0.750491559505462646, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94663, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4706.34130859375, -1233.2301025390625, 501.74273681640625, 4.258603572845458984, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94664, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4688.58056640625, -1213.5035400390625, 501.74267578125, 4.258603572845458984, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94665, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1203.7896728515625, 7487.376953125, 22.23898696899414062, 3.543018341064453125, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94666, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1207.9310302734375, 7487.22119140625, 22.329345703125, 6.021385669708251953, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94667, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1214.888916015625, 7493.080078125, 20.783966064453125, 1.274090290069580078, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94668, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1213.771240234375, 7498.375, 20.59492683410644531, 4.555309295654296875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94669, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10646.9736328125, 1072.1695556640625, 34.08964157104492187, 1.518436431884765625, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94670, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10640.6201171875, 1080.9749755859375, 34.885528564453125, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94671, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10646.326171875, 1075.0521240234375, 34.66873931884765625, 4.258603572845458984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94672, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10642.1982421875, 1083.531005859375, 35.00516510009765625, 5.235987663269042968, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94673, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -614.224365234375, -535.79620361328125, 36.18006515502929687, 2.216568231582641601, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94674, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -615.83917236328125, -532.4276123046875, 35.78181838989257812, 5.235987663269042968, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94675, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8840.865234375, 851.16375732421875, 98.97126007080078125, 1.919862151145935058, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94676, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8842.8212890625, 856.1844482421875, 98.68222808837890625, 4.991641521453857421, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94677, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 593.82080078125, 1350.0206298828125, 90.39966583251953125, 5.131268024444580078, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94678, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 595.3646240234375, 1345.8031005859375, 90.15616607666015625, 1.867502331733703613, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94679, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 602.08380126953125, 1351.74072265625, 88.17452239990234375, 3.050934076309204101, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94680, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 600.0303955078125, 1355.1802978515625, 88.827880859375, 5.218534469604492187, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94681, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4585.1943359375, 428.713714599609375, 42.22011184692382812, 5.8817596435546875, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94682, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4593.39990234375, 421.33831787109375, 43.28391265869140625, 6.0737457275390625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94683, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7603.89404296875, -2066.003662109375, 129.67547607421875, 6.248278617858886718, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94684, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7595.41064453125, -2060.6318359375, 131.6774139404296875, 5.131268024444580078, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94685, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7592.49462890625, -2065.334228515625, 131.0778045654296875, 2.356194496154785156, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94686, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7599.01806640625, -2067.004638671875, 129.61773681640625, 2.844886541366577148, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94687, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4589.1201171875, 420.20013427734375, 42.82030868530273437, 2.792526721954345703, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94688, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4580.62890625, 427.090667724609375, 41.96175765991210937, 3.019419670104980468, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94689, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6988.54638671875, 908.5411376953125, 9.156393051147460937, 5.06145477294921875, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94690, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6979.45166015625, 913.84600830078125, 10.17988014221191406, 2.757620096206665039, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94691, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6984.421875, 914.66644287109375, 10.25777626037597656, 6.2657318115234375, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94692, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6988.51025390625, 905.155517578125, 8.611766815185546875, 1.361356854438781738, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94695, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7106.0185546875, -3664.1640625, 10.67626762390136718, 5.567600250244140625, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94697, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6783.3271484375, 546.26434326171875, 2.062355279922485351, 3.124139308929443359, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94698, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7110.3818359375, -3667.189208984375, 9.933405876159667968, 5.270894527435302734, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94701, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7230.20166015625, -3847.15673828125, 12.04393196105957031, 1.274090290069580078, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94702, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -623.30419921875, -530.146484375, 34.34803009033203125, 4.717217445373535156, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94703, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -623.67034912109375, -533.0115966796875, 34.46847915649414062, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94705, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3434.67236328125, -956.68206787109375, 9.655954360961914062, 5.235987663269042968, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94706, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3428.97119140625, -953.84014892578125, 10.22418594360351562, 1.448623299598693847, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94707, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 947.502197265625, 793.03857421875, 104.3484954833984375, 4.852015495300292968, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94708, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 948.3798828125, 787.4296875, 104.1169052124023437, 1.762782573699951171, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94709, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 939.41058349609375, 794.42889404296875, 104.0962142944335937, 4.956735134124755859, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94712, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -516.27880859375, 2343.693115234375, 37.8050994873046875, 4.834561824798583984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94713, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -508.935272216796875, 2331.935791015625, 38.67222976684570312, 1.082104086875915527, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94714, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -505.305999755859375, 2335.1953125, 38.78377532958984375, 3.926990747451782226, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94718, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2535.738037109375, 4272.06982421875, 16.9969635009765625, 5.8817596435546875, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94719, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2532.480224609375, 4270.6025390625, 16.28694725036621093, 3.019419670104980468, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94720, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 38.45231246948242187, 2603.812255859375, 70.8330841064453125, 3.019419670104980468, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94721, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 27.40256118774414062, 2596.1513671875, 70.34127044677734375, 3.368485450744628906, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94722, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 23.92898178100585937, 2595.87548828125, 70.45648193359375, 6.0737457275390625, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94723, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7102.43212890625, -3666.719970703125, 11.12041664123535156, 2.757620096206665039, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94725, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7109.0185546875, -3670.7197265625, 10.04127311706542968, 1.780235767364501953, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94727, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8708.4892578125, 949.18243408203125, 13.74794769287109375, 1.448623299598693847, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94728, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8723.4521484375, 968.93621826171875, 11.25754356384277343, 3.490658521652221679, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94729, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -290.37841796875, -2665.664794921875, 93.42819976806640625, 3.40339207649230957, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94730, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -294.148712158203125, -2665.89111328125, 93.49237823486328125, 0.575958669185638427, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94731, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -293.684417724609375, -2659.167236328125, 94.075286865234375, 6.056292533874511718, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94732, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -288.67620849609375, -2660.697509765625, 93.6977386474609375, 2.740166902542114257, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94734, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7234.59375, -3851.161865234375, 11.25800991058349609, 2.687807083129882812, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94735, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7237.943359375, -3850.227783203125, 10.85197639465332031, 6.17846536636352539, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94736, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2541.39013671875, 4261.50537109375, 16.38279533386230468, 3.368485450744628906, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94737, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2545.98828125, 4260.8525390625, 18.70516014099121093, 6.0737457275390625, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94739, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8718.390625, 966.43621826171875, 11.33300685882568359, 0.244346097111701965, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94740, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3472.674072265625, -4204.02001953125, 11.57154464721679687, 1.518436431884765625, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94741, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3471.389892578125, -4198.935546875, 11.40192699432373046, 4.293509960174560546, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94742, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3469.436279296875, -4215.04345703125, 9.689471244812011718, 3.944444179534912109, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94743, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2554.700439453125, -468.442230224609375, 109.6515350341796875, 2.216568231582641601, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94744, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2553.02099609375, -466.177581787109375, 109.6237945556640625, 5.235987663269042968, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94745, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2570.2333984375, -459.8243408203125, 108.06475830078125, 2.530727386474609375, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94746, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2567.436767578125, -458.459625244140625, 108.470672607421875, 6.126105785369873046, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL); + +UPDATE `creature` SET `CreateObject` = 1 WHERE `id1` = 16781 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); + +DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +(1, 202714), +(1, 202715), +(1, 202716), +(1, 202717), +(1, 202741), +(1, 202742), +(1, 202743), +(1, 202744), +(1, 202746), +(1, 202747), +(1, 202748), +(1, 202749), +(1, 202752), +(1, 202753), +(1, 202754), +(1, 202755), +(1, 202759), +(1, 202760), +(1, 202761), +(1, 202762), +(1, 202764), +(1, 202765), +(1, 202766), +(1, 202767), +(1, 94529), +(1, 94530), +(1, 94532), +(1, 94533), +(1, 94534), +(1, 94535), +(1, 94536), +(1, 94537), +(1, 94538), +(1, 94539), +(1, 94540), +(1, 94541), +(1, 94542), +(1, 94543), +(1, 94544), +(1, 94545), +(1, 94546), +(1, 94548), +(1, 94549), +(1, 94550), +(1, 94551), +(1, 94552), +(1, 94554), +(1, 94556), +(1, 94557), +(1, 94558), +(1, 94559), +(1, 94560), +(1, 94561), +(1, 94562), +(1, 94563), +(1, 94564), +(1, 94565), +(1, 94566), +(1, 94567), +(1, 94568), +(1, 94569), +(1, 94570), +(1, 94571), +(1, 94572), +(1, 94573), +(1, 94574), +(1, 94575), +(1, 94576), +(1, 94577), +(1, 94578), +(1, 94579), +(1, 94580), +(1, 94581), +(1, 94582), +(1, 94583), +(1, 94584), +(1, 94585), +(1, 94587), +(1, 94588), +(1, 94589), +(1, 94590), +(1, 94591), +(1, 94592), +(1, 94593), +(1, 94594), +(1, 94595), +(1, 94596), +(1, 94597), +(1, 94598), +(1, 94599), +(1, 94600), +(1, 94601), +(1, 94602), +(1, 94605), +(1, 94606), +(1, 94607), +(1, 94608), +(1, 94609), +(1, 94610), +(1, 94611), +(1, 94612), +(1, 94613), +(1, 94614), +(1, 94615), +(1, 94616), +(1, 94617), +(1, 94618), +(1, 94619), +(1, 94620), +(1, 94621), +(1, 94622), +(1, 94623), +(1, 94624), +(1, 94625), +(1, 94626), +(1, 94627), +(1, 94628), +(1, 94629), +(1, 94630), +(1, 94631), +(1, 94632), +(1, 94633), +(1, 94636), +(1, 94638), +(1, 94639), +(1, 94640), +(1, 94641), +(1, 94642), +(1, 94643), +(1, 94644), +(1, 94645), +(1, 94646), +(1, 94647), +(1, 94648), +(1, 94650), +(1, 94651), +(1, 94652), +(1, 94653), +(1, 94654), +(1, 94655), +(1, 94656), +(1, 94657), +(1, 94658), +(1, 94659), +(1, 94660), +(1, 94661), +(1, 94662), +(1, 94663), +(1, 94664), +(1, 94665), +(1, 94666), +(1, 94667), +(1, 94668), +(1, 94669), +(1, 94670), +(1, 94671), +(1, 94672), +(1, 94673), +(1, 94674), +(1, 94675), +(1, 94676), +(1, 94677), +(1, 94678), +(1, 94679), +(1, 94680), +(1, 94681), +(1, 94682), +(1, 94683), +(1, 94684), +(1, 94685), +(1, 94686), +(1, 94687), +(1, 94688), +(1, 94689), +(1, 94690), +(1, 94691), +(1, 94692), +(1, 94695), +(1, 94697), +(1, 94698), +(1, 94701), +(1, 94702), +(1, 94703), +(1, 94705), +(1, 94706), +(1, 94707), +(1, 94708), +(1, 94709), +(1, 94712), +(1, 94713), +(1, 94714), +(1, 94718), +(1, 94719), +(1, 94720), +(1, 94721), +(1, 94722), +(1, 94723), +(1, 94725), +(1, 94727), +(1, 94728), +(1, 94729), +(1, 94730), +(1, 94731), +(1, 94732), +(1, 94734), +(1, 94735), +(1, 94736), +(1, 94737), +(1, 94739), +(1, 94740), +(1, 94741), +(1, 94742), +(1, 94743), +(1, 94744), +(1, 94745), +(1, 94746); + +-- new spawns +DELETE FROM `creature` WHERE `id1` = 16781 AND `guid` BETWEEN 139127 AND 139262; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(139127, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10701.2314453125, -1157.10107421875, 24.87251091003417968, 2.351024627685546875, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139128, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10703.4609375, -1151.9708251953125, 25.09306907653808593, 2.971575021743774414, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139129, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4692.6484375, -1228.8831787109375, 501.659271240234375, 4.224524497985839843, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139130, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4694.72509765625, -1228.233154296875, 501.6593017578125, 5.137562274932861328, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139131, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6689.6044921875, -2199.64013671875, 249.043731689453125, 0.174532920122146606, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139132, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8256.31640625, -2605.284423828125, 133.235626220703125, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139133, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8257.9580078125, -2609.8115234375, 133.249481201171875, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139134, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8264.7490234375, -2641.7578125, 133.6263885498046875, 2.216568231582641601, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139135, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8266.9189453125, -2639.165283203125, 134.0574493408203125, 5.235987663269042968, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139136, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8821.6669921875, 881.41400146484375, 98.79027557373046875, 3.996803998947143554, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139137, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8825.2900390625, 876.76513671875, 98.821807861328125, 1.029744267463684082, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139138, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1006.48651123046875, -1442.0902099609375, 62.62816619873046875, 1.448623299598693847, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139139, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1007.09637451171875, -1435.5517578125, 63.42873764038085937, 4.642575740814208984, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139140, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 988.69769287109375, -1444.1343994140625, 63.6132659912109375, 1.29154360294342041, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139141, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 990.811767578125, -1439.3695068359375, 64.5729827880859375, 4.15388345718383789, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139142, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1000.00872802734375, 312.12152099609375, 135.8292694091796875, 3.385938644409179687, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139143, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1005.61981201171875, 310.899322509765625, 135.8292694091796875, 0.191986218094825744, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139144, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2333.6328125, -606.24383544921875, -8.55437660217285156, 3.543018341064453125, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139145, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2337.065185546875, -607.47906494140625, -8.18629264831542968, 0.122173048555850982, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139146, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2337.664794921875, -617.125244140625, -7.4183053970336914, 2.705260276794433593, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139147, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2341.706298828125, -614.60626220703125, -7.27002334594726562, 5.515240192413330078, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139148, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4397.759765625, 3463.2197265625, 11.22617053985595703, 4.834561824798583984, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139149, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4398.2509765625, 3458.70947265625, 11.29399967193603515, 2.216568231582641601, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139150, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4412.48974609375, 3464.407470703125, 13.15926170349121093, 4.258603572845458984, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139151, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4414.69677734375, 3461.673095703125, 13.22854804992675781, 1.448623299598693847, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139152, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6840.31201171875, -4555.98095703125, 710.2003173828125, 4.206243515014648437, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139153, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8696.9345703125, 937.32525634765625, 14.55591869354248046, 2.631667137145996093, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139154, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8704.1767578125, 944.35198974609375, 13.64527416229248046, 3.877047538757324218, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139155, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2222.540283203125, -11890.4208984375, 27.97060394287109375, 4.258603572845458984, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139156, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2222.741455078125, -11892.71875, 27.48875808715820312, 1.448623299598693847, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139157, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2232.90185546875, -11917.44921875, 26.92511177062988281, 2.216568231582641601, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139158, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2235.29931640625, -11914.263671875, 26.05220794677734375, 5.235987663269042968, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139159, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2506.72509765625, 7556.00244140625, -1.40493464469909667, 4.834561824798583984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139160, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2507.036865234375, 7551.8447265625, -1.13188362121582031, 1.570796370506286621, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139161, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2507.24169921875, 7532.45166015625, 0.469488352537155151, 3.926990747451782226, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139162, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2510.171142578125, 7530.70751953125, 0.631805300712585449, 0.693436861038208007, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139163, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2989.25244140625, 4142.83447265625, 5.049828529357910156, 1.675516128540039062, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139164, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2989.418701171875, 4146.6103515625, 5.539825439453125, 4.694935798645019531, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139165, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2997.968017578125, 4144.9990234375, 2.975908279418945312, 3.926990747451782226, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139166, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3001.250244140625, 4140.32958984375, 2.030464410781860351, 1.082104086875915527, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139167, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3049.09716796875, 2392.4052734375, 61.67646026611328125, 4.555309295654296875, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139168, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3050.47119140625, 2388.159423828125, 62.44898223876953125, 1.274090290069580078, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139169, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3060.248046875, 2398.67724609375, 61.3582000732421875, 4.625122547149658203, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139170, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3060.8466796875, 2395.11376953125, 61.72652053833007812, 1.413716673851013183, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139171, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3793.38671875, -11495.5478515625, -134.705001831054687, 2.668026924133300781, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139172, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3961.43408203125, 2055.026611328125, 95.148040771484375, 3.926990747451782226, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139173, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3963.264892578125, 2052.794677734375, 95.148040771484375, 1.082104086875915527, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139174, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3969.27685546875, 2043.572021484375, 95.1483154296875, 2.216568231582641601, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139175, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3970.262939453125, 2046.131103515625, 95.148162841796875, 4.834561824798583984, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139176, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4210.650390625, -12301.302734375, 1.654789328575134277, 2.216568231582641601, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139177, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4211.76025390625, -12330.4970703125, 3.183884143829345703, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139178, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4211.90673828125, -12297.8056640625, 1.91208040714263916, 5.235987663269042968, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139179, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4212.716796875, -12333.73828125, 3.594502210617065429, 1.448623299598693847, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139180, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.33062744140625, 5998.0126953125, 24.39078330993652343, 1.082104086875915527, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139181, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.4051971435546875, 6007.1650390625, 24.1693115234375, 4.834561824798583984, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139182, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.8719329833984375, 6004.16748046875, 24.28223800659179687, 2.216568231582641601, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139183, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 191.632354736328125, 6000.23779296875, 24.4112701416015625, 3.926990747451782226, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139184, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2031.359375, 6601.51025390625, 136.8399200439453125, 1.448623299598693847, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139185, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2033.853759765625, 6604.1318359375, 137.4528961181640625, 4.258603572845458984, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139186, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2041.9774169921875, 6575.76220703125, 134.592193603515625, 5.235987663269042968, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139187, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2044.85546875, 6572.400390625, 134.8233184814453125, 2.216568231582641601, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139188, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2263.68310546875, 6136.705078125, 137.2147064208984375, 4.258603572845458984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139189, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2263.91064453125, 6132.2109375, 137.5455780029296875, 1.448623299598693847, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139190, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2293.89794921875, 6160.11328125, 135.8495330810546875, 5.235987663269042968, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139191, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2296.048828125, 6156.392578125, 135.0826263427734375, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139192, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2922.30517578125, 3666.272216796875, 145.1943511962890625, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139193, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2923.46435546875, 3669.0126953125, 144.9244384765625, 4.258603572845458984, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139194, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2926.392333984375, 3701.306396484375, 143.7755584716796875, 5.235987663269042968, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139195, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2928.210205078125, 3698.048095703125, 143.8076171875, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139196, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3109.265625, 3720.612060546875, 145.1728515625, 2.216568231582641601, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139197, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3109.507080078125, 3725.17578125, 145.2384033203125, 4.834561824798583984, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139198, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3125.484375, 3725.59326171875, 142.5902862548828125, 1.082104086875915527, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139199, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3126.439453125, 3729.56982421875, 142.483184814453125, 3.926990747451782226, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139200, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2457.836669921875, -4903.42529296875, 263.61767578125, 1.082104086875915527, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139201, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2459.67724609375, -4900.81787109375, 263.543304443359375, 3.926990747451782226, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139202, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2466.2978515625, -4906.74755859375, 264.084075927734375, 4.642575740814208984, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139203, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2466.573486328125, -4910.02197265625, 264.16815185546875, 1.754963874816894531, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139204, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2590.704345703125, -4352.7197265625, 275.87060546875, 5.672319889068603515, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139205, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2593.116455078125, -4354.75927734375, 275.85491943359375, 2.356194496154785156, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139206, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2604.65283203125, -4349.236328125, 275.7276611328125, 5.916666030883789062, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139207, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2607.03564453125, -4350.83544921875, 275.838623046875, 2.286381244659423828, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139208, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3363.32177734375, -2133.1533203125, 123.9278182983398437, 5.619960308074951171, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139209, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3366.183837890625, -2135.861083984375, 124.3294448852539062, 2.268928050994873046, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139210, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3378.244140625, -2139.7666015625, 124.9742355346679687, 5.026548385620117187, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139211, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3378.42333984375, -2144.294677734375, 124.8458480834960937, 1.326450228691101074, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139212, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3408.40185546875, -2885.163818359375, 201.1352081298828125, 1.082104086875915527, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139213, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3410.669677734375, -2882.25341796875, 201.108062744140625, 3.926990747451782226, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139214, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3420.4033203125, -2884.866455078125, 202.0738525390625, 1.780235767364501953, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139215, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3420.75830078125, -2881.11767578125, 202.3721466064453125, 4.642575740814208984, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139216, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3757.033447265625, 1491.1285400390625, 91.73284912109375, 5.8817596435546875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139217, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3760.4296875, 1507.6015625, 89.87375640869140625, 6.0737457275390625, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139218, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3763.28955078125, 1506.70556640625, 89.33295440673828125, 3.368485450744628906, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139219, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3939.974853515625, -607.47686767578125, 241.8284759521484375, 4.834561824798583984, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139220, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3940.39892578125, -610.2362060546875, 242.02777099609375, 2.216568231582641601, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139221, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3946.244873046875, -625.32342529296875, 242.421844482421875, 0.715584993362426757, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139222, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3948.481689453125, -623.30615234375, 241.8450164794921875, 3.892084121704101562, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139223, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4146.4248046875, 5392.51806640625, 26.23081016540527343, 1.082104086875915527, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139224, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4147.98876953125, 5394.76806640625, 26.03989982604980468, 3.926990747451782226, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139225, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4152.33544921875, 5403.42138671875, 27.38189315795898437, 4.834561824798583984, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139226, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4152.42578125, 5400.58935546875, 26.6825408935546875, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139227, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4466.49462890625, 5615.1318359375, 57.21674728393554687, 5.8817596435546875, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139228, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4468.97412109375, 5614.6904296875, 57.5550384521484375, 3.019419670104980468, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139229, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4470.0087890625, 5623.4189453125, 58.90815353393554687, 6.0737457275390625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139230, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4472.21435546875, 5622.79443359375, 59.23351287841796875, 3.168313026428222656, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139231, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5131.25927734375, -680.6533203125, 171.677764892578125, 4.932596206665039062, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139232, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5131.77197265625, -683.32135009765625, 171.4430389404296875, 1.797689080238342285, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139233, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5137.96728515625, -695.96380615234375, 172.0256195068359375, 0.663225114345550537, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139234, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5139.6884765625, -694.12042236328125, 171.7145843505859375, 3.909537553787231445, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139235, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5271.1572265625, -2791.30517578125, 292.501861572265625, 1.535889744758605957, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139236, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5272.021484375, -2787.055908203125, 292.501861572265625, 4.328416347503662109, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139237, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5285.443359375, -2773.591064453125, 292.501861572265625, 0.506145477294921875, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139238, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5288.8515625, -2771.415283203125, 292.501861572265625, 3.592701911926269531, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139239, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5353.1650390625, 4852.46630859375, -192.568603515625, 1.082104086875915527, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139240, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5353.3818359375, 4867.77978515625, -189.798294067382812, 5.270894527435302734, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139241, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5355.0615234375, 4864.12255859375, -190.967422485351562, 1.902408838272094726, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139242, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5355.73486328125, 4854.8544921875, -193.244140625, 3.926990747451782226, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139243, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5500.1689453125, 4885.63330078125, -198.4190673828125, 6.0737457275390625, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139244, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5503.37353515625, 4884.96142578125, -198.343353271484375, 3.368485450744628906, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139245, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5506.169921875, 4888.8203125, -197.933181762695312, 5.323254108428955078, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139246, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5507.82861328125, 4886.794921875, -197.88641357421875, 2.356194496154785156, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139247, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5523.92822265625, -717.83514404296875, 148.5211029052734375, 5.550356864929199218, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139248, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5526.07470703125, -721.347412109375, 148.4966278076171875, 2.268928050994873046, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139249, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5541.05859375, -729.351806640625, 150.0355682373046875, 4.921828269958496093, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139250, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5541.20751953125, -732.760986328125, 149.995849609375, 1.500983119010925292, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139251, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5611.73876953125, -2618.024658203125, 292.297149658203125, 1.082104086875915527, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139252, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5613.908203125, -2616.232177734375, 292.2694091796875, 3.926990747451782226, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139253, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5624.13525390625, -2621.2490234375, 292.501861572265625, 4.642575740814208984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139254, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5624.1552734375, -2624.92578125, 292.501861572265625, 1.780235767364501953, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139255, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6074.1826171875, -1115.936279296875, 420.4525146484375, 0.139626339077949523, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139256, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6078.80322265625, -1115.361083984375, 420.3092041015625, 3.246312379837036132, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139257, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6089.47705078125, -1116.2974853515625, 419.81597900390625, 0.663225114345550537, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139258, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6092.06591796875, -1114.0496826171875, 419.058319091796875, 3.909537553787231445, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139259, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6151.4912109375, -1032.8651123046875, 409.3367919921875, 4.921828269958496093, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139260, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6151.6396484375, -1035.900634765625, 409.4896240234375, 1.500983119010925292, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139261, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6157.4091796875, -1023.6146240234375, 408.467071533203125, 5.619960308074951171, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139262, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6159.4375, -1025.43212890625, 408.73101806640625, 2.268928050994873046, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL); + +UPDATE `creature` SET `CreateObject` = 1 WHERE `id1` = 16781 AND `guid` BETWEEN 139127 AND 139262; + +DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` BETWEEN 139127 AND 139262; +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +(1, 139127), +(1, 139128), +(1, 139129), +(1, 139130), +(1, 139131), +(1, 139132), +(1, 139133), +(1, 139134), +(1, 139135), +(1, 139136), +(1, 139137), +(1, 139138), +(1, 139139), +(1, 139140), +(1, 139141), +(1, 139142), +(1, 139143), +(1, 139144), +(1, 139145), +(1, 139146), +(1, 139147), +(1, 139148), +(1, 139149), +(1, 139150), +(1, 139151), +(1, 139152), +(1, 139153), +(1, 139154), +(1, 139155), +(1, 139156), +(1, 139157), +(1, 139158), +(1, 139159), +(1, 139160), +(1, 139161), +(1, 139162), +(1, 139163), +(1, 139164), +(1, 139165), +(1, 139166), +(1, 139167), +(1, 139168), +(1, 139169), +(1, 139170), +(1, 139171), +(1, 139172), +(1, 139173), +(1, 139174), +(1, 139175), +(1, 139176), +(1, 139177), +(1, 139178), +(1, 139179), +(1, 139180), +(1, 139181), +(1, 139182), +(1, 139183), +(1, 139184), +(1, 139185), +(1, 139186), +(1, 139187), +(1, 139188), +(1, 139189), +(1, 139190), +(1, 139191), +(1, 139192), +(1, 139193), +(1, 139194), +(1, 139195), +(1, 139196), +(1, 139197), +(1, 139198), +(1, 139199), +(1, 139200), +(1, 139201), +(1, 139202), +(1, 139203), +(1, 139204), +(1, 139205), +(1, 139206), +(1, 139207), +(1, 139208), +(1, 139209), +(1, 139210), +(1, 139211), +(1, 139212), +(1, 139213), +(1, 139214), +(1, 139215), +(1, 139216), +(1, 139217), +(1, 139218), +(1, 139219), +(1, 139220), +(1, 139221), +(1, 139222), +(1, 139223), +(1, 139224), +(1, 139225), +(1, 139226), +(1, 139227), +(1, 139228), +(1, 139229), +(1, 139230), +(1, 139231), +(1, 139232), +(1, 139233), +(1, 139234), +(1, 139235), +(1, 139236), +(1, 139237), +(1, 139238), +(1, 139239), +(1, 139240), +(1, 139241), +(1, 139242), +(1, 139243), +(1, 139244), +(1, 139245), +(1, 139246), +(1, 139247), +(1, 139248), +(1, 139249), +(1, 139250), +(1, 139251), +(1, 139252), +(1, 139253), +(1, 139254), +(1, 139255), +(1, 139256), +(1, 139257), +(1, 139258), +(1, 139259), +(1, 139260), +(1, 139261), +(1, 139262); From a7822987f11031ae45967b0d532d7573d93fec7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 00:48:31 +0000 Subject: [PATCH 325/340] chore(DB): import pending files Referenced commit(s): d9094187066188c0d9de00b091aeaa0b0fce865b --- .../rev_1697918911416150200.sql => db_world/2023_10_22_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697918911416150200.sql => db_world/2023_10_22_05.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1697918911416150200.sql b/data/sql/updates/db_world/2023_10_22_05.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1697918911416150200.sql rename to data/sql/updates/db_world/2023_10_22_05.sql index a9dc89b7d0b5d5..bb6519c55241d0 100644 --- a/data/sql/updates/pending_db_world/rev_1697918911416150200.sql +++ b/data/sql/updates/db_world/2023_10_22_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_04 -> 2023_10_22_05 -- Use sniffed values for 16781 Midsummer Celebrant spawns -- updated spawns DELETE FROM `creature` WHERE `id1` = 16781 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); From c5ac4789d876f43f61eb2b3d71bddb599c3873dc Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:59:18 -0300 Subject: [PATCH 326/340] fix(Scripts/Karazhan): Opera left door should stay open in case of wipe (#17553) --- .../Karazhan/instance_karazhan.cpp | 2 +- .../EasternKingdoms/Karazhan/karazhan.cpp | 62 +++---------------- 2 files changed, 11 insertions(+), 53 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index a6dfff1c65d37e..bf20a171e17e32 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -306,7 +306,7 @@ class instance_karazhan : public InstanceMapScript } else if (state == FAIL) { - HandleGameObject(m_uiStageDoorLeftGUID, false); + HandleGameObject(m_uiStageDoorLeftGUID, true); HandleGameObject(m_uiStageDoorRightGUID, false); HandleGameObject(m_uiCurtainGUID, false); DoRespawnCreature(_barnesGUID, true); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index cbe5a99988f5db..2c144b3adbf8fc 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -135,7 +135,6 @@ class npc_barnes : public CreatureScript { npc_barnesAI(Creature* creature) : npc_escortAI(creature) { - RaidWiped = false; m_uiEventId = 0; instance = creature->GetInstanceScript(); } @@ -146,11 +145,9 @@ class npc_barnes : public CreatureScript uint32 TalkCount; uint32 TalkTimer; - uint32 WipeTimer; uint32 m_uiEventId; bool PerformanceReady; - bool RaidWiped; void Reset() override { @@ -158,7 +155,6 @@ class npc_barnes : public CreatureScript TalkCount = 0; TalkTimer = 2000; - WipeTimer = 5000; PerformanceReady = false; @@ -183,8 +179,8 @@ class npc_barnes : public CreatureScript switch (waypointId) { case 0: - DoCast(me, SPELL_TUXEDO, false); - instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT)); + DoCastSelf(SPELL_TUXEDO); + instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true); break; case 4: TalkCount = 0; @@ -276,8 +272,6 @@ class npc_barnes : public CreatureScript creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); } - RaidWiped = false; - instance->SetData(DATA_SPAWN_OPERA_DECORATIONS, m_uiEventId); } @@ -303,43 +297,6 @@ class npc_barnes : public CreatureScript } else TalkTimer -= diff; } - - if (PerformanceReady) - { - if (!RaidWiped) - { - if (WipeTimer <= diff) - { - Map* map = me->GetMap(); - if (!map->IsDungeon()) - return; - - Map::PlayerList const& PlayerList = map->GetPlayers(); - if (PlayerList.IsEmpty()) - return; - - RaidWiped = true; - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->GetSource()->IsAlive() && !i->GetSource()->IsGameMaster()) - { - RaidWiped = false; - break; - } - } - - if (RaidWiped) - { - RaidWiped = true; - EnterEvadeMode(); - return; - } - - WipeTimer = 15000; - } - else WipeTimer -= diff; - } - } } }; @@ -391,15 +348,16 @@ class npc_barnes : public CreatureScript AddGossipItemFor(player, GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); } - if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI())) + if (instance->GetBossState(DATA_OPERA_PERFORMANCE) != FAIL) { - if (!pBarnesAI->RaidWiped) - SendGossipMenuFor(player, BARNES_TEXT_IS_READY, creature->GetGUID()); - else - SendGossipMenuFor(player, BARNES_TEXT_WIPED, creature->GetGUID()); - - return true; + SendGossipMenuFor(player, BARNES_TEXT_IS_READY, creature->GetGUID()); } + else + { + SendGossipMenuFor(player, BARNES_TEXT_WIPED, creature->GetGUID()); + } + + return true; } } From 945d7c6afef52bfdc677d3b06b1b4c27e5d86ef1 Mon Sep 17 00:00:00 2001 From: podmepodme <57728656+podmepodme@users.noreply.github.com> Date: Sun, 22 Oct 2023 03:16:51 +0200 Subject: [PATCH 327/340] fix(Script/Misc): Replace hardcoded gossip and texts with DB ones. (#17502) * fix(CORE/Creature): replace shadowmoon valley hardcoded gossips * fix(CORE/GameObject): replace terokkar forrest hardcoded gossips * fix(Core/Creature): replace shattrath city hardcoded gossips * style(Core): code style edit * style(CORE) codestyle edit * style(CORE) codestyle edit * style(CORE): codestyle edit * ready for merge --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../scripts/Kalimdor/zone_orgrimmar.cpp | 5 +- .../Outland/zone_shadowmoon_valley.cpp | 36 ++++++++----- .../scripts/Outland/zone_shattrath_city.cpp | 10 ++-- .../scripts/Outland/zone_terokkar_forest.cpp | 54 ++++++++++++------- 4 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index 0f9f3dbd7f9ad3..d4ecb8cad7b05f 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -157,7 +157,6 @@ enum ThrallWarchief : uint32 QUEST_WHAT_THE_WIND_CARRIES = 6566, GOSSIP_MENU_THRALL = 3664, GOSSIP_RESPONSE_THRALL_FIRST = 5733, - GOSSIP_OPTION_DEFAULT = 0 }; const Position heraldOfThrallPos = { -462.404f, -2637.68f, 96.0656f, 5.8606f }; @@ -179,7 +178,7 @@ class npc_thrall_warchief : public CreatureScript uint32 NextAction = GOSSIP_ACTION_INFO_DEF + DiscussionOrder + 1; uint32 GossipResponse = GOSSIP_RESPONSE_THRALL_FIRST + DiscussionOrder - 1; - AddGossipItemFor(player, GOSSIP_MENU_THRALL + DiscussionOrder, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, NextAction); + AddGossipItemFor(player, GOSSIP_MENU_THRALL + DiscussionOrder, 0, GOSSIP_SENDER_MAIN, NextAction); SendGossipMenuFor(player, GossipResponse, creature->GetGUID()); } else if (DiscussionOrder == 7) @@ -200,7 +199,7 @@ class npc_thrall_warchief : public CreatureScript if (player->GetQuestStatus(QUEST_WHAT_THE_WIND_CARRIES) == QUEST_STATUS_INCOMPLETE) { - AddGossipItemFor(player, GOSSIP_MENU_THRALL, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_THRALL, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 00e2b6619f7aef..164a5513ff85b7 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -731,8 +731,19 @@ class npc_drake_dealer_hurlunk : public CreatureScript ## npc_flanis_swiftwing_and_kagrosh ######*/ -#define GOSSIP_HSK1 "Take Flanis's Pack" -#define GOSSIP_HSK2 "Take Kagrosh's Pack" +enum Flanis : uint32 +{ + QUEST_THE_FATE_OF_FLANIS = 10583, + ITEM_FLAUNISS_PACK = 30658, + GOSSIP_MENU_FLANIS = 8356, +}; + +enum Kagrosh : uint32 +{ + QUEST_THE_FATE_OF_KAGROSH = 10601, + ITEM_KAGROSHS_PACK = 30659, + GOSSIP_MENU_KAGROSH = 8371, +}; class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript { @@ -745,32 +756,33 @@ class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript if (action == GOSSIP_ACTION_INFO_DEF + 1) { ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, nullptr); + uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_FLAUNISS_PACK, 1, nullptr); if (msg == EQUIP_ERR_OK) { - player->StoreNewItem(dest, 30658, true); - ClearGossipMenuFor(player); + player->StoreNewItem(dest, ITEM_FLAUNISS_PACK, true); } } if (action == GOSSIP_ACTION_INFO_DEF + 2) { ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, nullptr); + uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_KAGROSHS_PACK, 1, nullptr); if (msg == EQUIP_ERR_OK) { - player->StoreNewItem(dest, 30659, true); - ClearGossipMenuFor(player); + player->StoreNewItem(dest, ITEM_KAGROSHS_PACK, true); } } + + CloseGossipMenuFor(player); + return true; } bool OnGossipHello(Player* player, Creature* creature) override { - if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true)) - AddGossipItemFor(player, 0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true)) - AddGossipItemFor(player, 0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + if (player->GetQuestStatus(QUEST_THE_FATE_OF_FLANIS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(ITEM_FLAUNISS_PACK, 1, true)) + AddGossipItemFor(player, GOSSIP_MENU_FLANIS, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (player->GetQuestStatus(QUEST_THE_FATE_OF_KAGROSH) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(ITEM_KAGROSHS_PACK, 1, true)) + AddGossipItemFor(player, GOSSIP_MENU_KAGROSH, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index aacd828c1f09d3..8aaaf858088699 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -85,7 +85,11 @@ class npc_shattrathflaskvendors : public CreatureScript # npc_zephyr ######*/ -#define GOSSIP_HZ "Take me to the Caverns of Time." +enum Zephyr : int32 +{ + GOSSIP_MENU_ZEPHYR = 9205, + SPELL_TELEPORT_CAVERNS_OF_TIME = 37778, +}; class npc_zephyr : public CreatureScript { @@ -96,7 +100,7 @@ class npc_zephyr : public CreatureScript { ClearGossipMenuFor(player); if (action == GOSSIP_ACTION_INFO_DEF + 1) - player->CastSpell(player, 37778, false); + player->CastSpell(player, SPELL_TELEPORT_CAVERNS_OF_TIME, false); return true; } @@ -104,7 +108,7 @@ class npc_zephyr : public CreatureScript bool OnGossipHello(Player* player, Creature* creature) override { if (player->GetReputationRank(989) >= REP_REVERED) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_ZEPHYR, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index e584f8cbeed85c..b71a018b832595 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -575,10 +575,25 @@ class npc_isla_starmane : public CreatureScript /*###### ## go_skull_pile ######*/ -#define GOSSIP_S_DARKSCREECHER_AKKARAI "Summon Darkscreecher Akkarai" -#define GOSSIP_S_KARROG "Summon Karrog" -#define GOSSIP_S_GEZZARAK_THE_HUNTRESS "Summon Gezzarak the Huntress" -#define GOSSIP_S_VAKKIZ_THE_WINDRAGER "Summon Vakkiz the Windrager" + +enum SkullPile : uint32 +{ + QUEST_ADVERSARIAL_BLOOD = 11885, + + GOSSIP_MENU_SKULL_PILE = 8660, + GOSSIP_MENU_TEXT_SKULL_PILE = 10888, + GOSSIP_MENU_TEXT_SKULL_PILE_QUEST = 11057, + + GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS = 0, + GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI = 1, + GOSSIP_OPTION_SUMMON_KARROG = 2, + GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER = 3, + + SPELL_SUMMON_GEZZARAK_THE_HUNTRESS = 40632, + SPELL_SUMMON_DARKSCREECHER_AKKARAI = 40642, + SPELL_SUMMON_KARROG = 40640, + SPELL_SUMMON_VAKKIZ_THE_WINDRAGER = 40644, +}; class go_skull_pile : public GameObjectScript { @@ -588,26 +603,29 @@ class go_skull_pile : public GameObjectScript bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) override { ClearGossipMenuFor(player); - switch (sender) + + if (sender == GOSSIP_SENDER_MAIN) { - case GOSSIP_SENDER_MAIN: - SendActionMenu(player, go, action); - break; + SendActionMenu(player, go, action); + CloseGossipMenuFor(player); } return true; } bool OnGossipHello(Player* player, GameObject* go) override { - if ((player->GetQuestStatus(11885) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(11885)) + if ((player->GetQuestStatus(QUEST_ADVERSARIAL_BLOOD) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(QUEST_ADVERSARIAL_BLOOD)) { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + + SendGossipMenuFor(player, GOSSIP_MENU_TEXT_SKULL_PILE_QUEST, go->GetGUID()); } + else + SendGossipMenuFor(player, GOSSIP_MENU_TEXT_SKULL_PILE, go->GetGUID()); - SendGossipMenuFor(player, go->GetGOInfo()->questgiver.gossipID, go->GetGUID()); return true; } @@ -616,16 +634,16 @@ class go_skull_pile : public GameObjectScript switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: - player->CastSpell(player, 40642, false); + player->CastSpell(player, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, false); break; case GOSSIP_ACTION_INFO_DEF + 2: - player->CastSpell(player, 40640, false); + player->CastSpell(player, SPELL_SUMMON_DARKSCREECHER_AKKARAI, false); break; case GOSSIP_ACTION_INFO_DEF + 3: - player->CastSpell(player, 40632, false); + player->CastSpell(player, SPELL_SUMMON_KARROG, false); break; case GOSSIP_ACTION_INFO_DEF + 4: - player->CastSpell(player, 40644, false); + player->CastSpell(player, SPELL_SUMMON_VAKKIZ_THE_WINDRAGER, false); break; } } From 4e41a02be2dc9b9dafbda44019c596d50c19b7cb Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Oct 2023 22:52:07 -0300 Subject: [PATCH 328/340] =?UTF-8?q?fix(Scripts/Karazhan):=20Implement=20th?= =?UTF-8?q?e=20side=20entrance=20door=20area=20trigger=20=E2=80=A6=20(#175?= =?UTF-8?q?56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Karazhan): Implement the side entrance door area trigger handling --- .../rev_1697938524950640300.sql | 4 ++++ .../Karazhan/instance_karazhan.cpp | 14 +++++------ .../EasternKingdoms/Karazhan/karazhan.cpp | 24 +++++++++++++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697938524950640300.sql diff --git a/data/sql/updates/pending_db_world/rev_1697938524950640300.sql b/data/sql/updates/pending_db_world/rev_1697938524950640300.sql new file mode 100644 index 00000000000000..2014eabbb54530 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697938524950640300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` = 4522; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(4522, 'at_karazhan_side_entrance'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index bf20a171e17e32..5e595c568b3728 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -48,6 +48,12 @@ ObjectData const creatureData[] = { 0, 0 } }; +ObjectData const gameObjectData[] = +{ + { GO_SIDE_ENTRANCE_DOOR, DATA_GO_SIDE_ENTRANCE_DOOR }, + { 0, 0 } +}; + class instance_karazhan : public InstanceMapScript { public: @@ -64,7 +70,7 @@ class instance_karazhan : public InstanceMapScript { SetHeaders(DataHeader); SetBossNumber(EncounterCount); - LoadObjectData(creatureData, nullptr); + LoadObjectData(creatureData, gameObjectData); // 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered. OperaEvent = urand(EVENT_OZ, EVENT_RAJ); @@ -300,8 +306,6 @@ class instance_karazhan : public InstanceMapScript { HandleGameObject(m_uiStageDoorLeftGUID, true); HandleGameObject(m_uiStageDoorRightGUID, true); - if (GameObject* sideEntrance = instance->GetGameObject(m_uiSideEntranceDoor)) - sideEntrance->RemoveGameObjectFlag(GO_FLAG_LOCKED); instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, nullptr); } else if (state == FAIL) @@ -372,7 +376,6 @@ class instance_karazhan : public InstanceMapScript MastersTerraceDoor[1] = go->GetGUID(); break; case GO_SIDE_ENTRANCE_DOOR: - m_uiSideEntranceDoor = go->GetGUID(); if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE) go->RemoveGameObjectFlag(GO_FLAG_LOCKED); else @@ -477,8 +480,6 @@ class instance_karazhan : public InstanceMapScript return m_uiLibraryDoor; case DATA_GO_MASSIVE_DOOR: return m_uiMassiveDoor; - case DATA_GO_SIDE_ENTRANCE_DOOR: - return m_uiSideEntranceDoor; case DATA_GO_GAME_DOOR: return m_uiGamesmansDoor; case DATA_GO_GAME_EXIT_DOOR: @@ -519,7 +520,6 @@ class instance_karazhan : public InstanceMapScript ObjectGuid m_uiNightBaneGUID; ObjectGuid m_uiLibraryDoor; // Door at Shade of Aran ObjectGuid m_uiMassiveDoor; // Door at Netherspite - ObjectGuid m_uiSideEntranceDoor; // Side Entrance ObjectGuid m_uiGamesmansDoor; // Door before Chess ObjectGuid m_uiGamesmansExitDoor; // Door after Chess ObjectGuid m_uiNetherspaceDoor; // Door at Malchezaar diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 2c144b3adbf8fc..d818a42c01ee31 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -562,8 +562,32 @@ class npc_image_of_medivh : public CreatureScript }; }; +class at_karazhan_side_entrance : public OnlyOnceAreaTriggerScript +{ +public: + at_karazhan_side_entrance() : OnlyOnceAreaTriggerScript("at_karazhan_side_entrance") { } + + bool _OnTrigger(Player* player, AreaTrigger const* /*at*/) override + { + if (InstanceScript* instance = player->GetInstanceScript()) + { + if (instance->GetBossState(DATA_OPERA_PERFORMANCE) == DONE) + { + if (GameObject* door = instance->GetGameObject(DATA_GO_SIDE_ENTRANCE_DOOR)) + { + instance->HandleGameObject(ObjectGuid::Empty, true, door); + door->RemoveGameObjectFlag(GO_FLAG_LOCKED); + } + } + } + + return false; + } +}; + void AddSC_karazhan() { new npc_barnes(); new npc_image_of_medivh(); + new at_karazhan_side_entrance(); } From c73e479c5888a036f87a23647d4325be5c3360c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 01:53:24 +0000 Subject: [PATCH 329/340] chore(DB): import pending files Referenced commit(s): 4e41a02be2dc9b9dafbda44019c596d50c19b7cb --- .../rev_1697938524950640300.sql => db_world/2023_10_22_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1697938524950640300.sql => db_world/2023_10_22_06.sql} (78%) diff --git a/data/sql/updates/pending_db_world/rev_1697938524950640300.sql b/data/sql/updates/db_world/2023_10_22_06.sql similarity index 78% rename from data/sql/updates/pending_db_world/rev_1697938524950640300.sql rename to data/sql/updates/db_world/2023_10_22_06.sql index 2014eabbb54530..dd428d71f469ea 100644 --- a/data/sql/updates/pending_db_world/rev_1697938524950640300.sql +++ b/data/sql/updates/db_world/2023_10_22_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_05 -> 2023_10_22_06 -- DELETE FROM `areatrigger_scripts` WHERE `entry` = 4522; INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES From 83892f93b4f25bf041f47b0ea0cc1c8681580ced Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Sat, 21 Oct 2023 22:27:24 -0400 Subject: [PATCH 330/340] chore(DB/Transports): Replace transport `name` fields with consistent text. (#14894) * Init * Hark! A new line! * Correct a faction. Silly predecessors. --- .../pending_db_world/transport-rename.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/sql/updates/pending_db_world/transport-rename.sql diff --git a/data/sql/updates/pending_db_world/transport-rename.sql b/data/sql/updates/pending_db_world/transport-rename.sql new file mode 100644 index 00000000000000..5f59c269e972ce --- /dev/null +++ b/data/sql/updates/pending_db_world/transport-rename.sql @@ -0,0 +1,20 @@ +UPDATE `transports` SET `name` = 'Grom\'gol Base Camp, Stranglethorn Vale and Undercity, Tirisfal Glades (Zeppelin, Horde ("The Purple Princess"))' WHERE `entry` = 176495; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Stormwind Harbor (Boat, Alliance ("The Bravery"))' WHERE `entry` = 176310; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Rut\'theran Village, Teldrassil (Boat, Alliance ("The Moonspray"))' WHERE `entry` = 176244; +UPDATE `transports` SET `name` = 'Menethil Harbor, Wetlands and Theramore Isle, Dustwallow Marsh (Boat, Alliance ("The Lady Mehley"))' WHERE `entry` = 176231; +UPDATE `transports` SET `name` = 'Grom\'gol Base Camp, Stranglethorn Vale and Orgrimmar, Durotar (Zeppelin, Horde ("The Iron Eagle"))' WHERE `entry` = 175080; +UPDATE `transports` SET `name` = 'Undercity, Tirisfal Glades and Orgrimmar, Durotar (Zeppelin, Horde ("The Thundercaller"))' WHERE `entry` = 164871; +UPDATE `transports` SET `name` = 'Booty Bay, Stranglethorn Vale and Ratchet, The Barrens (Boat, Neutral ("The Maiden\'s Fancy"))' WHERE `entry` = 20808; +UPDATE `transports` SET `name` = 'The Forgotten Coast, Feralas and Feathermoon Stronghold, Feralas (Boat, Alliance ("Feathermoon Ferry"))' WHERE `entry` = 177233; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Valaar\'s Berth, Azuremyst Isle (Boat, Alliance ("Elune\'s Blessing"))' WHERE `entry` = 181646; +UPDATE `transports` SET `name` = 'Menethil Harbor, Wetlands and Valgarde, Howling Fjord (Boat, Alliance ("Northspear"))' WHERE `entry` = 181688; +UPDATE `transports` SET `name` = 'Undercity, Tirisfal Glades and Vengeance Landing, Howling Fjord (Zeppelin, Horde ("Cloudkisser"))' WHERE `entry` = 181689; +UPDATE `transports` SET `name` = 'Orgrimmar, Durotar and Warsong Hold, Borean Tundra (Zeppelin, Horde ("The Mighty Wind"))' WHERE `entry` = 186238; +UPDATE `transports` SET `name` = 'Westguard Keep, Howling Fjord and Shattered Straits, Howling Fjord (Zeppelin, Alliance)' WHERE `entry` = 186371; +UPDATE `transports` SET `name` = 'Garvan\'s Reef (Boat, Neutral ("Sister Mercy"))' WHERE `entry` = 187038; +UPDATE `transports` SET `name` = 'Unu\'pe, Borean Tundra and Moa\'ki Harbor, Dragonblight (Turtle, Neutral ("Walker of Waves"))' WHERE `entry` = 187568; +UPDATE `transports` SET `name` = 'Kamagua, Howling Fjord and Moa\'ki Harbor, Dragonblight (Turtle, Neutral ("Green Island"))' WHERE `entry` = 188511; +UPDATE `transports` SET `name` = 'Valiance Keep, Borean Tundra and Stormwind Harbor (Boat, Alliance ("The Kraken"))' WHERE `entry` = 190536; +UPDATE `transports` SET `name` = 'Icecrown (Gunship, Horde ("Orgrim\'s Hammer"))' WHERE `entry` = 192241; +UPDATE `transports` SET `name` = 'Icecrown (Gunship, Alliance ("The Skybreaker"))' WHERE `entry` = 192242; +UPDATE `transports` SET `name` = 'Orgrimmar, Durotar and Thunder Bluff, Mulgore (Zeppelin, Horde ("The Zephyr"))' WHERE `entry` = 190549; From 900ca087c9b612ce433cd52116772b6a896585b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 02:28:28 +0000 Subject: [PATCH 331/340] chore(DB): import pending files Referenced commit(s): 83892f93b4f25bf041f47b0ea0cc1c8681580ced --- .../transport-rename.sql => db_world/2023_10_22_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/transport-rename.sql => db_world/2023_10_22_07.sql} (98%) diff --git a/data/sql/updates/pending_db_world/transport-rename.sql b/data/sql/updates/db_world/2023_10_22_07.sql similarity index 98% rename from data/sql/updates/pending_db_world/transport-rename.sql rename to data/sql/updates/db_world/2023_10_22_07.sql index 5f59c269e972ce..4e32800fc48797 100644 --- a/data/sql/updates/pending_db_world/transport-rename.sql +++ b/data/sql/updates/db_world/2023_10_22_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_06 -> 2023_10_22_07 UPDATE `transports` SET `name` = 'Grom\'gol Base Camp, Stranglethorn Vale and Undercity, Tirisfal Glades (Zeppelin, Horde ("The Purple Princess"))' WHERE `entry` = 176495; UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Stormwind Harbor (Boat, Alliance ("The Bravery"))' WHERE `entry` = 176310; UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Rut\'theran Village, Teldrassil (Boat, Alliance ("The Moonspray"))' WHERE `entry` = 176244; From 2e55cad450815788c503fe2902dd248902e6d85b Mon Sep 17 00:00:00 2001 From: Alyst3r <59404251+Alyst3r@users.noreply.github.com> Date: Sun, 22 Oct 2023 04:45:50 +0200 Subject: [PATCH 332/340] refactor(DB/reputation_spillover_template): Reputation spillover table expansion (#14763) * Update ObjectMgr.cpp Rework to `ObjectMgr::LoadReputationSpilloverTemplate()` allowing more factons to be added. * Create reputation_spillover_template-update.sql Alteration to `reputation_spillover_template` table, update allowing to add two more factions. * Update SharedDefines.h `MAX_SPILLOVER_FACTIONS` is now equal 6 instead of 4. * Update reputation_spillover_template-update.sql Now it alters table instead recreating it. --- .../reputation_spillover_template-update.sql | 7 +++++++ src/server/game/Globals/ObjectMgr.cpp | 10 ++++++++-- src/server/shared/SharedDefines.h | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/reputation_spillover_template-update.sql diff --git a/data/sql/updates/pending_db_world/reputation_spillover_template-update.sql b/data/sql/updates/pending_db_world/reputation_spillover_template-update.sql new file mode 100644 index 00000000000000..5433bc121207c7 --- /dev/null +++ b/data/sql/updates/pending_db_world/reputation_spillover_template-update.sql @@ -0,0 +1,7 @@ +ALTER TABLE `reputation_spillover_template` + ADD COLUMN `faction5` SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `rate_5` FLOAT NOT NULL DEFAULT '0', + ADD COLUMN `rank_5` TINYINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `faction6` SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `rate_6` FLOAT NOT NULL DEFAULT '0', + ADD COLUMN `rank_6` TINYINT UNSIGNED NOT NULL DEFAULT '0'; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 80804e9b5aa712..ca07350a292b08 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7676,8 +7676,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate() _repSpilloverTemplateStore.clear(); // for reload case - uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12 - QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template"); + uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4, faction5, rate_5, rank_5, faction6, rate_6, rank_6 FROM reputation_spillover_template"); if (!result) { @@ -7706,6 +7706,12 @@ void ObjectMgr::LoadReputationSpilloverTemplate() repTemplate.faction[3] = fields[10].Get(); repTemplate.faction_rate[3] = fields[11].Get(); repTemplate.faction_rank[3] = fields[12].Get(); + repTemplate.faction[4] = fields[13].Get(); + repTemplate.faction_rate[4] = fields[14].Get(); + repTemplate.faction_rank[4] = fields[15].Get(); + repTemplate.faction[5] = fields[16].Get(); + repTemplate.faction_rate[5] = fields[17].Get(); + repTemplate.faction_rank[5] = fields[18].Get(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index be1179b065fe2c..314f2d6c468479 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -216,7 +216,7 @@ enum FactionTemplates #define MIN_REPUTATION_RANK (REP_HATED) #define MAX_REPUTATION_RANK 8 -#define MAX_SPILLOVER_FACTIONS 4 +#define MAX_SPILLOVER_FACTIONS 6 enum MoneyConstants { From 8895e0f66c3a483fcb3eb1c3db1fe2cfc567e21a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 02:46:54 +0000 Subject: [PATCH 333/340] chore(DB): import pending files Referenced commit(s): 2e55cad450815788c503fe2902dd248902e6d85b --- .../2023_10_22_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/reputation_spillover_template-update.sql => db_world/2023_10_22_08.sql} (90%) diff --git a/data/sql/updates/pending_db_world/reputation_spillover_template-update.sql b/data/sql/updates/db_world/2023_10_22_08.sql similarity index 90% rename from data/sql/updates/pending_db_world/reputation_spillover_template-update.sql rename to data/sql/updates/db_world/2023_10_22_08.sql index 5433bc121207c7..ed38edf9fea8ae 100644 --- a/data/sql/updates/pending_db_world/reputation_spillover_template-update.sql +++ b/data/sql/updates/db_world/2023_10_22_08.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_07 -> 2023_10_22_08 ALTER TABLE `reputation_spillover_template` ADD COLUMN `faction5` SMALLINT UNSIGNED NOT NULL DEFAULT '0', ADD COLUMN `rate_5` FLOAT NOT NULL DEFAULT '0', From 4962972eec37ea1e84ce57e1bcd23b134e5b4b6b Mon Sep 17 00:00:00 2001 From: pvp100 <134824156+pvp100com@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:47:13 +0800 Subject: [PATCH 334/340] fix(Core/BG): Relocate cannon in WG (#16673) * fix(DB/Gameobject): fix towercanno error location in Flamewatch Tower adjusted wintergrasp towercanno position * Update src/server/game/Battlefield/Zones/BattlefieldWG.h Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> --- src/server/game/Battlefield/Zones/BattlefieldWG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 89f8848ab48875..1c4cb586d2ce40 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -1041,7 +1041,7 @@ const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON] = 2, { { 4448.138184f, 1974.998779f, 441.995911f, 1.967238f }, - { 4448.713379f, 1955.148682f, 441.995178f, 0.380733f }, + { 4486.3257f, 1954.6545f, 442.0783f, 0.349065840244293212f }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, From 1262bbd237fb424e3ba53950513bcd65ab3ef378 Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Sun, 22 Oct 2023 08:12:18 -0300 Subject: [PATCH 335/340] fix(DB/Quest): Improve The Summoning Chamber (#16588) * fix(DB/quest): The Summoning Chamber * update * improvement * update * update * Update rev_1687180111436507500.sql * improvement --- .../rev_1687180111436507500.sql | 8 ++++++ .../Outland/zone_shadowmoon_valley.cpp | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1687180111436507500.sql diff --git a/data/sql/updates/pending_db_world/rev_1687180111436507500.sql b/data/sql/updates/pending_db_world/rev_1687180111436507500.sql new file mode 100644 index 00000000000000..b2db6d8246a70a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1687180111436507500.sql @@ -0,0 +1,8 @@ +-- You need to kill Skartax +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 37285) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 21207) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 37285, 0, 0, 29, 0, 21207, 30, 1, 0, 0, 0, '', 'Disrupt the summoning of infernal souls within the summoning chamber of the Deathforge.'); + +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_disrupt_summoning_ritual'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(37285, 'spell_disrupt_summoning_ritual'); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 164a5513ff85b7..6f77224f499d71 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1811,6 +1811,32 @@ class spell_calling_korkron_or_wildhammer : public SpellScript } }; +enum InfernalOversoul +{ + NPC_INFERNAL_OVERSOUL = 21735, + SPELL_DISRUPT_SUMMONING_RITUAL = 37285 +}; + +class spell_disrupt_summoning_ritual : public SpellScript +{ +public: + PrepareSpellScript(spell_disrupt_summoning_ritual); + + SpellCastResult CheckRequirement() + { + if (Unit* caster = GetCaster()) + if (Creature* infernal = caster->FindNearestCreature(NPC_INFERNAL_OVERSOUL, 100.0f)) + if (!infernal->HasAura(SPELL_DISRUPT_SUMMONING_RITUAL)) + return SPELL_FAILED_CASTER_AURASTATE; + return SPELL_CAST_OK; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_disrupt_summoning_ritual::CheckRequirement); + } +}; + void AddSC_shadowmoon_valley() { // Ours @@ -1834,4 +1860,5 @@ void AddSC_shadowmoon_valley() new npc_shadowmoon_tuber_node(); RegisterCreatureAI(npc_korkron_or_wildhammer); RegisterSpellScript(spell_calling_korkron_or_wildhammer); + RegisterSpellScript(spell_disrupt_summoning_ritual); } From 0cc85086a4bb972a6715e44049d31841d8b44255 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Oct 2023 11:13:23 +0000 Subject: [PATCH 336/340] chore(DB): import pending files Referenced commit(s): 1262bbd237fb424e3ba53950513bcd65ab3ef378 --- .../rev_1687180111436507500.sql => db_world/2023_10_22_09.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1687180111436507500.sql => db_world/2023_10_22_09.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1687180111436507500.sql b/data/sql/updates/db_world/2023_10_22_09.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1687180111436507500.sql rename to data/sql/updates/db_world/2023_10_22_09.sql index b2db6d8246a70a..cc06c442dc65d5 100644 --- a/data/sql/updates/pending_db_world/rev_1687180111436507500.sql +++ b/data/sql/updates/db_world/2023_10_22_09.sql @@ -1,3 +1,4 @@ +-- DB update 2023_10_22_08 -> 2023_10_22_09 -- You need to kill Skartax DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 37285) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 21207) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 1); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 9935e723417f28eff260d345264fc1ea66b5e695 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 22 Oct 2023 09:14:41 -0300 Subject: [PATCH 337/340] feat(Core/Unit): Implement OnPowerUpdate() unit script hook (#17560) --- src/server/game/AI/CoreAI/UnitAI.h | 5 ++++- src/server/game/Entities/Unit/Unit.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index e69c9811de7404..2b1b574d488721 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -353,11 +353,14 @@ class UnitAI // Called at any Damage from any attacker (before damage apply) // Note: it for recalculation damage or special reaction at damage // for attack reaction use AttackedBy called for not DOT damage in Unit::DealDamage also - virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/ ) {} + virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) {} // Called when the creature receives heal virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {} + // Called when the creature power updates + virtual void OnPowerUpdate(Powers /*power*/, int32 /*updateVal*/, int32 /*gain*/, uint32 /*currPower*/) {} + // Called when the unit heals virtual void HealDone(Unit* /*done_to*/, uint32& /*addhealth*/) {} diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ae48a25e30c56c..b308603bc47c9f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14115,6 +14115,11 @@ int32 Unit::ModifyPower(Powers power, int32 dVal, bool withPowerUpdate /*= true* gain = maxPower - curPower; } + if (GetAI()) + { + GetAI()->OnPowerUpdate(power, gain, dVal, curPower); + } + return gain; } From 69418ab93616cd04d2a91060c12e110d675b6941 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:12:30 -0300 Subject: [PATCH 338/340] =?UTF-8?q?fix(Scripts/Ulduar):=20Don't=20treat=20?= =?UTF-8?q?Algalon=20respawns=20as=20if=20they=20were=20the=E2=80=A6=20(#1?= =?UTF-8?q?7562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/Ulduar): Don't treat Algalon respawns as if they were the first pull * Update boss_algalon_the_observer.cpp --- .../Ulduar/Ulduar/boss_algalon_the_observer.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 86fc029040ea70..1f90c584ab439e 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -388,6 +388,11 @@ class boss_algalon_the_observer : public CreatureScript _phaseTwo = false; _heraldOfTheTitans = true; + if (m_pInstance->GetData(TYPE_ALGALON) == FAIL) + { + _firstPull = false; + } + if (m_pInstance) m_pInstance->SetData(TYPE_ALGALON, NOT_STARTED); } @@ -1151,6 +1156,14 @@ class go_celestial_planetarium_access : public GameObjectScript if (GameObject* sigil = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_DOODAD_UL_SIGILDOOR_02))) sigil->SetGoState(GO_STATE_ACTIVE); + + if (Map* map = player->GetMap()) + { + if (InstanceMap* instanceMap = map->ToInstanceMap()) + { + instanceMap->PermBindAllPlayers(); + } + } } return false; From a56a224bd72603f79a95fad7b8b9642c7b72015e Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 23 Oct 2023 05:28:29 -0300 Subject: [PATCH 339/340] fix(Scripts/Karazhan): Update Aran with the new OnPowerUpdate() hook (#17561) --- .../Karazhan/boss_shade_of_aran.cpp | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index b8ca05175a2f5e..55929ee7772581 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -211,6 +211,38 @@ struct boss_shade_of_aran : public BossAI } } + void OnPowerUpdate(Powers /*power*/, int32 /*gain*/, int32 /*updateVal*/, uint32 currentPower) override + { + // Should drink at 10%, need 10% mana for mass polymorph + if (!_hasDrunk && me->GetMaxPower(POWER_MANA) && (currentPower * 100 / me->GetMaxPower(POWER_MANA)) < 13) + { + _drinking = true; + _hasDrunk = true; + me->InterruptNonMeleeSpells(true); + Talk(SAY_DRINK); + DoCastAOE(SPELL_MASS_POLY); + me->SetReactState(REACT_PASSIVE); + + // Start drinking after conjuring drinks + _drinkScheduler.Schedule(2s, GROUP_DRINKING, [this](TaskContext) + { + DoCastSelf(SPELL_CONJURE); + }).Schedule(4s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_SIT); + DoCastSelf(SPELL_DRINK); + }).Schedule(10s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + DoCastSelf(SPELL_AOE_PYROBLAST); + _drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinking = false; + }); + } + } + void JustEngagedWith(Unit* /*who*/) override { _JustEngagedWith(); @@ -226,8 +258,6 @@ struct boss_shade_of_aran : public BossAI } }).Schedule(1s, [this](TaskContext context) { - context.Repeat(2s); - if (!_drinking) { if (me->IsNonMeleeSpellCast(false)) @@ -255,39 +285,6 @@ struct boss_shade_of_aran : public BossAI ++AvailableSpells; } - // Should drink at 10%, need 10% mana for mass polymorph - if (!_hasDrunk && me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 13) - { - _drinking = true; - _hasDrunk = true; - me->InterruptNonMeleeSpells(true); - Talk(SAY_DRINK); - DoCastAOE(SPELL_MASS_POLY); - me->SetReactState(REACT_PASSIVE); - - // Start drinking after conjuring drinks - _drinkScheduler.Schedule(2s, GROUP_DRINKING, [this](TaskContext) - { - DoCastSelf(SPELL_CONJURE); - }).Schedule(4s, GROUP_DRINKING, [this](TaskContext) - { - me->SetStandState(UNIT_STAND_STATE_SIT); - DoCastSelf(SPELL_DRINK); - }); - - _drinkScheduler.Schedule(10s, GROUP_DRINKING, [this](TaskContext) - { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_AOE_PYROBLAST); - _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinking = false; - }); - - return; - } - //If no available spells wait 1 second and try again if (AvailableSpells) { @@ -318,6 +315,7 @@ struct boss_shade_of_aran : public BossAI } } } + context.Repeat(2s); }).Schedule(5s, [this](TaskContext context) { if (!_drinking) From 60e27511c530b0949fee361a89d3eb9d9f9125af Mon Sep 17 00:00:00 2001 From: AG <43139552+AGandrup@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:37:11 +0200 Subject: [PATCH 340/340] fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480) * Bug fixes - Corrected std::chrono from seconds to milliseconds - Got rid of leftover code that caused objects to not show up on time * Removed logic to set gameobject as active - More alignement with TC. - Reduces CPU usage drastically * Revert back to using time_t instead of std chrono * Invoke SetNoCreate() method to reduce CPU usage drastically * Remove setActive from static and motion transports * Fix performance issues * Added SetFarVisible to WG and some dungeon scripts - Also removed setActive(true) from creatures in Wintergrasp. As for gameobjects they are set to active upon being damaged/destroyed and removed from active on rebuild (reset) * Removed comments related to VISIBILITY_COMPENSATION * Fix log * Deleted unused files + corrected a check * Added missing header * Removed unused parameter * Removed another unsued parameter * Changed vector to set for i_visibleNow - Changed vector to set for i_visibleNow in VisibleNotifer - Adjusted HaveAtClient to accept Object* - Adjusted SendUpdateToPlayer to send createobject packet only if not known to client --- src/server/game/Battlefield/Battlefield.cpp | 4 +- .../game/Battlefield/Zones/BattlefieldWG.h | 9 + .../game/Entities/Creature/Creature.cpp | 28 ++- src/server/game/Entities/Creature/Creature.h | 1 + .../Entities/DynamicObject/DynamicObject.cpp | 19 +- .../game/Entities/GameObject/GameObject.cpp | 58 +++--- .../game/Entities/GameObject/GameObject.h | 2 - src/server/game/Entities/Object/Object.cpp | 107 ++++------- src/server/game/Entities/Object/Object.h | 9 +- .../game/Entities/Object/ObjectDefines.h | 4 - src/server/game/Entities/Object/ObjectGuid.h | 1 + src/server/game/Entities/Player/Player.cpp | 22 +-- src/server/game/Entities/Player/Player.h | 13 +- .../game/Entities/Player/PlayerUpdates.cpp | 37 ++-- .../game/Entities/Transport/Transport.cpp | 65 ++++--- .../game/Entities/Transport/Transport.h | 3 - src/server/game/Entities/Unit/Unit.cpp | 60 +++---- src/server/game/Entities/Unit/Unit.h | 2 +- src/server/game/Entities/Vehicle/Vehicle.cpp | 3 +- src/server/game/Grids/NGrid.cpp | 2 +- src/server/game/Grids/NGrid.h | 8 +- .../game/Grids/Notifiers/GridNotifiers.cpp | 2 +- .../game/Grids/Notifiers/GridNotifiers.h | 12 +- .../game/Grids/Notifiers/GridNotifiersImpl.h | 4 - src/server/game/Grids/ObjectGridLoader.cpp | 25 ++- src/server/game/Handlers/MovementHandler.cpp | 167 +++++++++--------- src/server/game/Maps/Map.cpp | 138 +++++++-------- src/server/game/Maps/Map.h | 34 ++-- src/server/game/Maps/MapInstanced.cpp | 12 +- src/server/game/Maps/MapInstanced.h | 2 +- src/server/game/Maps/MapMgr.cpp | 4 +- src/server/game/Maps/TransportMgr.cpp | 2 - src/server/game/Misc/DynamicVisibility.cpp | 28 --- src/server/game/Misc/DynamicVisibility.h | 58 ------ .../game/Movement/Spline/MoveSpline.cpp | 46 ++++- .../game/Movement/Spline/MoveSplineInit.cpp | 1 + .../Movement/Spline/MovementPacketBuilder.cpp | 27 +-- .../Movement/Spline/MovementPacketBuilder.h | 1 + src/server/game/Movement/Spline/Spline.cpp | 20 ++- src/server/game/Movement/Spline/Spline.h | 21 +-- .../game/Spells/Auras/SpellAuraEffects.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 6 +- src/server/game/World/World.cpp | 3 - .../BlackwingLair/boss_nefarian.cpp | 1 + .../BlackwingLair/instance_blackwing_lair.cpp | 1 + .../Karazhan/boss_nightbane.cpp | 1 + .../zone_the_scarlet_enclave.cpp | 1 + .../BattleForMountHyjal/hyjalAI.cpp | 8 + .../boss_baltharus_the_warborn.cpp | 1 + .../IcecrownCitadel/boss_sindragosa.cpp | 7 + .../Ulduar/boss_algalon_the_observer.cpp | 1 + .../Ulduar/Ulduar/boss_razorscale.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_thorim.cpp | 1 + 53 files changed, 509 insertions(+), 586 deletions(-) delete mode 100644 src/server/game/Misc/DynamicVisibility.cpp delete mode 100644 src/server/game/Misc/DynamicVisibility.h diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index fe609ea1f575d9..6750106554e83a 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -815,7 +815,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl // Set creature in world map->AddToMap(creature); - creature->setActive(true); + creature->SetFarVisible(true); return creature; } @@ -840,7 +840,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z // Add to world map->AddToMap(go); - go->setActive(true); + go->SetFarVisible(true); return go; } diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 1c4cb586d2ce40..c0652d87824477 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -1159,6 +1159,7 @@ struct BfWGGameObjectBuilding // Rebuild gameobject go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true); go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]); + go->setActive(false); // Everything is reset, no need keep active at this point. } // Update worldstate @@ -1170,6 +1171,10 @@ struct BfWGGameObjectBuilding // Called when associated gameobject is damaged void Damaged() { + GameObject* go = m_WG->GetGameObject(m_Build); + if (go) + go->setActive(true); + // Update worldstate m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE - (m_Team * 3); m_WG->SendUpdateWorldState(m_WorldState, m_State); @@ -1193,6 +1198,10 @@ struct BfWGGameObjectBuilding // Called when associated gameobject is destroyed void Destroyed() { + GameObject* go = m_WG->GetGameObject(m_Build); + if (go) + go->setActive(true); + // Update worldstate m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY - (m_Team * 3); m_WG->SendUpdateWorldState(m_WorldState, m_State); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index fb0ec895460b98..1d2ef9dfb6526b 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -301,9 +301,6 @@ void Creature::RemoveFromWorld() if (m_formation) sFormationMgr->RemoveCreatureFromGroup(m_formation, this); - if (Transport* transport = GetTransport()) - transport->RemovePassenger(this, true); - Unit::RemoveFromWorld(); if (m_spawnId) @@ -1826,7 +1823,25 @@ void Creature::DeleteFromDB() return; } - GetMap()->RemoveCreatureRespawnTime(m_spawnId); + CreatureData const* data = sObjectMgr->GetCreatureData(m_spawnId); + if (!data) + return; + + CharacterDatabaseTransaction charTrans = CharacterDatabase.BeginTransaction(); + + sMapMgr->DoForAllMapsWithMapId(data->mapid, + [this, charTrans](Map* map) -> void + { + // despawn all active creatures, and remove their respawns + std::vector toUnload; + for (auto const& pair : Acore::Containers::MapEqualRange(map->GetCreatureBySpawnIdStore(), m_spawnId)) + toUnload.push_back(pair.second); + for (Creature* creature : toUnload) + map->AddObjectToRemoveList(creature); + map->RemoveCreatureRespawnTime(m_spawnId); + } + ); + sObjectMgr->DeleteCreatureData(m_spawnId); WorldDatabaseTransaction trans = WorldDatabase.BeginTransaction(); @@ -3060,10 +3075,7 @@ std::string const& Creature::GetNameForLocaleIdx(LocaleConstant loc_idx) const void Creature::SetPosition(float x, float y, float z, float o) { - if (!Acore::IsValidMapCoord(x, y, z, o)) - return; - - GetMap()->CreatureRelocation(this, x, y, z, o); + UpdatePosition(x, y, z, o, false); } bool Creature::IsDungeonBoss() const diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index ede229ff781dcc..126b7b099f1077 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -68,6 +68,7 @@ class Creature : public Unit, public GridObject, public MovableMapObje void Update(uint32 time) override; // overwrited Unit::Update void GetRespawnPosition(float& x, float& y, float& z, float* ori = nullptr, float* dist = nullptr) const; + bool IsSpawnedOnTransport() const { return m_creatureData && m_creatureData->mapid != GetMapId(); } void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; } void SetCorpseRemoveTime(uint32 delay); diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 779e44312458ca..8346d74e8bbcb3 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -47,14 +47,6 @@ DynamicObject::~DynamicObject() void DynamicObject::CleanupsBeforeDelete(bool finalCleanup /* = true */) { - if (Transport* transport = GetTransport()) - { - transport->RemovePassenger(this); - SetTransport(nullptr); - m_movementInfo.transport.Reset(); - m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - } - WorldObject::CleanupsBeforeDelete(finalCleanup); } @@ -88,9 +80,6 @@ void DynamicObject::RemoveFromWorld() UnbindFromCaster(); - if (Transport* transport = GetTransport()) - transport->RemovePassenger(this, true); - WorldObject::RemoveFromWorld(); GetMap()->GetObjectsStore().Remove(GetGUID()); @@ -125,17 +114,15 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste SetFloatValue(DYNAMICOBJECT_RADIUS, radius); SetUInt32Value(DYNAMICOBJECT_CASTTIME, GameTime::GetGameTimeMS().count()); + if (IsWorldObject()) + setActive(true); //must before add to map to be put in world container + if (!GetMap()->AddToMap(this, true)) { // Returning false will cause the object to be deleted - remove from transport return false; } - if (IsWorldObject()) - { - setActive(true); - } - return true; } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index aa164d4f75f94a..68b215377042d8 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -27,6 +27,7 @@ #include "GridNotifiersImpl.h" #include "Group.h" #include "GroupMgr.h" +#include "MapMgr.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" #include "PoolMgr.h" @@ -102,18 +103,9 @@ std::string const& GameObject::GetAIName() const return sObjectMgr->GetGameObjectTemplate(GetEntry())->AIName; } -void GameObject::CleanupsBeforeDelete(bool /*finalCleanup*/) +void GameObject::CleanupsBeforeDelete(bool finalCleanup) { - if (GetTransport() && !ToTransport()) - { - GetTransport()->RemovePassenger(this); - SetTransport(nullptr); - m_movementInfo.transport.Reset(); - m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - } - - if (IsInWorld()) - RemoveFromWorld(); + WorldObject::CleanupsBeforeDelete(finalCleanup); if (m_uint32Values) // field array can be not exist if GameOBject not loaded RemoveFromOwner(); @@ -182,9 +174,6 @@ void GameObject::RemoveFromWorld() if (GetMap()->ContainsGameObjectModel(*m_model)) GetMap()->RemoveGameObjectModel(*m_model); - if (Transport* transport = GetTransport()) - transport->RemovePassenger(this, true); - // If linked trap exists, despawn it if (GameObject* linkedTrap = GetLinkedTrap()) { @@ -888,7 +877,11 @@ void GameObject::Update(uint32 diff) if (!m_spawnedByDefault) { m_respawnTime = 0; - DestroyForNearbyPlayers(); // xinef: old UpdateObjectVisibility(); + if (m_spawnId) + DestroyForNearbyPlayers(); // xinef: old UpdateObjectVisibility(); + else + Delete(); + return; } @@ -1184,7 +1177,31 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo void GameObject::DeleteFromDB() { - GetMap()->RemoveGORespawnTime(m_spawnId); + if (!m_spawnId) + { + LOG_ERROR("entities.gameobject", "Trying to delete not saved gameobject: {}", GetGUID().ToString()); + return; + } + + GameObjectData const* data = sObjectMgr->GetGameObjectData(m_spawnId); + if (!data) + return; + + CharacterDatabaseTransaction charTrans = CharacterDatabase.BeginTransaction(); + + sMapMgr->DoForAllMapsWithMapId(data->mapid, + [this, charTrans](Map* map) -> void + { + // despawn all active objects, and remove their respawns + std::vector toUnload; + for (auto const& pair : Acore::Containers::MapEqualRange(map->GetGameObjectBySpawnIdStore(), m_spawnId)) + toUnload.push_back(pair.second); + for (GameObject* obj : toUnload) + map->AddObjectToRemoveList(obj); + map->RemoveGORespawnTime(m_spawnId); + } + ); + sObjectMgr->DeleteGOData(m_spawnId); WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_GAMEOBJECT); @@ -2173,15 +2190,6 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const && dz < (info->maxZ * scale) + radius && dz > (info->minZ * scale) - radius; } -void GameObject::SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, bool includeMargin, Player const* skipped_rcvr) const -{ - dist += GetObjectSize(); - if (includeMargin) - dist += VISIBILITY_COMPENSATION * 2.0f; // pussywizard: to ensure everyone receives all important packets - Acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr); - Cell::VisitWorldObjects(this, notifier, dist); -} - void GameObject::EventInform(uint32 eventId) { if (!eventId) diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 61962e75dd545c..945c648e03f317 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -289,8 +289,6 @@ class GameObject : public WorldObject, public GridObject, public Mov void SendCustomAnim(uint32 anim); [[nodiscard]] bool IsInRange(float x, float y, float z, float radius) const; - void SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, bool includeMargin = false, Player const* skipped_rcvr = nullptr) const override; // pussywizard! - void ModifyHealth(int32 change, Unit* attackerOrHealer = nullptr, uint32 spellId = 0); void SetDestructibleBuildingModifyState(bool allow) { m_allowModifyDestructibleBuilding = allow; } // sets GameObject type 33 destruction flags and optionally default health for that state diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index c0584ef005a6e8..97f90bdddd80f3 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -21,7 +21,6 @@ #include "CellImpl.h" #include "Chat.h" #include "Creature.h" -#include "DynamicVisibility.h" #include "GameObjectAI.h" #include "GameTime.h" #include "GridNotifiers.h" @@ -249,7 +248,10 @@ void Object::SendUpdateToPlayer(Player* player) UpdateData upd; WorldPacket packet; - BuildCreateUpdateBlockForPlayer(&upd, player); + if (player->HaveAtClient(this)) + BuildValuesUpdateBlockForPlayer(&upd, player); + else + BuildCreateUpdateBlockForPlayer(&upd, player); upd.BuildPacket(&packet); player->GetSession()->SendPacket(&packet); } @@ -1048,7 +1050,7 @@ void MovementInfo::OutDebug() } WorldObject::WorldObject(bool isWorldObject) : WorldLocation(), - LastUsedScriptID(0), m_name(""), m_isActive(false), m_visibilityDistanceOverride(), m_isWorldObject(isWorldObject), m_zoneScript(nullptr), + LastUsedScriptID(0), m_name(""), m_isActive(false), m_isFarVisible(false), m_visibilityDistanceOverride(), m_isWorldObject(isWorldObject), m_zoneScript(nullptr), _zoneId(0), _areaId(0), _floorZ(INVALID_HEIGHT), _outdoors(false), _liquidData(), _updatePositionData(false), m_transport(nullptr), m_currMap(nullptr), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL), m_useCombinedPhases(true), m_notifyflags(0), m_executed_notifies(0) { @@ -1105,8 +1107,6 @@ void WorldObject::setActive(bool on) map->AddToActive(this->ToCreature()); else if (GetTypeId() == TYPEID_DYNAMICOBJECT) map->AddToActive((DynamicObject*)this); - else if (GetTypeId() == TYPEID_GAMEOBJECT) - map->AddToActive((GameObject*)this); } else { @@ -1114,11 +1114,17 @@ void WorldObject::setActive(bool on) map->RemoveFromActive(this->ToCreature()); else if (GetTypeId() == TYPEID_DYNAMICOBJECT) map->RemoveFromActive((DynamicObject*)this); - else if (GetTypeId() == TYPEID_GAMEOBJECT) - map->RemoveFromActive((GameObject*)this); } } +void WorldObject::SetFarVisible(bool on) +{ + if (GetTypeId() == TYPEID_PLAYER) + return; + + m_isFarVisible = on; +} + void WorldObject::SetVisibilityDistanceOverride(VisibilityDistanceType type) { ASSERT(type < VisibilityDistanceType::Max); @@ -1134,6 +1140,9 @@ void WorldObject::CleanupsBeforeDelete(bool /*finalCleanup*/) { if (IsInWorld()) RemoveFromWorld(); + + if (Transport* transport = GetTransport()) + transport->RemovePassenger(this, true); } void WorldObject::_Create(ObjectGuid::LowType guidlow, HighGuid guidhigh, uint32 phaseMask) @@ -1626,9 +1635,9 @@ float WorldObject::GetGridActivationRange() const { if (ToPlayer()->GetCinematicMgr()->IsOnCinematic()) { - return DEFAULT_VISIBILITY_INSTANCE; + return std::max(DEFAULT_VISIBILITY_INSTANCE, GetMap()->GetVisibilityRange()); } - return IsInWintergrasp() ? VISIBILITY_DIST_WINTERGRASP : GetMap()->GetVisibilityRange(); + return IsInWintergrasp() ? VISIBILITY_DISTANCE_LARGE : GetMap()->GetVisibilityRange(); } else if (ToCreature()) { @@ -1644,29 +1653,12 @@ float WorldObject::GetGridActivationRange() const float WorldObject::GetVisibilityRange() const { - if (IsVisibilityOverridden() && GetTypeId() == TYPEID_UNIT) - { + if (IsVisibilityOverridden() && !ToPlayer()) return *m_visibilityDistanceOverride; - } - else if (GetTypeId() == TYPEID_GAMEOBJECT) - { - { - if (IsInWintergrasp()) - { - return VISIBILITY_DIST_WINTERGRASP + VISIBILITY_INC_FOR_GOBJECTS; - } - else if (IsVisibilityOverridden()) - { - return *m_visibilityDistanceOverride; - } - else - { - return GetMap()->GetVisibilityRange() + VISIBILITY_INC_FOR_GOBJECTS; - } - } - } + else if (IsFarVisible() && !ToPlayer()) + return MAX_VISIBILITY_DISTANCE; else - return IsInWintergrasp() ? VISIBILITY_DIST_WINTERGRASP : GetMap()->GetVisibilityRange(); + return IsInWintergrasp() ? VISIBILITY_DISTANCE_LARGE : GetMap()->GetVisibilityRange(); } float WorldObject::GetSightRange(WorldObject const* target) const @@ -1675,44 +1667,19 @@ float WorldObject::GetSightRange(WorldObject const* target) const { if (ToPlayer()) { - if (target) - { - if (target->IsVisibilityOverridden() && target->GetTypeId() == TYPEID_UNIT) - { - return *target->m_visibilityDistanceOverride; - } - else if (target->GetTypeId() == TYPEID_GAMEOBJECT) - { - if (IsInWintergrasp() && target->IsInWintergrasp()) - { - return VISIBILITY_DIST_WINTERGRASP + VISIBILITY_INC_FOR_GOBJECTS; - } - else if (target->IsVisibilityOverridden()) - { - return *target->m_visibilityDistanceOverride; - } - else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic()) - { - return DEFAULT_VISIBILITY_INSTANCE; - } - else - { - return GetMap()->GetVisibilityRange() + VISIBILITY_INC_FOR_GOBJECTS; - } - } - - return IsInWintergrasp() && target->IsInWintergrasp() ? VISIBILITY_DIST_WINTERGRASP : GetMap()->GetVisibilityRange(); - } - return IsInWintergrasp() ? VISIBILITY_DIST_WINTERGRASP : GetMap()->GetVisibilityRange(); + if (target && target->IsVisibilityOverridden() && !target->ToPlayer()) + return *target->m_visibilityDistanceOverride; + else if (target && target->IsFarVisible() && !target->ToPlayer()) + return MAX_VISIBILITY_DISTANCE; + else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic()) + return DEFAULT_VISIBILITY_INSTANCE; + else + return IsInWintergrasp() ? VISIBILITY_DISTANCE_LARGE : GetMap()->GetVisibilityRange(); } else if (ToCreature()) - { return ToCreature()->m_SightDistance; - } else - { return SIGHT_RANGE_UNIT; - } } if (ToDynObject() && isActiveObject()) @@ -2077,11 +2044,8 @@ void Unit::BuildHeartBeatMsg(WorldPacket* data) const BuildMovementPacket(data); } -void WorldObject::SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, bool includeMargin, Player const* skipped_rcvr) const +void WorldObject::SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, Player const* skipped_rcvr) const { - dist += GetObjectSize(); - if (includeMargin) - dist += VISIBILITY_COMPENSATION; // pussywizard: to ensure everyone receives all important packets Acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr); Cell::VisitWorldObjects(this, notifier, dist); } @@ -2228,7 +2192,8 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert return nullptr; } - EnsureGridLoaded(Cell(pos.GetPositionX(), pos.GetPositionY())); + if (!IsGridLoaded(pos.GetPositionX(), pos.GetPositionY())) + EnsureGridLoaded(Cell(pos.GetPositionX(), pos.GetPositionY())); if (!summon->Create(GenerateLowGuid(), this, phase, entry, vehId, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation())) { delete summon; @@ -2901,8 +2866,8 @@ void WorldObject::DestroyForNearbyPlayers() return; std::list targets; - Acore::AnyPlayerInObjectRangeCheck check(this, GetVisibilityRange() + VISIBILITY_COMPENSATION, false); - Acore::PlayerListSearcherWithSharedVision searcher(this, targets, check); + Acore::AnyPlayerInObjectRangeCheck check(this, GetVisibilityRange(), false); + Acore::PlayerListSearcher searcher(this, targets, check); Cell::VisitWorldObjects(this, searcher, GetVisibilityRange()); for (std::list::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) { @@ -2984,7 +2949,7 @@ struct WorldObjectChangeAccumulator source = iter->GetSource(); ObjectGuid guid = source->GetCasterGUID(); - if (guid) + if (guid.IsPlayer()) { //Caster may be nullptr if DynObj is in removelist if (Player* caster = ObjectAccessor::FindPlayer(guid)) diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index adaf92899d8887..5ee201e8e13ebe 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -488,9 +488,9 @@ class WorldObject : public Object, public WorldLocation virtual void CleanupsBeforeDelete(bool finalCleanup = true); // used in destructor or explicitly before mass creature delete to remove cross-references to already deleted units - virtual void SendMessageToSet(WorldPacket const* data, bool self) const { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), self, true); } // pussywizard! - virtual void SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, bool includeMargin = false, Player const* skipped_rcvr = nullptr) const; // pussywizard! - virtual void SendMessageToSet(WorldPacket const* data, Player const* skipped_rcvr) const { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), false, true, skipped_rcvr); } // pussywizard! + virtual void SendMessageToSet(WorldPacket const* data, bool self) const { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), self); } // pussywizard! + virtual void SendMessageToSetInRange(WorldPacket const* data, float dist, bool /*self*/, Player const* skipped_rcvr = nullptr) const; // pussywizard! + virtual void SendMessageToSet(WorldPacket const* data, Player const* skipped_rcvr) const { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), false, skipped_rcvr); } // pussywizard! virtual uint8 getLevelForTarget(WorldObject const* /*target*/) const { return 1; } @@ -569,6 +569,7 @@ class WorldObject : public Object, public WorldLocation [[nodiscard]] bool isActiveObject() const { return m_isActive; } void setActive(bool isActiveObject); [[nodiscard]] bool IsFarVisible() const { return m_isFarVisible; } + void SetFarVisible(bool on); [[nodiscard]] bool IsVisibilityOverridden() const { return m_visibilityDistanceOverride.has_value(); } void SetVisibilityDistanceOverride(VisibilityDistanceType type); void SetWorldObject(bool apply); @@ -577,7 +578,7 @@ class WorldObject : public Object, public WorldLocation [[nodiscard]] bool IsInWintergrasp() const { - return GetMapId() == 571 && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f; + return GetMapId() == 571 && GetZoneId() == 4197; } #ifdef MAP_BASED_RAND_GEN diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 5d809c05f58b58..0dfb5a7053e928 100644 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -23,10 +23,7 @@ #define CONTACT_DISTANCE 0.5f #define INTERACTION_DISTANCE 5.5f #define ATTACK_DISTANCE 5.0f -#define VISIBILITY_COMPENSATION 15.0f // increase searchers #define INSPECT_DISTANCE 28.0f -#define VISIBILITY_INC_FOR_GOBJECTS 30.0f // pussywizard -#define SPELL_SEARCHER_COMPENSATION 30.0f // increase searchers size in case we have large npc near cell border #define TRADE_DISTANCE 11.11f #define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects, experimental #define SIGHT_RANGE_UNIT 50.0f @@ -38,7 +35,6 @@ #define VISIBILITY_DISTANCE_TINY 25.0f #define DEFAULT_VISIBILITY_DISTANCE VISIBILITY_DISTANCE_NORMAL // default visible distance, 100 yards on continents #define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards -#define VISIBILITY_DIST_WINTERGRASP 175.0f #define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards #define DEFAULT_WORLD_OBJECT_SIZE 0.388999998569489f // player size, also currently used (correctly?) for any non Unit world objects diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h index bb8029048ae086..3f626c780594f4 100644 --- a/src/server/game/Entities/Object/ObjectGuid.h +++ b/src/server/game/Entities/Object/ObjectGuid.h @@ -134,6 +134,7 @@ class ObjectGuid ObjectGuid(HighGuid hi, uint32 entry, LowType counter) : _guid(counter ? uint64(counter) | (uint64(entry) << 24) | (uint64(hi) << 48) : 0) { } ObjectGuid(HighGuid hi, LowType counter) : _guid(counter ? uint64(counter) | (uint64(hi) << 48) : 0) { } + operator uint64() const { return _guid; } PackedGuidReader ReadAsPacked() { return PackedGuidReader(*this); } void Set(uint64 guid) { _guid = guid; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 14adb01c826c79..bc64ae0a385674 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1353,10 +1353,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati if (GetTransport()) { - m_transport->RemovePassenger(this); - m_transport = nullptr; - m_movementInfo.transport.Reset(); - m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + m_transport->RemovePassenger(this, true); RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :) } @@ -1398,10 +1395,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); else { - m_transport->RemovePassenger(this); - m_transport = nullptr; - m_movementInfo.transport.Reset(); - m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + m_transport->RemovePassenger(this, true); } } @@ -5581,14 +5575,11 @@ void Player::SaveRecallPosition() m_recallO = GetOrientation(); } -void Player::SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, bool includeMargin, Player const* skipped_rcvr) const +void Player::SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, Player const* skipped_rcvr) const { if (self) GetSession()->SendPacket(data); - dist += GetObjectSize(); - if (includeMargin) - dist += VISIBILITY_COMPENSATION; // pussywizard: to ensure everyone receives all important packets Acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr); Cell::VisitWorldObjects(this, notifier, dist); } @@ -11322,7 +11313,7 @@ WorldLocation Player::GetStartPosition() const return WorldLocation(mapId, info->positionX, info->positionY, info->positionZ, 0); } -bool Player::HaveAtClient(WorldObject const* u) const +bool Player::HaveAtClient(Object const* u) const { if (u == this) { @@ -13096,14 +13087,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply) UpdateVisibilityOf(target); if (target->isType(TYPEMASK_UNIT) && !GetVehicle()) - ((Unit*)target)->AddPlayerToVision(this); + static_cast(target)->AddPlayerToVision(this); SetSeer(target); } else { - //must immediately set seer back otherwise may crash - m_seer = this; - LOG_DEBUG("maps", "Player::CreateViewpoint: Player {} remove seer", GetName()); if (!RemoveGuidValue(PLAYER_FARSIGHT, target->GetGUID())) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index bb4b0585c52009..c36fec2950961f 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1986,10 +1986,10 @@ class Player : public Unit, public GridObject void ProcessTerrainStatusUpdate() override; - void SendMessageToSet(WorldPacket const* data, bool self) const override { SendMessageToSetInRange(data, GetVisibilityRange(), self, true); } // pussywizard! - void SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, bool includeMargin = false, Player const* skipped_rcvr = nullptr) const override; // pussywizard! - void SendMessageToSetInRange_OwnTeam(WorldPacket const* data, float dist, bool self) const; // pussywizard! param includeMargin not needed here - void SendMessageToSet(WorldPacket const* data, Player const* skipped_rcvr) const override { SendMessageToSetInRange(data, GetVisibilityRange(), skipped_rcvr != this, true, skipped_rcvr); } // pussywizard! + void SendMessageToSet(WorldPacket const* data, bool self) const override { SendMessageToSetInRange(data, GetVisibilityRange(), self); } // pussywizard! + void SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, Player const* skipped_rcvr = nullptr) const override; // pussywizard! + void SendMessageToSetInRange_OwnTeam(WorldPacket const* data, float dist, bool self) const; // pussywizard! + void SendMessageToSet(WorldPacket const* data, Player const* skipped_rcvr) const override { SendMessageToSetInRange(data, GetVisibilityRange(), skipped_rcvr != this, skipped_rcvr); } // pussywizard! void SendTeleportAckPacket(); @@ -2342,9 +2342,8 @@ class Player : public Unit, public GridObject // currently visible objects at player client GuidUnorderedSet m_clientGUIDs; - std::vector m_newVisible; // pussywizard - [[nodiscard]] bool HaveAtClient(WorldObject const* u) const; + [[nodiscard]] bool HaveAtClient(Object const* u) const; [[nodiscard]] bool HaveAtClient(ObjectGuid guid) const; [[nodiscard]] bool IsNeverVisible() const override; @@ -2358,7 +2357,7 @@ class Player : public Unit, public GridObject void UpdateTriggerVisibility(); template - void UpdateVisibilityOf(T* target, UpdateData& data, std::vector& visibleNow); + void UpdateVisibilityOf(T* target, UpdateData& data, std::set& visibleNow); uint8 m_forced_speed_changes[MAX_MOVE_TYPE]; diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 17c1319f9a4090..f36708d46e6b2c 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -1521,17 +1521,11 @@ void Player::UpdatePotionCooldown(Spell* spell) SetLastPotionId(0); } -template void Player::UpdateVisibilityOf(Player* target, UpdateData& data, - std::vector& visibleNow); -template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data, - std::vector& visibleNow); -template void Player::UpdateVisibilityOf(Corpse* target, UpdateData& data, - std::vector& visibleNow); -template void Player::UpdateVisibilityOf(GameObject* target, UpdateData& data, - std::vector& visibleNow); -template void Player::UpdateVisibilityOf(DynamicObject* target, - UpdateData& data, - std::vector& visibleNow); +template void Player::UpdateVisibilityOf(Player* target, UpdateData& data, std::set& visibleNow); +template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data, std::set& visibleNow); +template void Player::UpdateVisibilityOf(Corpse* target, UpdateData& data, std::set& visibleNow); +template void Player::UpdateVisibilityOf(GameObject* target, UpdateData& data, std::set& visibleNow); +template void Player::UpdateVisibilityOf(DynamicObject* target, UpdateData& data, std::set& visibleNow); void Player::UpdateVisibilityForPlayer(bool mapChange) { @@ -1543,7 +1537,7 @@ void Player::UpdateVisibilityForPlayer(bool mapChange) } // updates visibility of all objects around point of view for current player - Acore::VisibleNotifier notifier(*this, mapChange); + Acore::VisibleNotifier notifier(*this); Cell::VisitAllObjects(m_seer, notifier, GetSightRange()); notifier.SendToSelf(); // send gathered data } @@ -1564,15 +1558,13 @@ void Player::UpdateObjectVisibility(bool forced) } template -inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, T* target, - std::vector& /*v*/) +inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, T* target, std::set& /*v*/) { s64.insert(target->GetGUID()); } template <> -inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target, - std::vector& /*v*/) +inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target, std::set& /*v*/) { // @HACK: This is to prevent objects like deeprun tram from disappearing // when player moves far from its spawn point while riding it @@ -1581,19 +1573,17 @@ inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target, } template <> -inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Creature* target, - std::vector& v) +inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Creature* target, std::set& v) { s64.insert(target->GetGUID()); - v.push_back(target); + v.insert(target); } template <> -inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Player* target, - std::vector& v) +inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Player* target, std::set& v) { s64.insert(target->GetGUID()); - v.push_back(target); + v.insert(target); } template @@ -1609,8 +1599,7 @@ inline void BeforeVisibilityDestroy(Creature* t, Player* p) } template -void Player::UpdateVisibilityOf(T* target, UpdateData& data, - std::vector& visibleNow) +void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set& visibleNow) { if (HaveAtClient(target)) { diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 3dc023eb49685e..3fb3e3b821508a 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -32,7 +32,7 @@ #include "World.h" #include "WorldModel.h" -MotionTransport::MotionTransport() : Transport(), _transportInfo(nullptr), _isMoving(true), _pendingStop(false), _triggeredArrivalEvent(false), _triggeredDepartureEvent(false), _passengersLoaded(false), _delayedTeleport(false) +MotionTransport::MotionTransport() : Transport(), _transportInfo(nullptr), _isMoving(true), _pendingStop(false), _triggeredArrivalEvent(false), _triggeredDepartureEvent(false), _delayedTeleport(false) { m_updateFlag = UPDATEFLAG_TRANSPORT | UPDATEFLAG_LOWGUID | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION; } @@ -230,8 +230,14 @@ void MotionTransport::Update(uint32 diff) 3. transport moves from active to inactive grid 4. the grid that transport is currently in unloads */ - if (_staticPassengers.empty() && GetMap()->IsGridLoaded(GetPositionX(), GetPositionY())) // 2. + bool gridActive = GetMap()->IsGridLoaded(GetPositionX(), GetPositionY()); + + if (_staticPassengers.empty() && gridActive) // 2. LoadStaticPassengers(); + else if (!_staticPassengers.empty() && !gridActive) + // 4. - if transports stopped on grid edge, some passengers can remain in active grids + // unload all static passengers otherwise passengers won't load correctly when the grid that transport is currently in becomes active + UnloadStaticPassengers(); } } @@ -248,18 +254,27 @@ void MotionTransport::DelayedUpdate(uint32 /*diff*/) void MotionTransport::UpdatePosition(float x, float y, float z, float o) { - if (!GetMap()->IsGridLoaded(x, y)) // pussywizard: should not happen, but just in case - GetMap()->LoadGrid(x, y); + bool newActive = GetMap()->IsGridLoaded(x, y); + Cell oldCell(GetPositionX(), GetPositionY()); Relocate(x, y, z, o); UpdateModelPosition(); UpdatePassengerPositions(_passengers); - if (_staticPassengers.empty()) + /* There are four possible scenarios that trigger loading/unloading passengers: + 1. transport moves from inactive to active grid + 2. the grid that transport is currently in becomes active + 3. transport moves from active to inactive grid + 4. the grid that transport is currently in unloads + */ + if (_staticPassengers.empty() && newActive) // 1. LoadStaticPassengers(); + else if (!_staticPassengers.empty() && !newActive && oldCell.DiffGrid(Cell(GetPositionX(), GetPositionY()))) // 3. + UnloadStaticPassengers(); else UpdatePassengerPositions(_staticPassengers); + // 4. is handed by grid unload } void MotionTransport::AddPassenger(WorldObject* passenger, bool withAll) @@ -306,8 +321,7 @@ void MotionTransport::RemovePassenger(WorldObject* passenger, bool withAll) { passenger->SetTransport(nullptr); passenger->m_movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT; - passenger->m_movementInfo.transport.guid.Clear(); - passenger->m_movementInfo.transport.pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f); + passenger->m_movementInfo.transport.Reset(); if (passenger->ToUnit()) { passenger->ToUnit()->ClearUnitState(UNIT_STATE_IGNORE_PATHFINDING); @@ -407,9 +421,6 @@ GameObject* MotionTransport::CreateGOPassenger(ObjectGuid::LowType guid, GameObj void MotionTransport::LoadStaticPassengers() { - if (PassengersLoaded()) - return; - SetPassengersLoaded(true); if (uint32 mapId = GetGOInfo()->moTransport.mapID) { CellObjectGuidsMap const& cells = sObjectMgr->GetMapObjectGuids(mapId, GetMap()->GetSpawnMode()); @@ -431,7 +442,6 @@ void MotionTransport::LoadStaticPassengers() void MotionTransport::UnloadStaticPassengers() { - SetPassengersLoaded(false); while (!_staticPassengers.empty()) { WorldObject* obj = *_staticPassengers.begin(); @@ -542,11 +552,19 @@ void MotionTransport::DelayedTeleportTransport() _delayedTeleport = false; uint32 newMapId = _nextFrame->Node->mapid; + Map* newMap = sMapMgr->CreateBaseMap(newMapId); + GetMap()->RemoveFromMap(this, false); + float x = _nextFrame->Node->x, y = _nextFrame->Node->y, z = _nextFrame->Node->z, o = _nextFrame->InitialOrientation; + if (!newMap->IsGridLoaded(x, y) && !_passengers.empty()) + newMap->LoadGrid(x, y); // xinef: load before adding passengers to new map + + SetMap(newMap); + PassengerSet _passengersCopy = _passengers; for (PassengerSet::iterator itr = _passengersCopy.begin(); itr != _passengersCopy.end(); ) { @@ -592,15 +610,8 @@ void MotionTransport::DelayedTeleportTransport() } } - Map* newMap = sMapMgr->CreateBaseMap(newMapId); - GetMap()->RemoveFromMap(this, false); - newMap->LoadGrid(x, y); // xinef: load before adding passengers to new map - SetMap(newMap); - Relocate(x, y, z, o); GetMap()->AddToMap(this); - - LoadStaticPassengers(); } void MotionTransport::UpdatePassengerPositions(PassengerSet& passengers) @@ -631,7 +642,7 @@ void MotionTransport::UpdatePassengerPositions(PassengerSet& passengers) case TYPEID_UNIT: { Creature* creature = passenger->ToCreature(); - GetMap()->CreatureRelocation(creature, x, y, z, o); + GetMap()->CreatureRelocation(creature, x, y, z, o, false); creature->GetTransportHomePosition(x, y, z, o); CalculatePassengerPosition(x, y, z, &o); @@ -643,7 +654,7 @@ void MotionTransport::UpdatePassengerPositions(PassengerSet& passengers) GetMap()->PlayerRelocation(passenger->ToPlayer(), x, y, z, o); break; case TYPEID_GAMEOBJECT: - GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o); + GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o, false); break; case TYPEID_DYNAMICOBJECT: GetMap()->DynamicObjectRelocation(passenger->ToDynObject(), x, y, z, o); @@ -780,7 +791,6 @@ bool StaticTransport::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* m LastUsedScriptID = GetGOInfo()->ScriptId; AIM_Initialize(); - this->setActive(true); return true; } @@ -915,7 +925,8 @@ void StaticTransport::UpdatePosition(float x, float y, float z, float o) if (!GetMap()->IsGridLoaded(x, y)) // pussywizard: should not happen, but just in case GetMap()->LoadGrid(x, y); - GetMap()->GameObjectRelocation(this, x, y, z, o); // this also relocates the model + Relocate(x, y, z, o); + UpdateModelPosition(); UpdatePassengerPositions(); } @@ -942,17 +953,14 @@ void StaticTransport::UpdatePassengerPositions() switch (passenger->GetTypeId()) { case TYPEID_UNIT: - GetMap()->CreatureRelocation(passenger->ToCreature(), x, y, z, o); + GetMap()->CreatureRelocation(passenger->ToCreature(), x, y, z, o, false); break; case TYPEID_PLAYER: if (passenger->IsInWorld()) - { GetMap()->PlayerRelocation(passenger->ToPlayer(), x, y, z, o); - passenger->ToPlayer()->SetFallInformation(GameTime::GetGameTime().count(), z); - } break; case TYPEID_GAMEOBJECT: - GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o); + GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o, false); break; case TYPEID_DYNAMICOBJECT: GetMap()->DynamicObjectRelocation(passenger->ToDynObject(), x, y, z, o); @@ -1001,8 +1009,7 @@ void StaticTransport::RemovePassenger(WorldObject* passenger, bool withAll) { passenger->SetTransport(nullptr); passenger->m_movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT; - passenger->m_movementInfo.transport.guid.Clear(); - passenger->m_movementInfo.transport.pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f); + passenger->m_movementInfo.transport.Reset(); } } } diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index 75fc9f9ee6b507..cc038e7225aca4 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -68,8 +68,6 @@ class MotionTransport : public Transport PassengerSet const& GetStaticPassengers() const { return _staticPassengers; } void UnloadStaticPassengers(); void UnloadNonStaticPassengers(); - void SetPassengersLoaded(bool loaded) { _passengersLoaded = loaded; } - bool PassengersLoaded() const { return _passengersLoaded; } KeyFrameVec const& GetKeyFrames() const { return _transportInfo->keyFrames; } void EnableMovement(bool enabled); @@ -104,7 +102,6 @@ class MotionTransport : public Transport PassengerSet _staticPassengers; mutable std::mutex Lock; - bool _passengersLoaded; bool _delayedTeleport; }; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b308603bc47c9f..be8dc194150115 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -32,7 +32,6 @@ #include "CreatureAIImpl.h" #include "CreatureGroups.h" #include "DisableMgr.h" -#include "DynamicVisibility.h" #include "Formulas.h" #include "GameObjectAI.h" #include "GameTime.h" @@ -44,6 +43,7 @@ #include "MoveSpline.h" #include "MoveSplineInit.h" #include "MovementGenerator.h" +#include "MovementPacketBuilder.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Opcodes.h" @@ -567,11 +567,19 @@ void Unit::UpdateSplineMovement(uint32 t_diff) // this code cant be placed inside EscortMovementGenerator, because we cant delete active MoveGen while it is updated SplineHandler handler(this); movespline->updateState(t_diff, handler); - // Xinef: Spline was cleared by StopMoving, return - if (!movespline->Initialized()) + + if (movespline->isCyclic()) { - DisableSpline(); - return; + m_splineSyncTimer.Update(t_diff); + if (m_splineSyncTimer.Passed()) + { + m_splineSyncTimer.Reset(5000); // Retail value, do not change + + WorldPacket data(SMSG_FLIGHT_SPLINE_SYNC, 4 + GetPackGUID().size()); + Movement::PacketBuilder::WriteSplineSync(*movespline, data); + data.appendPackGUID(GetGUID()); + SendMessageToSet(&data, true); + } } bool arrived = movespline->Finalized(); @@ -584,17 +592,11 @@ void Unit::UpdateSplineMovement(uint32 t_diff) SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, movespline->GetAnimationType()); } - // pussywizard: update always! not every 400ms, because movement generators need the actual position - //m_movesplineTimer.Update(t_diff); - //if (m_movesplineTimer.Passed() || arrived) UpdateSplinePosition(); } void Unit::UpdateSplinePosition() { - //static uint32 const positionUpdateDelay = 400; - - //m_movesplineTimer.Reset(positionUpdateDelay); Movement::Location loc = movespline->ComputePosition(); if (movespline->onTransport) @@ -607,16 +609,14 @@ void Unit::UpdateSplinePosition() if (TransportBase* transport = GetDirectTransport()) transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation); + else + return; } - // Xinef: if we had spline running update orientation along with position - //if (HasUnitState(UNIT_STATE_CANNOT_TURN)) - // loc.orientation = GetOrientation(); + if (HasUnitState(UNIT_STATE_CANNOT_TURN)) + loc.orientation = GetOrientation(); - if (GetTypeId() == TYPEID_PLAYER) - UpdatePosition(loc.x, loc.y, loc.z, loc.orientation); - else - ToCreature()->SetPosition(loc.x, loc.y, loc.z, loc.orientation); + UpdatePosition(loc.x, loc.y, loc.z, loc.orientation); } void Unit::DisableSpline() @@ -15709,15 +15709,9 @@ void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup) void Unit::CleanupsBeforeDelete(bool finalCleanup) { - if (GetTransport()) - { - GetTransport()->RemovePassenger(this); - SetTransport(nullptr); - m_movementInfo.transport.Reset(); - m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - } - CleanupBeforeRemoveFromMap(finalCleanup); + + WorldObject::CleanupsBeforeDelete(finalCleanup); } void Unit::UpdateCharmAI() @@ -20253,10 +20247,14 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel if (!Acore::IsValidMapCoord(x, y, z, orientation)) return false; - float old_orientation = GetOrientation(); - float current_z = GetPositionZ(); - bool turn = (old_orientation != orientation); - bool relocated = (teleport || GetPositionX() != x || GetPositionY() != y || current_z != z); + // Check if angular distance changed + bool const turn = G3D::fuzzyGt(M_PI - fabs(fabs(GetOrientation() - orientation) - M_PI), 0.0f); + + // G3D::fuzzyEq won't help here, in some cases magnitudes differ by a little more than G3D::eps, but should be considered equal + bool const relocated = (teleport || + std::fabs(GetPositionX() - x) > 0.001f || + std::fabs(GetPositionY() - y) > 0.001f || + std::fabs(GetPositionZ() - z) > 0.001f); if (!GetVehicle()) { @@ -20282,6 +20280,8 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel UpdateObjectVisibility(false); } + UpdatePositionData(); + return (relocated || turn); } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5fe385fb78858f..bdd2a0891bb7e8 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2575,7 +2575,7 @@ class Unit : public WorldObject uint32 m_state; // Even derived shouldn't modify uint32 m_CombatTimer; uint32 m_lastManaUse; // msecs - //TimeTrackerSmall m_movesplineTimer; + TimeTrackerSmall m_splineSyncTimer; Diminishing m_Diminishing; // Manage all Units that are threatened by us diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index b33502da2d9957..de264e947cbeb7 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -545,7 +545,8 @@ bool Vehicle::IsVehicleInUse() void Vehicle::TeleportVehicle(float x, float y, float z, float ang) { - _me->GetMap()->LoadGrid(x, y); + if (!_me->GetMap()->IsGridLoaded(x, y)) + _me->GetMap()->LoadGrid(x, y); _me->NearTeleportTo(x, y, z, ang, true); for (SeatMap::const_iterator itr = Seats.begin(); itr != Seats.end(); ++itr) diff --git a/src/server/game/Grids/NGrid.cpp b/src/server/game/Grids/NGrid.cpp index c20bf555824898..337d7dded85a3d 100644 --- a/src/server/game/Grids/NGrid.cpp +++ b/src/server/game/Grids/NGrid.cpp @@ -23,7 +23,7 @@ i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(f { } -GridInfo::GridInfo(std::chrono::seconds expiry, bool unload /*= true */) : i_timer(expiry.count()), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), +GridInfo::GridInfo(time_t expiry, bool unload /*= true */) : i_timer(expiry), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) { } diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index a49a299194cd99..9a8f64fdbccc4e 100644 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -32,7 +32,7 @@ class AC_GAME_API GridInfo { public: GridInfo(); - GridInfo(std::chrono::seconds expiry, bool unload = true); + GridInfo(time_t expiry, bool unload = true); TimeTracker const& getTimeTracker() const { return i_timer; } bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; } void setUnloadExplicitLock(bool on) { i_unloadExplicitLock = on; } @@ -73,7 +73,7 @@ class NGrid { public: typedef Grid GridType; - NGrid(uint32 id, int32 x, int32 y, std::chrono::seconds expiry, bool unload = true) : + NGrid(uint32 id, int32 x, int32 y, time_t expiry, bool unload = true) : i_gridId(id), i_GridInfo(GridInfo(expiry, unload)), i_x(x), i_y(y), i_cellstate(GRID_STATE_INVALID), i_GridObjectDataLoaded(false) { } @@ -111,8 +111,8 @@ class NGrid void setUnloadReferenceLock(bool on) { i_GridInfo.setUnloadReferenceLock(on); } void incUnloadActiveLock() { i_GridInfo.incUnloadActiveLock(); } void decUnloadActiveLock() { i_GridInfo.decUnloadActiveLock(); } - void ResetTimeTracker(std::chrono::seconds interval) { i_GridInfo.ResetTimeTracker(interval.count()); } - void UpdateTimeTracker(std::chrono::seconds diff) { i_GridInfo.UpdateTimeTracker(diff.count()); } + void ResetTimeTracker(time_t interval) { i_GridInfo.ResetTimeTracker(interval); } + void UpdateTimeTracker(time_t diff) { i_GridInfo.UpdateTimeTracker(diff); } /* template void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index c9e9bd73522f3c..9b8ae064f34183 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -86,7 +86,7 @@ void VisibleNotifier::SendToSelf() i_data.BuildPacket(&packet); i_player.GetSession()->SendPacket(&packet); - for (std::vector::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it) + for (std::set::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it) { i_player.GetInitialVisiblePackets(*it); } diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index c634fe9e35f3f6..86fbfe44df560a 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -42,16 +42,10 @@ namespace Acore { Player& i_player; GuidUnorderedSet vis_guids; - std::vector& i_visibleNow; - bool i_gobjOnly; + std::set i_visibleNow; UpdateData i_data; - VisibleNotifier(Player& player, bool gobjOnly) : - i_player(player), vis_guids(player.m_clientGUIDs), i_visibleNow(player.m_newVisible), i_gobjOnly(gobjOnly) - { - i_visibleNow.clear(); - } - + VisibleNotifier(Player& player) : i_player(player), vis_guids(player.m_clientGUIDs) {} template void Visit(GridRefMgr& m); void SendToSelf(void); }; @@ -69,7 +63,7 @@ namespace Acore struct PlayerRelocationNotifier : public VisibleNotifier { - PlayerRelocationNotifier(Player& player) : VisibleNotifier(player, false) { } + PlayerRelocationNotifier(Player& player) : VisibleNotifier(player) { } template void Visit(GridRefMgr& m) { VisibleNotifier::Visit(m); } void Visit(CreatureMapType&); diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index 00d967880c94e0..8741828eaa29d6 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -32,10 +32,6 @@ template inline void Acore::VisibleNotifier::Visit(GridRefMgr& m) { - // Xinef: Update gameobjects only - if (i_gobjOnly) - return; - for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) { vis_guids.erase(iter->GetSource()->GetGUID()); diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index c0d9e78c08e91d..09e66bc96b1218 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -25,6 +25,7 @@ #include "ObjectMgr.h" #include "Transport.h" #include "Vehicle.h" +#include "GameTime.h" void ObjectGridEvacuator::Visit(CreatureMapType& m) { @@ -113,18 +114,6 @@ void AddObjectHelper(CellCoord& cell, CreatureMapType& m, uint32& count, Map* ma ++count; } -template <> -void AddObjectHelper(CellCoord& cell, GameObjectMapType& m, uint32& count, Map* map, GameObject* obj) -{ - obj->AddToGrid(m); - ObjectGridLoader::SetObjectCell(obj, cell); - obj->AddToWorld(); - if (obj->isActiveObject()) - map->AddToActive(obj); - - ++count; -} - template void LoadHelper(CellGuidSet const& /*guid_set*/, CellCoord& /*cell*/, GridRefMgr& /*m*/, uint32& /*count*/, Map* /*map*/) { @@ -135,8 +124,13 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefMgrGetCreatureRespawnTime(guid) > now) + continue; + + Creature* obj = new Creature(); if (!obj->LoadFromDB(guid, map)) { delete obj; @@ -162,7 +156,12 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefMgrGetGORespawnTime(guid) > now) + continue; + GameObjectData const* data = sObjectMgr->GetGameObjectData(guid); GameObject* obj = data && sObjectMgr->IsGameObjectStaticTransport(data->id) ? new StaticTransport() : new GameObject(); diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index f0889150b41b17..551fea862313c8 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -49,19 +49,20 @@ void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket& /*recvData*/) void WorldSession::HandleMoveWorldportAck() { + Player* player = GetPlayer(); // ignore unexpected far teleports - if (!GetPlayer()->IsBeingTeleportedFar()) + if (!player->IsBeingTeleportedFar()) return; - GetPlayer()->SetSemaphoreTeleportFar(0); + player->SetSemaphoreTeleportFar(0); // get the teleport destination - WorldLocation const& loc = GetPlayer()->GetTeleportDest(); + WorldLocation const& loc = player->GetTeleportDest(); // possible errors in the coordinate validity check if (!MapMgr::IsValidMapCoord(loc)) { - KickPlayer("!MapMgr::IsValidMapCoord(loc)"); + LogoutPlayer(false); return; } @@ -69,198 +70,202 @@ void WorldSession::HandleMoveWorldportAck() MapEntry const* mEntry = sMapStore.LookupEntry(loc.GetMapId()); InstanceTemplate const* mInstance = sObjectMgr->GetInstanceTemplate(loc.GetMapId()); - Map* oldMap = GetPlayer()->GetMap(); - if (GetPlayer()->IsInWorld()) + Map* oldMap = player->GetMap(); + if (player->IsInWorld()) { - LOG_ERROR("network.opcode", "Player (Name {}) is still in world when teleported from map {} to new map {}", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId()); - oldMap->RemovePlayerFromMap(GetPlayer(), false); + LOG_ERROR("network.opcode", "Player (Name {}) is still in world when teleported from map {} to new map {}", player->GetName(), oldMap->GetId(), loc.GetMapId()); + oldMap->RemovePlayerFromMap(player, false); } // reset instance validity, except if going to an instance inside an instance - if (!GetPlayer()->m_InstanceValid && !mInstance) + if (!player->m_InstanceValid && !mInstance) { - GetPlayer()->m_InstanceValid = true; + player->m_InstanceValid = true; // pussywizard: m_InstanceValid can be false only by leaving a group in an instance => so remove temp binds that could not be removed because player was still on the map! - if (!sInstanceSaveMgr->PlayerIsPermBoundToInstance(GetPlayer()->GetGUID(), oldMap->GetId(), oldMap->GetDifficulty())) - sInstanceSaveMgr->PlayerUnbindInstance(GetPlayer()->GetGUID(), oldMap->GetId(), oldMap->GetDifficulty(), true); + if (!sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUID(), oldMap->GetId(), oldMap->GetDifficulty())) + sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), oldMap->GetId(), oldMap->GetDifficulty(), true); } // relocate the player to the teleport destination - Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer()); + Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), player); // the CanEnter checks are done in TeleporTo but conditions may change // while the player is in transit, for example the map may get full - if (!newMap || newMap->CannotEnter(GetPlayer(), false)) + if (!newMap || newMap->CannotEnter(player, false)) { - LOG_ERROR("network.opcode", "Map {} could not be created for player {}, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUID().ToString()); - GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO); + LOG_ERROR("network.opcode", "Map {} could not be created for player {}, porting player to homebind", loc.GetMapId(), player->GetGUID().ToString()); + player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO); return; } - float z = loc.GetPositionZ() + GetPlayer()->GetHoverHeight(); - GetPlayer()->Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation()); + float z = loc.GetPositionZ() + player->GetHoverHeight(); + player->Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation()); - GetPlayer()->ResetMap(); - GetPlayer()->SetMap(newMap); + player->ResetMap(); + player->SetMap(newMap); - GetPlayer()->UpdatePositionData(); + player->UpdatePositionData(); - GetPlayer()->SendInitialPacketsBeforeAddToMap(); - if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer())) + player->SendInitialPacketsBeforeAddToMap(); + if (!player->GetMap()->AddPlayerToMap(player)) { LOG_ERROR("network.opcode", "WORLD: failed to teleport player {} ({}) to map {} because of unknown reason!", - GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString(), loc.GetMapId()); - GetPlayer()->ResetMap(); - GetPlayer()->SetMap(oldMap); - GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO); + player->GetName(), player->GetGUID().ToString(), loc.GetMapId()); + player->ResetMap(); + player->SetMap(oldMap); + player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO); return; } oldMap->AfterPlayerUnlinkFromMap(); // pussywizard: transport teleport couldn't teleport us to the same map (some other teleport pending, reqs not met, etc.), but we still have transport set until player moves! clear it if map differs (crashfix) - if (Transport* t = _player->GetTransport()) - if (!t->IsInMap(_player)) + if (Transport* t = player->GetTransport()) + if (!t->IsInMap(player)) { - t->RemovePassenger(_player); - _player->m_transport = nullptr; - _player->m_movementInfo.transport.Reset(); - _player->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + t->RemovePassenger(player); + player->m_transport = nullptr; + player->m_movementInfo.transport.Reset(); + player->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT); } - if (!_player->getHostileRefMgr().IsEmpty()) - _player->getHostileRefMgr().deleteReferences(true); // pussywizard: multithreading crashfix + if (!player->getHostileRefMgr().IsEmpty()) + player->getHostileRefMgr().deleteReferences(true); // pussywizard: multithreading crashfix - CellCoord pair(Acore::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY())); + CellCoord pair(Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY())); Cell cell(pair); if (!GridCoord(cell.GridX(), cell.GridY()).IsCoordValid()) { - KickPlayer("!GridCoord(cell.GridX(), cell.GridY()).IsCoordValid()"); + LogoutPlayer(false); return; } - newMap->LoadGrid(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY()); + + if (!newMap->IsGridLoaded(player->GetPositionX(), player->GetPositionY())) + newMap->LoadGrid(player->GetPositionX(), player->GetPositionY()); // pussywizard: player supposed to enter bg map - if (_player->InBattleground()) + if (player->InBattleground()) { // but landed on another map, cleanup data if (!mEntry->IsBattlegroundOrArena()) - _player->SetBattlegroundId(0, BATTLEGROUND_TYPE_NONE, PLAYER_MAX_BATTLEGROUND_QUEUES, false, false, TEAM_NEUTRAL); + player->SetBattlegroundId(0, BATTLEGROUND_TYPE_NONE, PLAYER_MAX_BATTLEGROUND_QUEUES, false, false, TEAM_NEUTRAL); // everything ok - else if (Battleground* bg = _player->GetBattleground()) + else if (Battleground* bg = player->GetBattleground()) { - if (_player->IsInvitedForBattlegroundInstance()) // GMs are not invited, so they are not added to participants - bg->AddPlayer(_player); + if (player->IsInvitedForBattlegroundInstance()) // GMs are not invited, so they are not added to participants + bg->AddPlayer(player); } } // pussywizard: arena spectator stuff { - if (newMap->IsBattleArena() && ((BattlegroundMap*)newMap)->GetBG() && _player->HasPendingSpectatorForBG(((BattlegroundMap*)newMap)->GetInstanceId())) + if (newMap->IsBattleArena() && ((BattlegroundMap*)newMap)->GetBG() && player->HasPendingSpectatorForBG(((BattlegroundMap*)newMap)->GetInstanceId())) { - _player->ClearReceivedSpectatorResetFor(); - _player->SetIsSpectator(true); - ArenaSpectator::SendCommand(_player, "%sENABLE", SPECTATOR_ADDON_PREFIX); - ((BattlegroundMap*)newMap)->GetBG()->AddSpectator(_player); - ArenaSpectator::HandleResetCommand(_player); + player->ClearReceivedSpectatorResetFor(); + player->SetIsSpectator(true); + ArenaSpectator::SendCommand(player, "%sENABLE", SPECTATOR_ADDON_PREFIX); + ((BattlegroundMap*)newMap)->GetBG()->AddSpectator(player); + ArenaSpectator::HandleResetCommand(player); } else - _player->SetIsSpectator(false); + player->SetIsSpectator(false); - GetPlayer()->SetPendingSpectatorForBG(0); + player->SetPendingSpectatorForBG(0); - if (uint32 inviteInstanceId = _player->GetPendingSpectatorInviteInstanceId()) + if (uint32 inviteInstanceId = player->GetPendingSpectatorInviteInstanceId()) { if (Battleground* tbg = sBattlegroundMgr->GetBattleground(inviteInstanceId, BATTLEGROUND_TYPE_NONE)) - tbg->RemoveToBeTeleported(_player->GetGUID()); - _player->SetPendingSpectatorInviteInstanceId(0); + tbg->RemoveToBeTeleported(player->GetGUID()); + player->SetPendingSpectatorInviteInstanceId(0); } } - // xinef: do this again, player can be teleported inside bg->AddPlayer(_player)!!!! - CellCoord pair2(Acore::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY())); + // xinef: do this again, player can be teleported inside bg->AddPlayer(player)!!!! + CellCoord pair2(Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY())); Cell cell2(pair2); if (!GridCoord(cell2.GridX(), cell2.GridY()).IsCoordValid()) { KickPlayer("!GridCoord(cell2.GridX(), cell2.GridY()).IsCoordValid()"); return; } - newMap->LoadGrid(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY()); - GetPlayer()->SendInitialPacketsAfterAddToMap(); + if (!newMap->IsGridLoaded(player->GetPositionX(), player->GetPositionY())) + newMap->LoadGrid(player->GetPositionX(), player->GetPositionY()); + + player->SendInitialPacketsAfterAddToMap(); // flight fast teleport case - if (GetPlayer()->IsInFlight()) + if (player->IsInFlight()) { - if (!GetPlayer()->InBattleground()) + if (!player->InBattleground()) { // short preparations to continue flight - MovementGenerator* movementGenerator = GetPlayer()->GetMotionMaster()->top(); - movementGenerator->Initialize(GetPlayer()); + MovementGenerator* movementGenerator = player->GetMotionMaster()->top(); + movementGenerator->Initialize(player); return; } // battleground state prepare, stop flight - GetPlayer()->GetMotionMaster()->MovementExpired(); - GetPlayer()->CleanupAfterTaxiFlight(); + player->GetMotionMaster()->MovementExpired(); + player->CleanupAfterTaxiFlight(); } // resurrect character at enter into instance where his corpse exist after add to map - Corpse* corpse = GetPlayer()->GetMap()->GetCorpseByPlayer(GetPlayer()->GetGUID()); + Corpse* corpse = player->GetMap()->GetCorpseByPlayer(player->GetGUID()); if (corpse && corpse->GetType() != CORPSE_BONES) { if (mEntry->IsDungeon()) { - GetPlayer()->ResurrectPlayer(0.5f); - GetPlayer()->SpawnCorpseBones(); + player->ResurrectPlayer(0.5f); + player->SpawnCorpseBones(); } } if (!corpse && mEntry->IsDungeon()) { // resurrect character upon entering instance when the corpse is not available anymore - if (GetPlayer()->GetCorpseLocation().GetMapId() == mEntry->MapID) + if (player->GetCorpseLocation().GetMapId() == mEntry->MapID) { - GetPlayer()->ResurrectPlayer(0.5f); - GetPlayer()->RemoveCorpse(); + player->ResurrectPlayer(0.5f); + player->RemoveCorpse(); } } bool allowMount = !mEntry->IsDungeon() || mEntry->IsBattlegroundOrArena(); if (mInstance) { - Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid()); + Difficulty diff = player->GetDifficulty(mEntry->IsRaid()); if (MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID, diff)) if (mapDiff->resetTime) if (time_t timeReset = sInstanceSaveMgr->GetResetTimeFor(mEntry->MapID, diff)) { uint32 timeleft = uint32(timeReset - GameTime::GetGameTime().count()); - GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft, true); + player->SendInstanceResetWarning(mEntry->MapID, diff, timeleft, true); } allowMount = mInstance->AllowMount; } // mount allow check if (!allowMount) - _player->RemoveAurasByType(SPELL_AURA_MOUNTED); + player->RemoveAurasByType(SPELL_AURA_MOUNTED); // update zone immediately, otherwise leave channel will cause crash in mtmap uint32 newzone, newarea; - GetPlayer()->GetZoneAndAreaId(newzone, newarea); - GetPlayer()->UpdateZone(newzone, newarea); + player->GetZoneAndAreaId(newzone, newarea); + player->UpdateZone(newzone, newarea); // honorless target - if (GetPlayer()->pvpInfo.IsHostile) - GetPlayer()->CastSpell(GetPlayer(), 2479, true); + if (player->pvpInfo.IsHostile) + player->CastSpell(player, 2479, true); // in friendly area - else if (GetPlayer()->IsPvP() && !GetPlayer()->HasPlayerFlag(PLAYER_FLAGS_IN_PVP)) - GetPlayer()->UpdatePvP(false, false); + else if (player->IsPvP() && !player->HasPlayerFlag(PLAYER_FLAGS_IN_PVP)) + player->UpdatePvP(false, false); // resummon pet - GetPlayer()->ResummonPetTemporaryUnSummonedIfAny(); + player->ResummonPetTemporaryUnSummonedIfAny(); //lets process all delayed operations on successful teleport - GetPlayer()->ProcessDelayedOperations(); + player->ProcessDelayedOperations(); } void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index e66ef5c9b988d3..643c884d118f60 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -69,6 +69,11 @@ Map::~Map() sScriptMgr->OnDestroyMap(this); + // Delete all waiting spawns, else there will be a memory leak + // This doesn't delete from database. + _creatureRespawnTimes.clear(); + _goRespawnTimes.clear(); + while (!i_worldObjects.empty()) { WorldObject* obj = *i_worldObjects.begin(); @@ -237,7 +242,7 @@ void Map::LoadMapAndVMap(int gx, int gy) } } -Map::Map(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : +Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : _creatureToMoveLock(false), _gameObjectsToMoveLock(false), _dynamicObjectsToMoveLock(false), i_mapEntry(sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), _instanceResetPeriod(0), @@ -440,6 +445,9 @@ void Map::DeleteFromWorld(Player* player) void Map::EnsureGridCreated(const GridCoord& p) { + if (getNGrid(p.x_coord, p.y_coord)) + return; + std::lock_guard guard(GridLock); EnsureGridCreated_i(p); } @@ -493,13 +501,13 @@ bool Map::EnsureGridLoaded(const Cell& cell) NGridType* grid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(grid); - if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY())) + if (!grid->isGridObjectDataLoaded()) { //if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY())) //{ LOG_DEBUG("maps", "Loading grid[{}, {}] for map {} instance {}", cell.GridX(), cell.GridY(), GetId(), i_InstanceId); - setGridObjectDataLoaded(true, cell.GridX(), cell.GridY()); + grid->setGridObjectDataLoaded(true); ObjectGridLoader loader(*grid, this, cell); loader.LoadN(); @@ -685,15 +693,7 @@ bool Map::AddToMap(MotionTransport* obj, bool /*checkTransport*/) return false; //Should delete object } - Cell cell(cellCoord); - if (obj->isActiveObject()) - EnsureGridLoaded(cell); - obj->AddToWorld(); - - if (obj->isActiveObject()) - AddToActive(obj); - _transports.insert(obj); // Broadcast creation to players @@ -717,7 +717,8 @@ bool Map::AddToMap(MotionTransport* obj, bool /*checkTransport*/) bool Map::IsGridLoaded(const GridCoord& p) const { - return (getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord)); + NGridType* grid = getNGrid(p.x_coord, p.y_coord); + return grid && grid->isGridObjectDataLoaded(); } void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor& gridVisitor, @@ -746,7 +747,7 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor updateList; updateList.reserve(10); - // non-player active objects, increasing iterator in the loop in case of object removal - for (m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end();) - { - WorldObject* obj = *m_activeNonPlayersIter; - ++m_activeNonPlayersIter; - - if (!obj || !obj->IsInWorld()) - continue; - - VisitNearbyCellsOf(obj, grid_object_update, world_object_update); - } - // the player iterator is stored in the map object // to make sure calls to Map::Remove don't invalidate it for (m_mapRefIter = m_mapRefMgr.begin(); m_mapRefIter != m_mapRefMgr.end(); ++m_mapRefIter) @@ -836,6 +825,18 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) } } + // non-player active objects, increasing iterator in the loop in case of object removal + for (m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end();) + { + WorldObject* obj = *m_activeNonPlayersIter; + ++m_activeNonPlayersIter; + + if (!obj || !obj->IsInWorld()) + continue; + + VisitNearbyCellsOf(obj, grid_object_update, world_object_update); + } + for (_transportsUpdateIter = _transports.begin(); _transportsUpdateIter != _transports.end();) // pussywizard: transports updated after VisitNearbyCellsOf, grids around are loaded, everything ok { MotionTransport* transport = *_transportsUpdateIter; @@ -1015,8 +1016,6 @@ template<> void Map::RemoveFromMap(MotionTransport* obj, bool remove) { obj->RemoveFromWorld(); - if (obj->isActiveObject()) - RemoveFromActive(obj); Map::PlayerList const& players = GetPlayers(); if (!players.IsEmpty()) @@ -1060,6 +1059,10 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float o) Cell old_cell(player->GetPositionX(), player->GetPositionY()); Cell new_cell(x, y); + player->Relocate(x, y, z, o); + if (player->IsVehicle()) + player->GetVehicleKit()->RelocatePassengers(); + if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { LOG_DEBUG("maps", "Player {} relocation grid[{}, {}]cell[{}, {}]->grid[{}, {}]cell[{}, {}]", player->GetName().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); @@ -1072,64 +1075,63 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float o) AddToGrid(player, new_cell); } - player->Relocate(x, y, z, o); - if (player->IsVehicle()) - player->GetVehicleKit()->RelocatePassengers(); player->UpdatePositionData(); player->UpdateObjectVisibility(false); } -void Map::CreatureRelocation(Creature* creature, float x, float y, float z, float o) +void Map::CreatureRelocation(Creature* creature, float x, float y, float z, float o, bool respawnRelocationOnFail) { Cell old_cell = creature->GetCurrentCell(); Cell new_cell(x, y); + if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY())) + return; + + // delay creature move for grid/cell to grid/cell moves if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - #ifdef ACORE_DEBUG LOG_DEBUG("maps", "Creature {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", creature->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif AddCreatureToMoveList(creature, x, y, z, o); + // in diffcell/diffgrid case notifiers called at finishing move creature in Map::MoveAllCreaturesInMoveList } else { + creature->Relocate(x, y, z, o); + if (creature->IsVehicle()) + creature->GetVehicleKit()->RelocatePassengers(); + creature->UpdateObjectVisibility(false); + creature->UpdatePositionData(); RemoveCreatureFromMoveList(creature); } - - creature->Relocate(x, y, z, o); - if (creature->IsVehicle()) - creature->GetVehicleKit()->RelocatePassengers(); - creature->UpdatePositionData(); - creature->UpdateObjectVisibility(false); } -void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float o) +void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float o, bool respawnRelocationOnFail) { Cell old_cell = go->GetCurrentCell(); Cell new_cell(x, y); + if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY())) + return; + + // delay creature move for grid/cell to grid/cell moves if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - #ifdef ACORE_DEBUG LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif AddGameObjectToMoveList(go, x, y, z, o); + // in diffcell/diffgrid case notifiers called at finishing move go in Map::MoveAllGameObjectsInMoveList } else { + go->Relocate(x, y, z, o); + go->UpdateModelPosition(); + go->SetPositionDataUpdate(); + go->UpdateObjectVisibility(false); RemoveGameObjectFromMoveList(go); } - - go->Relocate(x, y, z, o); - go->UpdateModelPosition(); - go->SetPositionDataUpdate(); - go->UpdateObjectVisibility(false); } void Map::DynamicObjectRelocation(DynamicObject* dynObj, float x, float y, float z, float o) @@ -1137,24 +1139,25 @@ void Map::DynamicObjectRelocation(DynamicObject* dynObj, float x, float y, float Cell old_cell = dynObj->GetCurrentCell(); Cell new_cell(x, y); + if (!getNGrid(new_cell.GridX(), new_cell.GridY())) + return; + + // delay creature move for grid/cell to grid/cell moves if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - #ifdef ACORE_DEBUG LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", dynObj->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif AddDynamicObjectToMoveList(dynObj, x, y, z, o); + // in diffcell/diffgrid case notifiers called at finishing move dynObj in Map::MoveAllGameObjectsInMoveList } else { + dynObj->Relocate(x, y, z, o); + dynObj->SetPositionDataUpdate(); + dynObj->UpdateObjectVisibility(false); RemoveDynamicObjectFromMoveList(dynObj); } - - dynObj->Relocate(x, y, z, o); - dynObj->SetPositionDataUpdate(); - dynObj->UpdateObjectVisibility(false); } void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang) @@ -3150,11 +3153,14 @@ void Map::RemoveAllObjectsInRemoveList() RemoveFromMap((DynamicObject*)obj, true); break; case TYPEID_GAMEOBJECT: - if (MotionTransport* transport = obj->ToGameObject()->ToMotionTransport()) + { + GameObject* go = obj->ToGameObject(); + if (MotionTransport* transport = go->ToMotionTransport()) RemoveFromMap(transport, true); else - RemoveFromMap(obj->ToGameObject(), true); + RemoveFromMap(go, true); break; + } case TYPEID_UNIT: // in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call // make sure that like sources auras/etc removed before destructor start @@ -3258,12 +3264,6 @@ void Map::AddToActive(DynamicObject* d) AddToActiveHelper(d); } -template<> -void Map::AddToActive(GameObject* d) -{ - AddToActiveHelper(d); -} - template void Map::RemoveFromActive(T* obj) { @@ -3298,12 +3298,6 @@ void Map::RemoveFromActive(DynamicObject* obj) RemoveFromActiveHelper(obj); } -template<> -void Map::RemoveFromActive(GameObject* obj) -{ - RemoveFromActiveHelper(obj); -} - template bool Map::AddToMap(Corpse*, bool); template bool Map::AddToMap(Creature*, bool); template bool Map::AddToMap(GameObject*, bool); @@ -3316,7 +3310,7 @@ template void Map::RemoveFromMap(DynamicObject*, bool); /* ******* Dungeon Instance Maps ******* */ -InstanceMap::InstanceMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) +InstanceMap::InstanceMap(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : Map(id, expiry, InstanceId, SpawnMode, _parent), m_resetAfterUnload(false), m_unloadWhenEmpty(false), instance_data(nullptr), i_script_id(0) @@ -3726,7 +3720,7 @@ uint32 InstanceMap::GetMaxResetDelay() const /* ******* Battleground Instance Maps ******* */ -BattlegroundMap::BattlegroundMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, Map* _parent, uint8 spawnMode) +BattlegroundMap::BattlegroundMap(uint32 id, time_t expiry, uint32 InstanceId, Map* _parent, uint8 spawnMode) : Map(id, expiry, InstanceId, spawnMode, _parent), m_bg(nullptr) { //lets initialize visibility distance for BG/Arenas diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 9b607a1afbc90f..fff1c5785539c3 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -311,7 +311,7 @@ class Map : public GridRefMgr { friend class MapReference; public: - Map(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); + Map(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); ~Map() override; [[nodiscard]] MapEntry const* GetEntry() const { return i_mapEntry; } @@ -346,12 +346,18 @@ class Map : public GridRefMgr virtual void InitVisibilityDistance(); void PlayerRelocation(Player*, float x, float y, float z, float o); - void CreatureRelocation(Creature* creature, float x, float y, float z, float o); - void GameObjectRelocation(GameObject* go, float x, float y, float z, float o); + void CreatureRelocation(Creature* creature, float x, float y, float z, float o, bool respawnRelocationOnFail = true); + void GameObjectRelocation(GameObject* go, float x, float y, float z, float o, bool respawnRelocationOnFail = true); void DynamicObjectRelocation(DynamicObject* go, float x, float y, float z, float o); template void Visit(const Cell& cell, TypeContainerVisitor& visitor); + [[nodiscard]] bool IsActiveGrid(float x, float y) const + { + GridCoord p = Acore::ComputeGridCoord(x, y); + return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_ACTIVE; + } + [[nodiscard]] bool IsRemovalGrid(float x, float y) const { GridCoord p = Acore::ComputeGridCoord(x, y); @@ -374,10 +380,10 @@ class Map : public GridRefMgr void ResetGridExpiry(NGridType& grid, float factor = 1) const { - grid.ResetTimeTracker(std::chrono::duration_cast(i_gridExpiry * factor)); + grid.ResetTimeTracker(time_t(float(i_gridExpiry) * factor)); } - [[nodiscard]] std::chrono::seconds GetGridExpiry(void) const { return i_gridExpiry; } + [[nodiscard]] time_t GetGridExpiry(void) const { return i_gridExpiry; } [[nodiscard]] uint32 GetId() const { return i_mapEntry->MapID; } static void InitStateMachine(); @@ -702,9 +708,6 @@ class Map : public GridRefMgr } bool EnsureGridLoaded(Cell const&); - [[nodiscard]] bool isGridObjectDataLoaded(uint32 x, uint32 y) const { return getNGrid(x, y)->isGridObjectDataLoaded(); } - void setGridObjectDataLoaded(bool pLoaded, uint32 x, uint32 y) { getNGrid(x, y)->setGridObjectDataLoaded(pLoaded); } - void setNGrid(NGridType* grid, uint32 x, uint32 y); void ScriptsProcess(); @@ -750,7 +753,7 @@ class Map : public GridRefMgr void _ScriptProcessDoor(Object* source, Object* target, const ScriptInfo* scriptInfo) const; GameObject* _FindGameObject(WorldObject* pWorldObject, ObjectGuid::LowType guid) const; - std::chrono::seconds i_gridExpiry; + time_t i_gridExpiry; //used for fast base_map (e.g. MapInstanced class object) search for //InstanceMaps and BattlegroundMaps... @@ -839,7 +842,7 @@ enum InstanceResetMethod class InstanceMap : public Map { public: - InstanceMap(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent); + InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent); ~InstanceMap() override; bool AddPlayerToMap(Player*) override; void RemovePlayerFromMap(Player*, bool) override; @@ -873,7 +876,7 @@ class InstanceMap : public Map class BattlegroundMap : public Map { public: - BattlegroundMap(uint32 id, std::chrono::seconds, uint32 InstanceId, Map* _parent, uint8 spawnMode); + BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode); ~BattlegroundMap() override; bool AddPlayerToMap(Player*) override; @@ -898,11 +901,12 @@ inline void Map::Visit(Cell const& cell, TypeContainerVisitor& vis const uint32 cell_x = cell.CellX(); const uint32 cell_y = cell.CellY(); - if (!cell.NoCreate() || IsGridLoaded(GridCoord(x, y))) - { + if (!cell.NoCreate()) EnsureGridLoaded(cell); - getNGrid(x, y)->VisitGrid(cell_x, cell_y, visitor); - } + + NGridType* grid = getNGrid(x, y); + if (grid && grid->isGridObjectDataLoaded()) + grid->VisitGrid(cell_x, cell_y, visitor); } #endif diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 2ce5bbfbc108e4..36b593010eb492 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -25,8 +25,9 @@ #include "Player.h" #include "ScriptMgr.h" #include "VMapFactory.h" +#include "VMapMgr2.h" -MapInstanced::MapInstanced(uint32 id, std::chrono::seconds expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL) +MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL) { // fill with zero memset(&GridMapReference, 0, MAX_NUMBER_OF_GRIDS * MAX_NUMBER_OF_GRIDS * sizeof(uint16)); @@ -260,6 +261,15 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator& itr) sScriptMgr->OnDestroyInstance(this, itr->second); itr->second->UnloadAll(); + // should only unload VMaps if this is the last instance + if (m_InstancedMaps.size() <= 1) + { + VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(itr->second->GetId()); + MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(itr->second->GetId()); + // in that case, unload grids of the base map, too + // so in the next map creation, (EnsureGridCreated actually) VMaps will be reloaded + Map::UnloadAll(); + } // erase map delete itr->second; diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index fd86b8fa612973..e2deef1575290e 100644 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -28,7 +28,7 @@ class MapInstanced : public Map public: using InstancedMaps = std::unordered_map; - MapInstanced(uint32 id, std::chrono::seconds expiry); + MapInstanced(uint32 id, time_t expiry); ~MapInstanced() override {} // functions overwrite Map versions diff --git a/src/server/game/Maps/MapMgr.cpp b/src/server/game/Maps/MapMgr.cpp index 980b7898fd9737..5c95475fb73375 100644 --- a/src/server/game/Maps/MapMgr.cpp +++ b/src/server/game/Maps/MapMgr.cpp @@ -84,10 +84,10 @@ Map* MapMgr::CreateBaseMap(uint32 id) ASSERT(entry); if (entry->Instanceable()) - map = new MapInstanced(id, std::chrono::seconds(i_gridCleanUpDelay)); + map = new MapInstanced(id, i_gridCleanUpDelay); else { - map = new Map(id, std::chrono::seconds(i_gridCleanUpDelay), 0, REGULAR_DIFFICULTY); + map = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY); map->LoadRespawnTimes(); map->LoadCorpseData(); } diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp index e6ad171d38ee9a..5d7a65f64bc045 100644 --- a/src/server/game/Maps/TransportMgr.cpp +++ b/src/server/game/Maps/TransportMgr.cpp @@ -411,8 +411,6 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, ObjectGuid::LowType if (map && map->IsDungeon()) trans->m_zoneScript = map->ToInstanceMap()->GetInstanceScript(); - // xinef: transports are active so passengers can be relocated (grids must be loaded) - trans->setActive(true); HashMapHolder::Insert(trans); trans->GetMap()->AddToMap(trans); return trans; diff --git a/src/server/game/Misc/DynamicVisibility.cpp b/src/server/game/Misc/DynamicVisibility.cpp deleted file mode 100644 index 60889c4bcc34cd..00000000000000 --- a/src/server/game/Misc/DynamicVisibility.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of the AzerothCore 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 Affero General Public License as published by the - * Free Software Foundation; either version 3 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 Affero 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 "DynamicVisibility.h" - -uint8 DynamicVisibilityMgr::visibilitySettingsIndex = 0; - -void DynamicVisibilityMgr::Update(uint32 sessionCount) -{ - if (sessionCount >= (visibilitySettingsIndex + 1) * ((uint32)VISIBILITY_SETTINGS_PLAYER_INTERVAL) && visibilitySettingsIndex < VISIBILITY_SETTINGS_MAX_INTERVAL_NUM - 1) - ++visibilitySettingsIndex; - else if (visibilitySettingsIndex && sessionCount < visibilitySettingsIndex * ((uint32)VISIBILITY_SETTINGS_PLAYER_INTERVAL) - 100) - --visibilitySettingsIndex; -} diff --git a/src/server/game/Misc/DynamicVisibility.h b/src/server/game/Misc/DynamicVisibility.h deleted file mode 100644 index cf38bfa50a8648..00000000000000 --- a/src/server/game/Misc/DynamicVisibility.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of the AzerothCore 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 Affero General Public License as published by the - * Free Software Foundation; either version 3 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 Affero 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 __DYNAMICVISIBILITY_H -#define __DYNAMICVISIBILITY_H - -#include "Common.h" - -struct VisibilitySettingData -{ - uint32 visibilityNotifyDelay; - uint32 aiNotifyDelay; - float requiredMoveDistanceSq; -}; - -// pussywizard: dynamic visibility settings -// 7 player intervals: 0-499, 500-999, 1000-1499, 1500-1999, 2000-2499, 2500-2999, 3000+ -// 5 map types: common, instance, raid, bg, arena -// feel free to add more intervals, change existing ones or move to conf file :P -#define VISIBILITY_SETTINGS_PLAYER_INTERVAL 500 -#define VISIBILITY_SETTINGS_MAX_INTERVAL_NUM 7 -const VisibilitySettingData VisibilitySettings[VISIBILITY_SETTINGS_MAX_INTERVAL_NUM][5] = -{ - { {300, 150, 1.0f}, {300, 150, 1.0f}, {300, 150, 1.0f}, {300, 150, 1.0f}, {300, 150, 1.0f} }, // 0-499 - { {400, 200, 2.25f}, {400, 200, 2.25f}, {400, 200, 2.25f}, {300, 150, 1.0f}, {300, 150, 1.0f} }, // 500-999 - { {500, 250, 4.0f}, {500, 250, 4.0f}, {500, 250, 4.0f}, {400, 200, 2.25f}, {300, 150, 1.0f} }, // 1000-1499 - { {700, 350, 6.25f}, {700, 350, 6.25f}, {700, 350, 6.25f}, {600, 300, 6.25f}, {300, 200, 1.0f} }, // 1500-1999 - { {1000, 500, 16.0f}, {1000, 500, 16.0f}, {1000, 500, 16.0f}, {1000, 500, 16.0f}, {300, 250, 1.0f} }, // 2000-2499 - { {1000, 500, 16.0f}, {1000, 500, 16.0f}, {1000, 500, 16.0f}, {1000, 500, 16.0f}, {300, 350, 1.0f} }, // 2500-2999 - { {1200, 550, 20.0f}, {1200, 550, 25.0f}, {1200, 550, 25.0f}, {1100, 550, 16.0f}, {300, 350, 1.0f} } // 3000+ -}; - -class DynamicVisibilityMgr -{ -public: - static void Update(uint32 sessionCount); - static uint32 GetVisibilityNotifyDelay(uint32 map_type) { return VisibilitySettings[visibilitySettingsIndex][map_type].visibilityNotifyDelay; } - static uint32 GetAINotifyDelay(uint32 map_type) { return VisibilitySettings[visibilitySettingsIndex][map_type].aiNotifyDelay; } - static float GetReqMoveDistSq(uint32 map_type) { return VisibilitySettings[visibilitySettingsIndex][map_type].requiredMoveDistanceSq; } -protected: - static uint8 visibilitySettingsIndex; -}; - -#endif diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index 3d3be3769b2c2e..0d230ee1a1b4ce 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -125,14 +125,13 @@ namespace Movement if (args.flags.cyclic) { uint32 cyclic_point = 0; - // MoveSplineFlag::Enter_Cycle support dropped - //if (splineflags & SPLINEFLAG_ENTER_CYCLE) - //cyclic_point = 1; // shouldn't be modified, came from client - spline.init_cyclic_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()], cyclic_point); + if (splineflags.enter_cycle) + cyclic_point = 1; // shouldn't be modified, came from client + spline.init_cyclic_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()], cyclic_point, args.initialOrientation); } else { - spline.init_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()]); + spline.init_spline(&args.path[0], args.path.size(), modes[args.flags.isSmooth()], args.initialOrientation); } // init spline timestamps @@ -204,7 +203,7 @@ namespace Movement if (!(exp)) \ { \ if (unit) \ - LOG_ERROR("misc.movesplineinitargs", "MoveSplineInitArgs::Validate: expression '{}' failed for {}", #exp, unit->GetGUID().ToString()); \ + LOG_ERROR("misc.movesplineinitargs", "MoveSplineInitArgs::Validate: expression '{}' failed for GUID: {} Entry: {}", #exp, unit->GetGUID().ToString().c_str(), unit->GetEntry());\ else \ LOG_ERROR("misc.movesplineinitargs", "MoveSplineInitArgs::Validate: expression '{}' failed for cyclic spline continuation", #exp); \ return false;\ @@ -273,6 +272,41 @@ namespace Movement point_Idx = spline.first(); time_passed = time_passed % Duration(); result = Movement::MoveSpline::UpdateResult(Result_NextCycle | Result_JustArrived); + + // Remove first point from the path after one full cycle. + // That point was the position of the unit prior to entering the cycle and it shouldn't be repeated with continuous cycles. + if (splineflags.enter_cycle) + { + splineflags.enter_cycle = false; + + MoveSplineInitArgs args{ (size_t)spline.getPointCount() }; + args.path.assign(spline.getPoints().begin() + spline.first() + 1, spline.getPoints().begin() + spline.last()); + args.facing = facing; + args.flags = splineflags; + args.path_Idx_offset = point_Idx_offset; + // MoveSplineFlag::Parabolic | MoveSplineFlag::Animation not supported currently + //args.parabolic_amplitude = ?; + //args.time_perc = ?; + args.splineId = m_Id; + args.initialOrientation = initialOrientation; + args.velocity = 1.0f; // Calculated below + args.HasVelocity = true; + args.TransformForTransport = onTransport; + if (args.Validate(nullptr)) + { + // New cycle should preserve previous cycle's duration for some weird reason, even though + // the path is really different now. Blizzard is weird. Or this was just a simple oversight. + // Since our splines precalculate length with velocity in mind, if we want to find the desired + // velocity, we have to make a fake spline, calculate its duration and then compare it to the + // desired duration, thus finding out how much the velocity has to be increased for them to match. + MoveSpline tempSpline; + tempSpline.Initialize(args); + args.velocity = (float)tempSpline.Duration() / Duration(); + + if (args.Validate(nullptr)) + init_spline(args); + } + } } else { diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index faf6cd203de8e2..0696a24495d341 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -87,6 +87,7 @@ namespace Movement // corrent first vertex args.path[0] = real_position; args.initialOrientation = real_position.orientation; + args.flags.enter_cycle = args.flags.cyclic; move_spline.onTransport = transport; uint32 moveFlags = unit->m_movementInfo.GetMovementFlags(); diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp index b360c6b3dc292a..d9e31d5e763900 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp @@ -67,10 +67,6 @@ namespace Movement break; } - // add fake Enter_Cycle flag - needed for client-side cyclic movement (client will erase first spline vertex after first cycle done) - // Xinef: this flag breaks cycle for ground movement, client teleports npc between last and first point instead of using smooth movement - if (splineflags & MoveSplineFlag::Flying) - splineflags.enter_cycle = move_spline.isCyclic(); data << uint32(splineflags & uint32(~MoveSplineFlag::Mask_No_Monster_Move)); if (splineflags.animation) @@ -123,20 +119,11 @@ namespace Movement data.append(&spline.getPoint(2), count); } - void WriteCatmullRomCyclicPath(const Spline& spline, ByteBuffer& data, bool flying) + void WriteCatmullRomCyclicPath(const Spline& spline, ByteBuffer& data) { - uint32 count = spline.getPointCount() - 3; - data << uint32(count + 1); - if (flying) - { - data << spline.getPoint(1); // fake point, client will erase it from the spline after first cycle done - data.append(&spline.getPoint(2), count); - } - else - { - data.append(&spline.getPoint(2), count); - data << Vector3::zero(); //Xinef: fake point - } + uint32 count = spline.getPointCount() - 4; + data << count; + data.append(&spline.getPoint(2), count); } void PacketBuilder::WriteMonsterMove(const MoveSpline& move_spline, ByteBuffer& data) @@ -148,7 +135,7 @@ namespace Movement if (splineflags & MoveSplineFlag::Mask_CatmullRom) { if (splineflags.cyclic) - WriteCatmullRomCyclicPath(spline, data, splineflags & MoveSplineFlag::Flying); + WriteCatmullRomCyclicPath(spline, data); else WriteCatmullRomPath(spline, data); } @@ -199,4 +186,8 @@ namespace Movement data << (move_spline.isCyclic() ? Vector3::zero() : move_spline.FinalDestination()); } } + void PacketBuilder::WriteSplineSync(MoveSpline const& move_spline, ByteBuffer& data) + { + data << (float)move_spline.timePassed() / move_spline.Duration(); + } } diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h index 711eccc33e888e..2c577a492a6511 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.h +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h @@ -38,6 +38,7 @@ namespace Movement static void WriteMonsterMove(const MoveSpline& mov, ByteBuffer& data); static void WriteStopMovement(Vector3 const& loc, uint32 splineId, ByteBuffer& data); static void WriteCreate(const MoveSpline& mov, ByteBuffer& data); + static void WriteSplineSync(MoveSpline const& mov, ByteBuffer& data); }; } #endif // AC_PACKET_BUILDER_H diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp index 601951a20a9788..31bf6a6cb0b737 100644 --- a/src/server/game/Movement/Spline/Spline.cpp +++ b/src/server/game/Movement/Spline/Spline.cpp @@ -199,23 +199,25 @@ namespace Movement return length; } - void SplineBase::init_spline(const Vector3* controls, index_type count, EvaluationMode m) + void SplineBase::init_spline(const Vector3* controls, index_type count, EvaluationMode m, float orientation) { m_mode = m; cyclic = false; + initialOrientation = orientation; - (this->*initializers[m_mode])(controls, count, cyclic, 0); + (this->*initializers[m_mode])(controls, count, 0); } - void SplineBase::init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point) + void SplineBase::init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point, float orientation) { m_mode = m; cyclic = true; + initialOrientation = orientation; - (this->*initializers[m_mode])(controls, count, cyclic, cyclic_point); + (this->*initializers[m_mode])(controls, count, cyclic_point); } - void SplineBase::InitLinear(const Vector3* controls, index_type count, bool cyclic, index_type cyclic_point) + void SplineBase::InitLinear(const Vector3* controls, index_type count, index_type cyclic_point) { ASSERT(count >= 2); const int real_size = count + 1; @@ -235,7 +237,7 @@ namespace Movement index_hi = cyclic ? count : (count - 1); } - void SplineBase::InitCatmullRom(const Vector3* controls, index_type count, bool cyclic, index_type cyclic_point) + void SplineBase::InitCatmullRom(const Vector3* controls, index_type count, index_type cyclic_point) { const int real_size = count + (cyclic ? (1 + 2) : (1 + 1)); @@ -253,14 +255,14 @@ namespace Movement if (cyclic_point == 0) points[0] = controls[count - 1]; else - points[0] = controls[0].lerp(controls[1], -1); + points[0] = controls[0] - G3D::Vector3{ std::cos(initialOrientation), std::sin(initialOrientation), 0.0f }; points[high_index + 1] = controls[cyclic_point]; points[high_index + 2] = controls[cyclic_point + 1]; } else { - points[0] = controls[0].lerp(controls[1], -1); + points[0] = controls[0] - G3D::Vector3{ std::cos(initialOrientation), std::sin(initialOrientation), 0.0f }; points[high_index + 1] = controls[count - 1]; } @@ -268,7 +270,7 @@ namespace Movement index_hi = high_index + (cyclic ? 1 : 0); } - void SplineBase::InitBezier3(const Vector3* controls, index_type count, bool /*cyclic*/, index_type /*cyclic_point*/) + void SplineBase::InitBezier3(const Vector3* controls, index_type count, index_type /*cyclic_point*/) { index_type c = count / 3u * 3u; index_type t = c / 3u; diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h index d9d255f0a2dc4a..afefffe6249b00 100644 --- a/src/server/game/Movement/Spline/Spline.h +++ b/src/server/game/Movement/Spline/Spline.h @@ -48,6 +48,7 @@ namespace Movement uint8 m_mode{UninitializedMode}; bool cyclic{false}; + float initialOrientation; enum { @@ -77,15 +78,15 @@ namespace Movement typedef float (SplineBase::*SegLenghtMethtod)(index_type) const; static SegLenghtMethtod seglengths[ModesEnd]; - void InitLinear(const Vector3*, index_type, bool, index_type); - void InitCatmullRom(const Vector3*, index_type, bool, index_type); - void InitBezier3(const Vector3*, index_type, bool, index_type); - typedef void (SplineBase::*InitMethtod)(const Vector3*, index_type, bool, index_type); + void InitLinear(const Vector3*, index_type, index_type); + void InitCatmullRom(const Vector3*, index_type, index_type); + void InitBezier3(const Vector3*, index_type, index_type); + typedef void (SplineBase::*InitMethtod)(const Vector3*, index_type, index_type); static InitMethtod initializers[ModesEnd]; void UninitializedSplineEvaluationMethod(index_type, float, Vector3&) const { ABORT(); } - [[nodiscard]] float UninitializedSplineSegLenghtMethod(index_type) const { ABORT(); } - void UninitializedSplineInitMethod(Vector3 const*, index_type, bool, index_type) { ABORT(); } + [[nodiscard]] float UninitializedSplineSegLenghtMethod(index_type) const { ABORT(); return 0.0f; } + void UninitializedSplineInitMethod(Vector3 const*, index_type, index_type) { ABORT(); } public: explicit SplineBase() = default; @@ -116,8 +117,8 @@ namespace Movement [[nodiscard]] const Vector3& getPoint(index_type i) const { return points[i];} /** Initializes spline. Don't call other methods while spline not initialized. */ - void init_spline(const Vector3* controls, index_type count, EvaluationMode m); - void init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point); + void init_spline(const Vector3* controls, index_type count, EvaluationMode m, float orientation); + void init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point, float orientation); /** As i can see there are a lot of ways how spline can be initialized would be no harm to have some custom initializers. */ @@ -170,8 +171,8 @@ namespace Movement void computeIndex(float t, index_type& out_idx, float& out_u) const; /** Initializes spline. Don't call other methods while spline not initialized. */ - void init_spline(const Vector3* controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls, count, m);} - void init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls, count, m, cyclic_point);} + void init_spline(const Vector3* controls, index_type count, EvaluationMode m, float orientation = 0) { SplineBase::init_spline(controls, count, m, orientation);} + void init_cyclic_spline(const Vector3* controls, index_type count, EvaluationMode m, index_type cyclic_point, float orientation = 0) { SplineBase::init_cyclic_spline(controls, count, m, cyclic_point, orientation);} /** Initializes lengths with SplineBase::SegLength method. */ void initLengths(); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 431897eebcd84e..f8749091f46dbf 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2435,7 +2435,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo */ UnitList targets; - Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(target, target, target->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough + Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(target, target, target->GetVisibilityRange()); Acore::UnitListSearcher searcher(target, targets, u_check); Cell::VisitAllObjects(target, searcher, target->GetMap()->GetVisibilityRange()); for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 7080b5c8f3f8f7..da94ce4ede4458 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4048,7 +4048,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/) } UnitList targets; - Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough + Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); Acore::UnitListSearcher searcher(unitTarget, targets, u_check); Cell::VisitAllObjects(unitTarget, searcher, unitTarget->GetVisibilityRange()); for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter) @@ -4787,7 +4787,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/) WorldPacket data(SMSG_CLEAR_TARGET, 8); data << m_caster->GetGUID(); - float dist = m_caster->GetVisibilityRange() + VISIBILITY_COMPENSATION; + float dist = m_caster->GetVisibilityRange(); Acore::MessageDistDelivererToHostile notifier(m_caster, &data, dist); Cell::VisitWorldObjects(m_caster, notifier, dist); @@ -4812,7 +4812,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/) return; UnitList targets; - Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough + Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); Acore::UnitListSearcher searcher(m_caster, targets, u_check); Cell::VisitAllObjects(m_caster, searcher, m_caster->GetVisibilityRange()); for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index f41e523b890614..d301a1d2640a8b 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -44,7 +44,6 @@ #include "DBCStores.h" #include "DatabaseEnv.h" #include "DisableMgr.h" -#include "DynamicVisibility.h" #include "GameEventMgr.h" #include "GameGraveyard.h" #include "GameTime.h" @@ -2255,8 +2254,6 @@ void World::Update(uint32 diff) // Record update if recording set in log and diff is greater then minimum set in log sWorldUpdateTime.RecordUpdateTime(GameTime::GetGameTimeMS(), diff, GetActiveSessionCount()); - DynamicVisibilityMgr::Update(GetActiveSessionCount()); - ///- Update the different timers for (int i = 0; i < WUPDATE_COUNT; ++i) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 8ebc9569b02e74..f52225e7664eb2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -327,6 +327,7 @@ class boss_victor_nefarius : public CreatureScript if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianSpawn)) { nefarian->setActive(true); + nefarian->SetFarVisible(true); nefarian->SetCanFly(true); nefarian->SetDisableGravity(true); nefarian->GetMotionMaster()->MovePath(NEFARIAN_PATH, false); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index a8aac9757fde45..faddef61782f46 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -425,6 +425,7 @@ class instance_blackwing_lair : public InstanceMapScript { nefarius->SetPhaseMask(1, true); nefarius->setActive(true); + nefarius->SetFarVisible(true); nefarius->Respawn(); nefarius->GetMotionMaster()->MoveTargetedHome(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 72ef3e5dd3e3f8..71fd064502ef78 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -105,6 +105,7 @@ struct boss_nightbane : public BossAI me->SetDisableGravity(_intro); me->SetWalk(false); me->setActive(true); + me->SetFarVisible(true); if (instance) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 8d48baefaffa71..cc26b66c847f4c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -55,6 +55,7 @@ class npc_valkyr_battle_maiden : public CreatureScript void Reset() override { me->setActive(true); + me->SetFarVisible(true); me->SetVisible(false); me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); me->SetCanFly(true); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 42817e7950fe28..a309d4bc35237b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -347,6 +347,7 @@ void hyjalAI::Reset() { IsDummy = false; me->setActive(true); + me->SetFarVisible(true); // GUIDs PlayerGUID.Clear(); BossGUID[0].Clear(); @@ -493,6 +494,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3]) creature->SetWalk(false); creature->setActive(true); + creature->SetFarVisible(true); switch (entry) { case NECROMANCER: @@ -1021,6 +1023,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 3; ++i)//summon 3 abominations @@ -1033,6 +1036,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 5; ++i)//summon 5 gargoyles @@ -1045,6 +1049,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } break; @@ -1062,6 +1067,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls @@ -1074,6 +1080,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 5; ++i)//summon 5 abominations @@ -1086,6 +1093,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) CAST_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; CAST_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } break; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index ec44989251752e..8297d8904b6cde 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -389,6 +389,7 @@ class npc_xerestrasza : public CreatureScript if (action == ACTION_BALTHARUS_DEATH) { me->setActive(true); + me->SetFarVisible(true); _isIntro = false; _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_0, 6s); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 968fcba474b53b..d03ad2745d8163 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -339,6 +339,7 @@ class boss_sindragosa : public CreatureScript events.ScheduleEvent(EVENT_ICY_GRIP, 33s + 500ms, EVENT_GROUP_LAND_PHASE); me->setActive(true); + me->SetFarVisible(true); me->SetInCombatWithZone(); instance->SetBossState(DATA_SINDRAGOSA, IN_PROGRESS); @@ -377,6 +378,7 @@ class boss_sindragosa : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetDisableGravity(true); me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); me->SetSpeed(MOVE_RUN, 4.28571f); @@ -1407,6 +1409,7 @@ class npc_spinestalker : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetImmuneToPC(true); float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f); me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250)); @@ -1423,6 +1426,7 @@ class npc_spinestalker : public CreatureScript return; me->setActive(false); + me->SetFarVisible(false); me->SetDisableGravity(false); me->SetHomePosition(SpinestalkerLandPos); me->SetFacingTo(SpinestalkerLandPos.GetOrientation()); @@ -1538,6 +1542,7 @@ class npc_rimefang : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetImmuneToPC(true); float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f); me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, RimefangLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250)); @@ -1556,6 +1561,8 @@ class npc_rimefang : public CreatureScript if (point == POINT_FROSTWYRM_LAND) { me->setActive(false); + me->SetFarVisible(false); + me->SetFarVisible(false); me->SetDisableGravity(false); me->SetHomePosition(RimefangLandPos); me->SetFacingTo(RimefangLandPos.GetOrientation()); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 1f90c584ab439e..a8f48f95e409f8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -484,6 +484,7 @@ class boss_algalon_the_observer : public CreatureScript uint32 introDelay = 0; me->setActive(true); + me->SetFarVisible(true); me->SetInCombatWithZone(); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); me->SetImmuneToNPC(true); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 1ab35a6a11daba..745676de03d64b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -175,6 +175,7 @@ class boss_razorscale : public CreatureScript { me->SetDisableGravity(true); me->setActive(true); + me->SetFarVisible(true); Reset(); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index 1803f4dcc91651..b85c19216b1fdf 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -517,6 +517,7 @@ class boss_thorim : public CreatureScript if (m_pInstance && !_encounterFinished) m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS); me->setActive(true); + me->SetFarVisible(true); DisableThorim(true); me->CastSpell(me, SPELL_SHEATH_OF_LIGHTNING, true); //me->CastSpell(me, SPELL_TOUCH_OF_DOMINION, true);