From bb2f2daacbf812bcb5bd149a455c4eaaafaeef5d Mon Sep 17 00:00:00 2001 From: Foe Date: Thu, 23 Oct 2025 12:52:13 +0200 Subject: [PATCH 01/21] chore(Core/modules): necessary core changes for mod-eluna rename (#22962) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Francesco Borzì --- modules/CMakeLists.txt | 32 +++++++++---------- src/server/game/Entities/Object/Object.h | 4 +-- src/server/game/Maps/Map.cpp | 4 +-- .../{ElunaScript.cpp => ALEScript.cpp} | 8 ++--- .../{ElunaScript.h => ALEScript.h} | 8 ++--- .../ScriptDefines/AllScriptsObjects.h | 2 +- .../ScriptDefines/AreaTriggerScript.cpp | 4 +-- .../Scripting/ScriptDefines/WeatherScript.cpp | 4 +-- src/server/game/Scripting/ScriptMgr.cpp | 2 +- 9 files changed, 34 insertions(+), 34 deletions(-) rename src/server/game/Scripting/ScriptDefines/{ElunaScript.cpp => ALEScript.cpp} (80%) rename src/server/game/Scripting/ScriptDefines/{ElunaScript.h => ALEScript.h} (90%) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 6c631988e..13d123bf4 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -35,8 +35,8 @@ CU_GET_GLOBAL("AC_ADD_SCRIPTS_INCLUDE") set("AC_SCRIPTS_INCLUDES" "") set("AC_MODULE_LIST" "") set("AC_SCRIPTS_LIST" "") -set(MOD_ELUNA_FOUND 0) -set(MOD_ELUNA_PATH "") +set(MOD_ALE_FOUND 0) +set(MOD_ALE_PATH "") foreach(include ${AC_ADD_SCRIPTS_INCLUDE}) set("AC_SCRIPTS_INCLUDES" "#include \"${include}\"\n${AC_SCRIPTS_INCLUDES}") @@ -50,12 +50,12 @@ foreach(scriptName ${AC_ADD_SCRIPTS_LIST}) set("AC_SCRIPTS_LIST" " ${scriptName};\n${AC_SCRIPTS_LIST}") endforeach() -function(ConfigureElunaModule moduleName) - set(MOD_ELUNA_FOUND 1 PARENT_SCOPE) +function(ConfigureALEModule moduleName) + set(MOD_ALE_FOUND 1 PARENT_SCOPE) GetPathToModuleSource(${SOURCE_MODULE} MODULE_SOURCE_PATH) - set(MOD_ELUNA_PATH ${MODULE_SOURCE_PATH} PARENT_SCOPE) + set(MOD_ALE_PATH ${MODULE_SOURCE_PATH} PARENT_SCOPE) - # Define eluna compile options + # Define ALE compile options target_compile_options(game-interface INTERFACE -DAZEROTHCORE @@ -76,9 +76,9 @@ foreach(SOURCE_MODULE ${MODULES_MODULE_LIST}) set(${MODULE_MODULE_VARIABLE} "static") endif() - # Use only static for mod-eluna - if (SOURCE_MODULE MATCHES "mod-eluna") - ConfigureElunaModule(${SOURCE_MODULE}) + # Use only static for mod-ALE + if (SOURCE_MODULE MATCHES "mod-ale") + ConfigureALEModule(${SOURCE_MODULE}) endif() # Build the Graph values @@ -267,9 +267,9 @@ ConfigureScriptLoader("static" SCRIPT_MODULE_PRIVATE_SCRIPTLOADER OFF ${STATIC_S list(REMOVE_DUPLICATES SCRIPT_MODULE_PRIVATE_SCRIPTLOADER) -if (MOD_ELUNA_FOUND) - list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ELUNA_PATH}/lualib/lua.c) - list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ELUNA_PATH}/lualib/luac.c) +if (MOD_ALE_FOUND) + list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ALE_PATH}/lualib/lua.c) + list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ALE_PATH}/lualib/luac.c) endif() add_library(modules STATIC @@ -277,7 +277,7 @@ add_library(modules STATIC ${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER} ${PRIVATE_SOURCES_MODULES}) -if (MOD_ELUNA_FOUND) +if (MOD_ALE_FOUND) target_link_libraries(modules PUBLIC lualib) endif() @@ -358,7 +358,7 @@ target_compile_options(modules INTERFACE -DCONFIG_FILE_LIST=$<1:"${CONFIG_LIST}">) -if (MOD_ELUNA_FOUND) +if (MOD_ALE_FOUND) if (APPLE) target_compile_definitions(modules PUBLIC @@ -377,10 +377,10 @@ if (MOD_ELUNA_FOUND) add_custom_command(TARGET modules POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/" - COMMAND ${CMAKE_COMMAND} -E copy_directory "${MOD_ELUNA_PATH}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/") + COMMAND ${CMAKE_COMMAND} -E copy_directory "${MOD_ALE_PATH}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/") endif() - install(DIRECTORY "${MOD_ELUNA_PATH}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/") + install(DIRECTORY "${MOD_ALE_PATH}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/") endif() message("") diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 141a7cf73..0fd248d8a 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -41,7 +41,7 @@ #include "UpdateFields.h" -class ElunaEventProcessor; +class ALEEventProcessor; enum TempSummonType { @@ -727,7 +727,7 @@ public: ObjectVisibilityContainer const& GetObjectVisibilityContainer() const { return _objectVisibilityContainer; } // Event handler - ElunaEventProcessor* elunaEvents; + ALEEventProcessor* ALEEvents; EventProcessor m_Events; protected: diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 1aa7a3ee8..efcfd2f4f 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2118,7 +2118,7 @@ void InstanceMap::CreateInstanceScript(bool load, std::string data, uint32 compl if (instance_data) isOtherAI = true; - // if Eluna AI was fetched succesfully we should not call CreateInstanceData nor set the unused scriptID + // if ALE AI was fetched succesfully we should not call CreateInstanceData nor set the unused scriptID if (!isOtherAI) { InstanceTemplate const* mInstance = sObjectMgr->GetInstanceTemplate(GetId()); @@ -2132,7 +2132,7 @@ void InstanceMap::CreateInstanceScript(bool load, std::string data, uint32 compl if (!instance_data) return; - // use mangos behavior if we are dealing with Eluna AI + // use mangos behavior if we are dealing with ALE AI // initialize should then be called only if load is false if (!isOtherAI || !load) { diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp b/src/server/game/Scripting/ScriptDefines/ALEScript.cpp similarity index 80% rename from src/server/game/Scripting/ScriptDefines/ElunaScript.cpp rename to src/server/game/Scripting/ScriptDefines/ALEScript.cpp index fbaa7af76..5597a2be0 100644 --- a/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/ALEScript.cpp @@ -15,12 +15,12 @@ * with this program. If not, see . */ -#include "ElunaScript.h" +#include "ALEScript.h" #include "ScriptMgr.h" -ElunaScript::ElunaScript(const char* name) : ScriptObject(name) +ALEScript::ALEScript(const char* name) : ScriptObject(name) { - ScriptRegistry::AddScript(this); + ScriptRegistry::AddScript(this); } -template class AC_GAME_API ScriptRegistry; +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.h b/src/server/game/Scripting/ScriptDefines/ALEScript.h similarity index 90% rename from src/server/game/Scripting/ScriptDefines/ElunaScript.h rename to src/server/game/Scripting/ScriptDefines/ALEScript.h index da028a7ba..ce1f4a0f4 100644 --- a/src/server/game/Scripting/ScriptDefines/ElunaScript.h +++ b/src/server/game/Scripting/ScriptDefines/ALEScript.h @@ -15,15 +15,15 @@ * with this program. If not, see . */ -#ifndef SCRIPT_OBJECT_ELUNA_SCRIPT_H_ -#define SCRIPT_OBJECT_ELUNA_SCRIPT_H_ +#ifndef SCRIPT_OBJECT_ALE_SCRIPT_H_ +#define SCRIPT_OBJECT_ALE_SCRIPT_H_ #include "ScriptObject.h" -class ElunaScript : public ScriptObject +class ALEScript : public ScriptObject { protected: - ElunaScript(const char* name); + ALEScript(const char* name); public: /** diff --git a/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h index 9196c3284..085bde573 100644 --- a/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h +++ b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h @@ -39,7 +39,7 @@ #include "CreatureScript.h" #include "DatabaseScript.h" #include "DynamicObjectScript.h" -#include "ElunaScript.h" +#include "ALEScript.h" #include "FormulaScript.h" #include "GameEventScript.h" #include "GameObjectScript.h" diff --git a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp index 6d3429606..cb49812ab 100644 --- a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp @@ -16,7 +16,7 @@ */ #include "AreaTriggerScript.h" -#include "ElunaScript.h" +#include "ALEScript.h" #include "Player.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -26,7 +26,7 @@ bool ScriptMgr::OnAreaTrigger(Player* player, AreaTrigger const* trigger) ASSERT(player); ASSERT(trigger); - auto ret = IsValidBoolScript([&](ElunaScript* script) + auto ret = IsValidBoolScript([&](ALEScript* script) { return script->CanAreaTrigger(player, trigger); }); diff --git a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp index 5232ae0ca..e1929daab 100644 --- a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp @@ -16,7 +16,7 @@ */ #include "WeatherScript.h" -#include "ElunaScript.h" +#include "ALEScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -24,7 +24,7 @@ void ScriptMgr::OnWeatherChange(Weather* weather, WeatherState state, float grad { ASSERT(weather); - ExecuteScript([&](ElunaScript* script) + ExecuteScript([&](ALEScript* script) { script->OnWeatherChange(weather, state, grade); }); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 3a78145ca..2fc4b86b5 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -127,7 +127,7 @@ void ScriptMgr::Unload() SCR_CLEAR(); SCR_CLEAR(); SCR_CLEAR(); - SCR_CLEAR(); + SCR_CLEAR(); SCR_CLEAR(); SCR_CLEAR(); SCR_CLEAR(); From d074bb5264a464888018ab5db8f41d8709853bfc Mon Sep 17 00:00:00 2001 From: sogladev Date: Fri, 24 Oct 2025 08:41:53 +0200 Subject: [PATCH 02/21] fix(DB/SmartAI): update abilities of Anub'ar Webspinner (#23300) --- .../updates/pending_db_world/rev_1760816039178539787.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1760816039178539787.sql diff --git a/data/sql/updates/pending_db_world/rev_1760816039178539787.sql b/data/sql/updates/pending_db_world/rev_1760816039178539787.sql new file mode 100644 index 000000000..8dab4521d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1760816039178539787.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29335) 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`, `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 +(29335, 0, 0, 0, 0, 0, 100, 2, 2000, 5000, 6000, 8000, 0, 0, 11, 54290, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Webspinner - In Combat - Cast \'Web Shot\' (Normal Dungeon)'), +(29335, 0, 1, 0, 0, 0, 100, 4, 2000, 5000, 6000, 8000, 0, 0, 11, 59362, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Webspinner - In Combat - Cast \'Web Shot\' (Heroic Dungeon)'), +(29335, 0, 2, 0, 0, 0, 100, 6, 5000, 12000, 16000, 21000, 0, 0, 11, 52086, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Webspinner - In Combat - Cast \'Web Wrap\' (Dungeon)'); From 0779ece25275d9ca0a0cfb6a235479ea2df86fda Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 06:43:02 +0000 Subject: [PATCH 03/21] chore(DB): import pending files Referenced commit(s): d074bb5264a464888018ab5db8f41d8709853bfc --- .../rev_1760816039178539787.sql => db_world/2025_10_24_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1760816039178539787.sql => db_world/2025_10_24_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1760816039178539787.sql b/data/sql/updates/db_world/2025_10_24_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1760816039178539787.sql rename to data/sql/updates/db_world/2025_10_24_00.sql index 8dab4521d..e8f4660dc 100644 --- a/data/sql/updates/pending_db_world/rev_1760816039178539787.sql +++ b/data/sql/updates/db_world/2025_10_24_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_10_21_00 -> 2025_10_24_00 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29335) 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`, `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 a8d07b669d08e5be69adb22d1f5b80cede41a14d Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 24 Oct 2025 08:43:18 +0200 Subject: [PATCH 04/21] fix(Core/Scripts): Fix the wrong run in npc_escortAI (#23293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 天鹭 <18535853+PkllonG@users.noreply.github.com> --- .../game/AI/ScriptedAI/ScriptedCreature.cpp | 5 --- .../game/AI/ScriptedAI/ScriptedCreature.h | 2 -- src/server/game/AI/SmartScripts/SmartAI.cpp | 7 +++-- src/server/game/AI/SmartScripts/SmartAI.h | 1 + .../BlackrockDepths/blackrock_depths.cpp | 4 +++ .../EasternKingdoms/Karazhan/karazhan.cpp | 1 + .../ScarletEnclave/chapter1.cpp | 3 +- .../EasternKingdoms/zone_arathi_highlands.cpp | 5 +-- .../EasternKingdoms/zone_ghostlands.cpp | 3 +- .../EasternKingdoms/zone_hinterlands.cpp | 5 +-- .../zone_redridge_mountains.cpp | 3 +- .../zone_silverpine_forest.cpp | 3 ++ .../EasternKingdoms/zone_stormwind_city.cpp | 2 ++ .../EasternKingdoms/zone_undercity.cpp | 1 - .../scripts/EasternKingdoms/zone_westfall.cpp | 3 +- .../scripts/EasternKingdoms/zone_wetlands.cpp | 3 ++ .../culling_of_stratholme.cpp | 31 ++++++++++--------- .../EscapeFromDurnholdeKeep/old_hillsbrad.cpp | 18 +++++------ .../Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp | 1 - .../scripts/Kalimdor/zone_ashenvale.cpp | 3 +- .../scripts/Kalimdor/zone_azuremyst_isle.cpp | 5 +-- .../scripts/Kalimdor/zone_darkshore.cpp | 3 ++ src/server/scripts/Kalimdor/zone_desolace.cpp | 1 - .../scripts/Kalimdor/zone_moonglade.cpp | 1 + .../Kalimdor/zone_stonetalon_mountains.cpp | 3 ++ src/server/scripts/Kalimdor/zone_tanaris.cpp | 1 + .../scripts/Kalimdor/zone_the_barrens.cpp | 10 ++++-- .../Kalimdor/zone_thousand_needles.cpp | 6 ++++ .../scripts/Kalimdor/zone_ungoro_crater.cpp | 1 + .../scripts/Kalimdor/zone_winterspring.cpp | 3 ++ .../TrialOfTheChampion/boss_black_knight.cpp | 1 - .../boss_grand_champions.cpp | 1 - .../IcecrownCitadel/icecrown_citadel.cpp | 1 - .../HallsOfLightning/boss_bjarngrim.cpp | 1 + .../Ulduar/HallsOfStone/brann_bronzebeard.cpp | 2 -- .../Ulduar/Ulduar/boss_flame_leviathan.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_thorim.cpp | 2 -- .../Ulduar/Ulduar/boss_yoggsaron.cpp | 1 - .../Northrend/VioletHold/violet_hold.cpp | 2 -- .../scripts/Northrend/zone_borean_tundra.cpp | 7 +++-- .../scripts/Northrend/zone_howling_fjord.cpp | 15 ++++----- .../scripts/Northrend/zone_icecrown.cpp | 1 + .../scripts/Northrend/zone_sholazar_basin.cpp | 1 + .../scripts/Northrend/zone_storm_peaks.cpp | 2 -- .../Outland/zone_hellfire_peninsula.cpp | 6 +++- src/server/scripts/Outland/zone_nagrand.cpp | 6 ++-- .../scripts/Outland/zone_netherstorm.cpp | 3 +- .../scripts/Outland/zone_shattrath_city.cpp | 3 ++ .../scripts/Outland/zone_terokkar_forest.cpp | 1 + 49 files changed, 120 insertions(+), 75 deletions(-) diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index bbef2c4a7..7a009d0ae 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -552,11 +552,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO } } -void ScriptedAI::SetRun(bool run) -{ - me->SetWalk(!run); -} - enum eNPCs { NPC_BROODLORD = 12017, diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index d3a13f300..c5c71af9f 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -227,8 +227,6 @@ struct ScriptedAI : public CreatureAI // Called when AI is temporarily replaced or put back when possess is applied or removed void OnPossess(bool /*apply*/) {} - void SetRun(bool run); - enum class Axis { AXIS_X, diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index b9a78c6d9..08ea86b8c 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -49,6 +49,8 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c) mForcedPaused = false; + mForcedMovement = FORCED_MOVEMENT_NONE; + mEscortQuestID = 0; mDespawnTime = 0; @@ -205,6 +207,7 @@ void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, { AddEscortState(SMART_ESCORT_ESCORTING); mCanRepeatPath = repeat; + mForcedMovement = forcedMovement; if (invoker && invoker->IsPlayer()) { @@ -215,7 +218,7 @@ void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, Movement::PointsArray pathPoints; GenerateWayPointArray(&pathPoints); - me->GetMotionMaster()->MoveSplinePath(&pathPoints, forcedMovement); + me->GetMotionMaster()->MoveSplinePath(&pathPoints, mForcedMovement); GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId()); } } @@ -373,7 +376,7 @@ void SmartAI::ResumePath() Movement::PointsArray pathPoints; GenerateWayPointArray(&pathPoints); - me->GetMotionMaster()->MoveSplinePath(&pathPoints); + me->GetMotionMaster()->MoveSplinePath(&pathPoints, mForcedMovement); } } diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index d8ac699dc..6233e2589 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -241,6 +241,7 @@ private: bool mCanAutoAttack; bool mForcedPaused; uint32 mInvincibilityHpLevel; + ForcedMovement mForcedMovement; bool AssistPlayerInCombatAgainst(Unit* who); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index d95e3b124..6d4c64c1d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -359,6 +359,7 @@ public: case 0: Talk(SAY_TEXT5); HandleGameObject(DATA_ARENA4, false); + me->SetWalk(true); Start(false); eventTimer = 0; break; @@ -604,7 +605,10 @@ public: creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false); if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI())) + { + creature->SetWalk(true); escortAI->Start(false); + } } } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index dcb58c365..84bd98bc6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -170,6 +170,7 @@ public: if (m_uiEventId == EVENT_OZ) instance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS); + me->SetWalk(true); Start(false); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index eebdc7b9f..d722cda01 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -980,6 +980,7 @@ public: { carGUID = who->GetVehicleBase()->GetGUID(); InitWaypoint(); + me->SetWalk(true); Start(false, who->GetGUID()); SetDespawnAtFar(false); } @@ -998,7 +999,7 @@ public: car->SetFaction(FACTION_FRIENDLY); } Talk(SAY_SCARLET_MINER_0); - SetRun(true); + me->SetWalk(false); IntroTimer = 4000; IntroPhase = 1; break; diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp index a7162ffc8..dea0884b7 100644 --- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp @@ -78,7 +78,7 @@ public: break; case 11: Talk(SAY_PROGRESS_6, player); - SetRun(true); + me->SetWalk(false); break; case 19: Talk(SAY_PROGRESS_7, player); @@ -106,7 +106,8 @@ public: if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE) { Talk(SAY_PROGRESS_1, player); - npc_escortAI::Start(false, player->GetGUID(), quest); + me->SetWalk(true); + Start(false, player->GetGUID(), quest); me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); } } diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index 09eaaed42..1ed0f1f03 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -113,7 +113,8 @@ struct npc_ranger_lilatha : public npc_escortAI if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS) { me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); - npc_escortAI::Start(true, player->GetGUID()); + me->SetWalk(true); + Start(true, player->GetGUID()); } } }; diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index dc1326932..f48aa5c06 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -132,7 +132,8 @@ public: if (GameObject* go = me->FindNearestGameObject(GO_RINJI_CAGE, INTERACTION_DISTANCE)) go->UseDoorOrButton(); - npc_escortAI::Start(false, player->GetGUID(), quest); + me->SetWalk(true); + Start(false, player->GetGUID(), quest); } } @@ -156,7 +157,7 @@ public: case 17: Talk(SAY_RIN_COMPLETE, player); player->GroupEventHappens(QUEST_RINJI_TRAPPED, me); - SetRun(true); + me->SetWalk(false); postEventCount = 1; break; } diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index b0783d371..f176916a7 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -61,7 +61,8 @@ public: if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION) { Talk(SAY_CORPORAL_1, player); - npc_escortAI::Start(true, player->GetGUID(), quest); + me->SetWalk(true); + Start(true, player->GetGUID(), quest); me->SetImmuneToNPC(false); me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE); } diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 12f120398..6ab4e712c 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -111,7 +111,10 @@ public: creature->AI()->Talk(SAY_QUESTACCEPT, player); if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(true, player->GetGUID()); + } } return true; diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index d8203ed9f..6adf8cdf1 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -406,6 +406,7 @@ public: { if (Player* player = GetPlayerForEscort()) { + pLescovar->SetWalk(true); CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, player->GetGUID()); CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f); } @@ -448,6 +449,7 @@ public: { if (Creature* pSpybot = creature->FindNearestCreature(NPC_TYRION_SPYBOT, 5.0f, true)) { + pSpybot->SetWalk(true); CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->Start(false, player->GetGUID()); CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->SetMaxPlayerDistance(200.0f); } diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index ad627959f..9ff724ee5 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -916,7 +916,6 @@ public: if (auto ai = CAST_AI(npc_varian_wrynn::npc_varian_wrynnAI, creature->AI())) { - creature->SetWalk(false); ai->Start(true, player->GetGUID()); if (Creature* jaina = GetClosestCreatureWithEntry(creature, NPC_JAINA, 50.0f)) ai->jainaGUID = jaina->GetGUID(); diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp index fe7125376..de9afc5af 100644 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp @@ -56,7 +56,6 @@ public: if (quest->GetQuestId() == QUEST_TOME_VALOR) { creature->AI()->Talk(SAY_DS_START); - creature->SetWalk(false); if (npc_escortAI* pEscortAI = CAST_AI(npc_daphne_stilwell::npc_daphne_stilwellAI, creature->AI())) pEscortAI->Start(true, player->GetGUID()); } @@ -117,7 +116,7 @@ public: me->SummonCreature(NPC_DEFIAS_RAIDER, -11438.14f, 1607.6f, 70.94f, 4.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; case 10: - SetRun(false); + me->SetWalk(true); break; case 11: Talk(SAY_DS_PROLOGUE); diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp index 97efd21c6..054e17043 100644 --- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp @@ -138,7 +138,10 @@ public: pSlim->CastSpell(pSlim, SPELL_STEALTH, true); if (npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI* pEscortAI = CAST_AI(npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI, pSlim->AI())) + { + pSlim->SetWalk(true); pEscortAI->Start(false, player->GetGUID(), quest); + } } return false; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index cd5818bfe..cdc65fce3 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -424,7 +424,7 @@ public: { Talk(SAY_PHASE201); actionEvents.ScheduleEvent(EVENT_ACTION_PHASE2, 12s); - SetRun(false); + me->SetWalk(true); eventInRun = true; me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_TOWN_CITYMAN1]); @@ -434,14 +434,14 @@ public: { waveGroupId = 10; eventInRun = true; - SetRun(true); + me->SetWalk(false); actionEvents.ScheduleEvent(EVENT_ACTION_PHASE2 + 9, 10s); } else if (param == ACTION_START_TOWN_HALL) { Talk(SAY_PHASE301); SetEscortPaused(false); - SetRun(false); + me->SetWalk(true); if (Creature* cr = me->SummonCreature(NPC_CITY_MAN3, EventPos[EVENT_SRC_HALL_CITYMAN1])) { @@ -460,13 +460,13 @@ public: { Talk(SAY_PHASE401); SetEscortPaused(false); - SetRun(false); + me->SetWalk(true); } else if (param == ACTION_START_LAST_CITY) { Talk(SAY_PHASE404); SetEscortPaused(false); - SetRun(true); + me->SetWalk(false); } else if (param == ACTION_START_MALGANIS) { @@ -480,7 +480,7 @@ public: } Talk(SAY_PHASE501); SetEscortPaused(false); - SetRun(true); + me->SetWalk(false); } else if (param == ACTION_KILLED_MALGANIS) { @@ -533,7 +533,7 @@ public: break; // After intro, in front of bridge case 3: - SetRun(true); + me->SetWalk(false); Talk(SAY_PHASE118); summons.DespawnAll(); // uther, jaina and horses break; @@ -574,7 +574,7 @@ public: if (pInstance) pInstance->SetData(DATA_ARTHAS_EVENT, COS_PROGRESS_REACHED_TOWN_HALL); me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); - SetRun(false); + me->SetWalk(true); SetEscortPaused(true); break; // Inside Town Hall first scene pos @@ -600,7 +600,7 @@ public: break; // Town Hall, upper floor third fight case 31: - SetRun(false); + me->SetWalk(true); SpawnTimeRift(); SpawnTimeRift(); Talk(SAY_PHASE312); @@ -616,14 +616,14 @@ public: break; // Reached book shelf case 36: - SetRun(true); + me->SetWalk(false); if (pInstance) if (GameObject* pGate = pInstance->instance->GetGameObject(pInstance->GetGuidData(DATA_SHKAF_GATE))) pGate->SetGoState(GO_STATE_ACTIVE); break; // Behind secred passage case 45: - SetRun(true); + me->SetWalk(false); me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); SetEscortPaused(true); if (pInstance) @@ -631,11 +631,11 @@ public: break; // Some walk talk case 47: - SetRun(false); + me->SetWalk(true); Talk(SAY_PHASE405); break; case 48: - SetRun(true); + me->SetWalk(false); Talk(SAY_PHASE406); break; case 53: @@ -674,7 +674,7 @@ public: switch (uint32 currentEvent = actionEvents.ExecuteEvent()) { case EVENT_ACTION_PHASE1: - SetRun(false); + me->SetWalk(true); me->SummonCreature(NPC_JAINA, EventPos[EVENT_SRC_JAINA], TEMPSUMMON_DEAD_DESPAWN, 180000); if (Creature* uther = me->SummonCreature(NPC_UTHER, EventPos[EVENT_SRC_UTHER], TEMPSUMMON_DEAD_DESPAWN, 180000)) { @@ -690,6 +690,7 @@ public: break; case EVENT_ACTION_PHASE1+1: // Start Event + me->SetWalk(true); Start(true); SetDespawnAtEnd(false); SetDespawnAtFar(false); @@ -958,7 +959,7 @@ public: break; // After waypoint 23 case EVENT_ACTION_PHASE3+3: - SetRun(true); + me->SetWalk(false); if (Creature* cr = GetEventNpc(NPC_CITY_MAN3)) me->CastSpell(cr, SPELL_ARTHAS_CRUSADER_STRIKE, true); ScheduleNextEvent(currentEvent, 2s); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 141fe70d8..1f15ef140 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -316,12 +316,12 @@ public: events.ScheduleEvent(EVENT_THRALL_EMOTE, 1300ms); break; case 9: - SetRun(false); + me->SetWalk(true); events.ScheduleEvent(EVENT_KILL_ARMORER, 500ms); events.ScheduleEvent(EVENT_TALK_KILL_ARMORER, 3s); break; case 10: - SetRun(true); + me->SetWalk(false); events.ScheduleEvent(EVENT_DRESSING_KNEEL, 500ms); events.ScheduleEvent(EVENT_DRESSING_ARMOR, 3s); events.ScheduleEvent(EVENT_DRESSING_STAND, 4s); @@ -374,7 +374,7 @@ public: } UnMountSelf(); _mounted = false; - SetRun(false); + me->SetWalk(true); me->SetFacingTo(6.0388f); break; case 60: @@ -386,12 +386,12 @@ public: } Talk(SAY_EMOTE_HORSE); SetEscortPaused(true); - SetRun(true); + me->SetWalk(false); me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); me->SetFacingTo(4.1364f); break; case 64: - SetRun(false); + me->SetWalk(true); break; case 67: events.ScheduleEvent(EVENT_LOOK_1, 1200ms); @@ -418,12 +418,12 @@ public: summon->AI()->Talk(SAY_LOOKOUT_INN); break; case 92: - SetRun(false); + me->SetWalk(true); break; case 94: summons.DespawnAll(); SetEscortPaused(true); - SetRun(true); + me->SetWalk(false); instance->SetData(DATA_ESCORT_PROGRESS, ENCOUNTER_PROGRESS_TARETHA_MEET); if (Creature* Taretha = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_TARETHA_GUID))) { @@ -664,7 +664,7 @@ public: me->SetFacingTo(2.0071f); break; case EVENT_SUMMON_GUARDS: - SetRun(true); + me->SetWalk(false); me->SummonCreature(NPC_TM_PROTECTOR, 2501.5708f, 699.38086f, 55.64138f, 3.8571f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS); me->SummonCreature(NPC_TM_LOOKOUT, 2500.7002f, 698.26746f, 55.618248f, 3.7350f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS); if (Creature* guardsman = me->SummonCreature(NPC_TM_GUARDSMAN, 2500.0908f, 699.9389f, 55.629555f, 4.2935f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS)) @@ -1018,7 +1018,7 @@ public: { if (waypointId == 7) { - SetRun(false); + me->SetWalk(true); Talk(SAY_TARETHA_FREE); me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER); if (Creature* thrall = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_THRALL_GUID))) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index 21e505b3d..fb921d71e 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -209,7 +209,6 @@ struct npc_general_andorov : public npc_escortAI _initialAttackTimer = 5 * IN_MILLISECONDS; _paused = false; - me->SetWalk(false); Start(false); me->SetImmuneToNPC(true); diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index c4d2c80a6..d11c83778 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -121,7 +121,8 @@ public: { Talk(SAY_MUG_START1); me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); - npc_escortAI::Start(true, player->GetGUID()); + me->SetWalk(true); + Start(true, player->GetGUID()); } } diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index b2f46e194..41c22086e 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -258,7 +258,7 @@ public: case 28: player->GroupEventHappens(QUEST_A_CRY_FOR_HELP, me); _events.ScheduleEvent(EVENT_TALK_END, 2s); - SetRun(true); + me->SetWalk(false); break; case 29: if (Creature* cowlen = me->FindNearestCreature(NPC_COWLEN, 50.0f, true)) @@ -289,7 +289,8 @@ public: case EVENT_START_ESCORT: if (Player* player = ObjectAccessor::GetPlayer(*me, _player)) { - npc_escortAI::Start(true, player->GetGUID()); + me->SetWalk(true); + Start(true, player->GetGUID()); } _events.ScheduleEvent(EVENT_STAND, 2s); break; diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index 02b0ae885..a9e76721e 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -397,7 +397,10 @@ public: if (quest->GetQuestId() == QUEST_ABSENT_MINDED_PT2) { if (npc_escortAI* pEscortAI = CAST_AI(npc_prospector_remtravel::npc_prospector_remtravelAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID()); + } creature->SetFaction(FACTION_ESCORTEE_A_NEUTRAL_PASSIVE); } diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index c6a6ecd93..3b65c2aa1 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -396,7 +396,6 @@ public: case EVENT_RESTART_ESCORT: CheckCaravan(); SetDespawnAtEnd(false); - SetRun(true); Start(true, ObjectGuid::Empty, 0, false, false, true); break; } diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp index 8ef469fe1..a91261929 100644 --- a/src/server/scripts/Kalimdor/zone_moonglade.cpp +++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp @@ -384,6 +384,7 @@ public: AddWaypoint(i, Clintar_spirit_WP[i][0], Clintar_spirit_WP[i][1], Clintar_spirit_WP[i][2], (uint32)Clintar_spirit_WP[i][4]); } PlayerGUID = player->GetGUID(); + me->SetWalk(true); Start(true, PlayerGUID); } return; diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp index e84655243..238c12efe 100644 --- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp @@ -137,7 +137,10 @@ public: if (quest->GetQuestId() == QUEST_PROTECT_KAYA) { if (npc_escortAI* pEscortAI = CAST_AI(npc_kaya_flathoof::npc_kaya_flathoofAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(true, player->GetGUID()); + } creature->AI()->Talk(SAY_START); creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index bf080107b..ec4912fb6 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -260,6 +260,7 @@ public: float Radius = 10.0f; if (me->IsWithinDistInMap(who, Radius)) { + me->SetWalk(true); Start(false, who->GetGUID()); } } diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 984180386..9ace889ba 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -55,7 +55,10 @@ public: creature->AI()->Talk(SAY_GIL_START, player); if (npc_giltharesAI* pEscortAI = CAST_AI(npc_gilthares::npc_giltharesAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID(), quest); + } } return true; } @@ -499,7 +502,7 @@ public: Talk(SAY_STARTUP1); break; case 9: - SetRun(false); + me->SetWalk(true); break; case 17: if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) @@ -528,7 +531,7 @@ public: break; case 18: Talk(SAY_PROGRESS_1, player); - SetRun(true); + me->SetWalk(false); break; } } @@ -594,7 +597,10 @@ public: creature->SetFaction(FACTION_RATCHET); creature->AI()->Talk(SAY_START); if (npc_escortAI* pEscortAI = CAST_AI(npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(true, player->GetGUID()); + } } return true; } diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp index 5a3de8eda..ee2efa9b6 100644 --- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp @@ -66,7 +66,10 @@ public: creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); //guessed if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID(), quest); + } } return true; } @@ -148,7 +151,10 @@ public: creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); // guessed if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID(), quest); + } } return true; } diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp index 4ccf3b6b3..83484446a 100644 --- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp @@ -48,6 +48,7 @@ public: { if (quest->GetQuestId() == QUEST_CHASING_AME) { + creature->SetWalk(true); CAST_AI(npc_escortAI, (creature->AI()))->Start(false, player->GetGUID()); creature->AI()->Talk(SAY_READY, player); creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index 4339da183..26d9d5737 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -286,7 +286,10 @@ public: creature->SetFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); if (npc_ranshallaAI* escortAI = dynamic_cast(creature->AI())) + { + creature->SetWalk(true); escortAI->Start(false, player->GetGUID(), quest); + } return true; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index 497b0c42d..de6fa8cf4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -339,7 +339,6 @@ public: void Reset() override { - me->SetWalk(false); Start(false, ObjectGuid::Empty, nullptr); SetDespawnAtEnd(true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 7262a5528..a4d0d00d8 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -549,7 +549,6 @@ public: return; } - me->SetWalk(false); Start(false); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 5af60575c..4c08dabec 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -934,7 +934,6 @@ public: case EVENT_START_PATHING: me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); me->SetImmuneToAll(false); - me->SetWalk(false); Start(true); break; case EVENT_SCOURGE_STRIKE: diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index 961fe3db9..b78a8f93a 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -128,6 +128,7 @@ struct boss_bjarngrim : public npc_escortAI AddWaypoint(13, 1281.2f, -26.8f, 33.5f, 0); AddWaypoint(14, 1262, -26.9f, 33.5f, 0); + me->SetWalk(true); Start(true, ObjectGuid::Empty, nullptr, false, true); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp index 809245c98..ebfe6f455 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp @@ -391,7 +391,6 @@ public: switch (action) { case ACTION_START_ESCORT_EVENT: - me->SetWalk(false); Start(false, ObjectGuid::Empty, 0, true, false); Talk(SAY_BRANN_ESCORT_START); me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); @@ -457,7 +456,6 @@ public: door->SetGoState(GO_STATE_READY); break; case ACTION_OPEN_DOOR: - me->SetWalk(false); Start(false, ObjectGuid::Empty, 0, true, false); SetNextWaypoint(34, false); SetEscortPaused(false); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 07e1ac92f..18ef70ed8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -1089,6 +1089,7 @@ public: { summons.DespawnAll(); _spellTimer = 0; + me->SetWalk(true); Start(false, ObjectGuid::Empty, nullptr, false, true); if (Aura* aur = me->AddAura(SPELL_FREYA_DUMMY_YELLOW, me)) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index 006798aeb..5d4c85aeb 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -934,7 +934,6 @@ public: { InitWaypoint(); Reset(); - me->SetWalk(false); Start(false); } @@ -1021,7 +1020,6 @@ public: { InitWaypoint(); Reset(); - me->SetWalk(false); Start(false); SetDespawnAtEnd(false); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index c26a9ff05..a00b6d120 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -937,7 +937,6 @@ public: { InitWaypoint(); Reset(); - me->SetWalk(false); Start(false, ObjectGuid::Empty, nullptr, false, true); } diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 3489764e9..6ab9a4f93 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -372,7 +372,6 @@ struct violet_hold_trashAI : public npc_escortAI break; } SetDespawnAtEnd(false); - me->SetWalk(false); Start(true); } @@ -1112,7 +1111,6 @@ public: break; } SetDespawnAtEnd(false); - me->SetWalk(false); Start(true); } diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 21f81d4ef..3546a3c7a 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -464,7 +464,10 @@ public: go->UseDoorOrButton(); if (npc_escortAI* pEscortAI = CAST_AI(npc_lurgglbr::npc_lurgglbrAI, creature->AI())) + { + creature->SetWalk(true); pEscortAI->Start(true, player->GetGUID()); + } creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE); return true; @@ -914,6 +917,7 @@ public: creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE); creature->SetStandState(UNIT_STAND_STATE_STAND); creature->AI()->Talk(SAY_1, player); + creature->SetWalk(true); CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID()); } return true; @@ -959,7 +963,7 @@ public: Talk(SAY_5); me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me); - SetRun(true); + me->SetWalk(false); break; } } @@ -995,7 +999,6 @@ public: { creature->SetStandState(UNIT_STAND_STATE_STAND); creature->AI()->Talk(SAY_BONKER_2, player); - creature->SetWalk(false); CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID()); } return true; diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index fcd725290..ef005b615 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -191,6 +191,7 @@ public: if (quest->GetQuestId() == QUEST_TRAIL_OF_FIRE) { creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE); + creature->SetWalk(true); CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID()); } return true; @@ -238,7 +239,7 @@ public: { case 1: me->SetReactState(REACT_AGGRESSIVE); - SetRun(true); + me->SetWalk(false); break; case 23: player->GroupEventHappens(QUEST_TRAIL_OF_FIRE, me); @@ -247,32 +248,32 @@ public: case 5: if (Unit* Trigger = me->FindNearestCreature(NPC_HANES_FIRE_TRIGGER, 10.0f)) Trigger->CastSpell(Trigger, SPELL_COSMETIC_LOW_POLY_FIRE, false); - SetRun(false); + me->SetWalk(true); break; case 6: if (Unit* Trigger = me->FindNearestCreature(NPC_HANES_FIRE_TRIGGER, 10.0f)) Trigger->CastSpell(Trigger, SPELL_COSMETIC_LOW_POLY_FIRE, false); - SetRun(true); + me->SetWalk(false); break; case 8: if (Unit* Trigger = me->FindNearestCreature(NPC_HANES_FIRE_TRIGGER, 10.0f)) Trigger->CastSpell(Trigger, SPELL_COSMETIC_LOW_POLY_FIRE, false); - SetRun(false); + me->SetWalk(true); break; case 9: if (Unit* Trigger = me->FindNearestCreature(NPC_HANES_FIRE_TRIGGER, 10.0f)) Trigger->CastSpell(Trigger, SPELL_COSMETIC_LOW_POLY_FIRE, false); break; case 10: - SetRun(true); + me->SetWalk(false); break; case 13: - SetRun(false); + me->SetWalk(true); break; case 14: if (Unit* Trigger = me->FindNearestCreature(NPC_HANES_FIRE_TRIGGER, 10.0f)) Trigger->CastSpell(Trigger, SPELL_COSMETIC_LOW_POLY_FIRE, false); - SetRun(true); + me->SetWalk(false); break; } } diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 3a23551cf..be6e2f32c 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -715,6 +715,7 @@ public: Talk(0); events.Reset(); summons.DespawnAll(); + me->SetWalk(true); Start(false); int8 i = -1; diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 07bdfc2e9..f60a3b5f4 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -605,6 +605,7 @@ public: creature->GetMotionMaster()->MoveJumpTo(0, 0.4f, 0.4f); creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID()); creature->AI()->Talk(SAY_WP_1); } diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 559c8e823..9b5d5ad50 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -57,7 +57,6 @@ struct npc_frosthound : public npc_escortAI { me->SetFaction(who->GetFaction()); me->CastSpell(me, SPELL_SUMMON_PURSUERS_PERIODIC, true); - me->SetWalk(false); Start(false, who->GetGUID()); Talk(TALK_EMOTE_FROSTHOUND_SNIFF, me); } @@ -247,7 +246,6 @@ public: void RollPath() { me->SetEntry(NPC_TIME_LOST_PROTO_DRAKE); - me->SetWalk(false); Start(true, ObjectGuid::Empty, 0, false, true, true); SetNextWaypoint(urand(0, 250), true); me->UpdateEntry(roll_chance_i(25) ? NPC_TIME_LOST_PROTO_DRAKE : NPC_VYRAGOSA, 0, false); diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 9438aa808..e9457b0e0 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -171,7 +171,10 @@ public: npc_ancestral_wolfAI(Creature* creature) : npc_escortAI(creature) { if (creature->GetOwner() && creature->GetOwner()->IsPlayer()) + { + creature->SetWalk(true); Start(false, creature->GetOwner()->GetGUID()); + } creature->SetSpeed(MOVE_WALK, 1.5f); DoCast(SPELL_GUIDED_BY_THE_SPIRITS); Reset(); @@ -312,7 +315,8 @@ public: { me->SetReactState(REACT_AGGRESSIVE); me->SetFaction(FACTION_ESCORTEE_H_PASSIVE); - npc_escortAI::Start(true, player->GetGUID()); + me->SetWalk(true); + Start(true, player->GetGUID()); } } diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 87051cbc5..5d815569b 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -65,6 +65,7 @@ public: { creature->SetStandState(UNIT_STAND_STATE_STAND); creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); + creature->SetWalk(true); EscortAI->Start(true, player->GetGUID(), quest); creature->AI()->Talk(SAY_MAG_START); @@ -133,7 +134,7 @@ public: if (Player* player = GetPlayerForEscort()) player->GroupEventHappens(QUEST_TOTEM_KARDASH_H, me); - SetRun(true); + me->SetWalk(false); break; } } @@ -306,6 +307,7 @@ public: void SetGUID(ObjectGuid const& guid, int32 /*questId*/) override { me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetWalk(true); Start(true, guid); Talk(SAY_KUR_START); @@ -361,7 +363,7 @@ public: if (Player* player = GetPlayerForEscort()) player->GroupEventHappens(QUEST_TOTEM_KARDASH_A, me); - SetRun(true); + me->SetWalk(false); break; } } diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index d53cf6c33..cc4f68aa2 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -103,7 +103,6 @@ public: { if (type == DATA_START_ENCOUNTER) { - me->SetWalk(false); Start(true, playerGUID); SetEscortPaused(true); started = true; @@ -606,6 +605,7 @@ public: creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); creature->AI()->Talk(SAY_BESSY_0); + creature->SetWalk(true); CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID()); } return true; @@ -772,6 +772,7 @@ public: if (npc_maxx_a_million_escortAI* pEscortAI = CAST_AI(npc_maxx_a_million_escort::npc_maxx_a_million_escortAI, creature->AI())) { creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); + creature->SetWalk(true); pEscortAI->Start(false, player->GetGUID()); } } diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index 045e4cfb7..d4e29509d 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -246,7 +246,10 @@ public: Player* player = summoner->ToPlayer(); if (player && player->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE) + { + me->SetWalk(true); Start(false, summoner->GetGUID()); + } } void Reset() override { } diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index ba19c737e..38cb0214b 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -473,6 +473,7 @@ public: { if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A) { + creature->SetWalk(true); CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID()); creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE); } From 6208acd5e558b74726b25726b6f6e803bdfff10a Mon Sep 17 00:00:00 2001 From: sogladev Date: Fri, 24 Oct 2025 08:52:38 +0200 Subject: [PATCH 05/21] fix(DB/SmartAI): Zul'Drak Drakuramas mid to top teleporter (#23317) --- .../rev_1760911748480693596.sql | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1760911748480693596.sql diff --git a/data/sql/updates/pending_db_world/rev_1760911748480693596.sql b/data/sql/updates/pending_db_world/rev_1760911748480693596.sql new file mode 100644 index 000000000..a482deba0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1760911748480693596.sql @@ -0,0 +1,33 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = -114830) 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`, `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 +(-114830, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 11, 52239, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakuramas Teleport Bunny 01 - On Data Set 1 1 - Cast \'Drakuramas Teleport Script 02\''); + +DELETE FROM `areatrigger_scripts` WHERE `entry` = 5079; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(5079, 'SmartTrigger'); + +DELETE FROM `areatrigger_teleport` WHERE `ID` = 5079; +INSERT INTO `areatrigger_teleport` (`ID`, `Name`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(5079, 'Zul''drak - Voltarus, middle floor -> top', 571, 6242.67, -1972.10, 484.783, 0.6); + +DELETE FROM `spell_target_position` WHERE `ID` = 52240; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES +(52240, 0, 571, 6242.67, -1972.10, 484.783, 0.6, 0); + +DELETE FROM `areatrigger_scripts` WHERE `entry` = 5079; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (5079, 'SmartTrigger'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 2 AND `entryorguid` = 5079); +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 +(5079, 2, 0, 0, 46, 0, 100, 0, 5079, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 114830, 28617, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Set Data 1 1'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 52239) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 4) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 52239, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Spell only hits player'); + +UPDATE `creature` SET `Comment` = 'GUID SAI' WHERE (`id1` = 28617) AND (`guid` = 114830); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 52239; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(52239, 52240, 1, 'Teleport'); From f3931c0a33282a405a123dfa07103fc58084b9f9 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 24 Oct 2025 03:53:40 -0300 Subject: [PATCH 06/21] fix(Scripts/Gundrak): Update Galdarah script (#23206) --- .../rev_1760732509449091300.sql | 2 + .../Northrend/Gundrak/boss_gal_darah.cpp | 255 +++++++----------- .../scripts/Northrend/Gundrak/gundrak.h | 2 + 3 files changed, 105 insertions(+), 154 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1760732509449091300.sql diff --git a/data/sql/updates/pending_db_world/rev_1760732509449091300.sql b/data/sql/updates/pending_db_world/rev_1760732509449091300.sql new file mode 100644 index 000000000..b19c22111 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1760732509449091300.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|2147483648 WHERE `entry` IN (29306, 31368); diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index 492ceb008..50f1e5919 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -49,175 +49,124 @@ enum Yells enum Events { - EVENT_STAMPEDE = 1, - EVENT_WHIRLING_SLASH = 2, - EVENT_PUNCTURE = 3, - EVENT_ENRAGE = 4, - EVENT_IMPALING_CHARGE = 5, - EVENT_UNSUMMON_RHINO = 6, - EVENT_STOMP = 7, - EVENT_KILL_TALK = 8 + EVENT_KILL_TALK = 1 }; -class boss_gal_darah : public CreatureScript +struct boss_gal_darah : public BossAI { -public: - boss_gal_darah() : CreatureScript("boss_gal_darah") { } + boss_gal_darah(Creature* creature) : BossAI(creature, DATA_GAL_DARAH) { } - CreatureAI* GetAI(Creature* creature) const override + void Reset() override { - return GetGundrakAI(creature); + BossAI::Reset(); + DoCastSelf(SPELL_START_VISUAL); + impaledList.clear(); + _stampedeVictim.Clear(); } - struct boss_gal_darahAI : public BossAI + void JustReachedHome() override { - boss_gal_darahAI(Creature* creature) : BossAI(creature, DATA_GAL_DARAH) + BossAI::JustReachedHome(); + DoCastSelf(SPELL_START_VISUAL); + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override + { + if (spellInfo->Id == SPELL_TRANSFORM_TO_RHINO) { + ScheduleTimedEvent(8s, 11s, [&] { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true)) + { + DoCast(target, SPELL_IMPALING_CHARGE); + impaledList.insert(target->GetGUID()); + } + }, 16s, 17s); + + ScheduleTimedEvent(6s, 8s, [&] { + DoCastSelf(SPELL_ENRAGE); + }, 16s, 17s); + + ScheduleTimedEvent(7s, 10s, [&] { + DoCastAOE(SPELL_STOMP); + }, 10s, 12s); + + me->m_Events.AddEventAtOffset([&] { + scheduler.CancelAll(); + DoCastSelf(SPELL_TRANSFORM_TO_TROLL); + }, 32s); } - - uint8 phaseCounter; - GuidSet impaledList; - - void Reset() override + else if (spellInfo->Id == SPELL_TRANSFORM_TO_TROLL) { - BossAI::Reset(); - impaledList.clear(); - phaseCounter = 0; + ScheduleEvents(); } + } - void InitializeAI() override - { - BossAI::InitializeAI(); - me->CastSpell(me, SPELL_START_VISUAL, false); - } - - void JustReachedHome() override - { - BossAI::JustReachedHome(); - me->CastSpell(me, SPELL_START_VISUAL, false); - } - - void ScheduleEvents(bool troll) - { - events.Reset(); - if (troll) + void ScheduleEvents() + { + ScheduleTimedEvent(10s, [&] { + Talk(SAY_SUMMON_RHINO); + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f)) { - events.RescheduleEvent(EVENT_STAMPEDE, 10s); - events.RescheduleEvent(EVENT_WHIRLING_SLASH, 21s); + _stampedeVictim = target->GetGUID(); + DoCast(target, SPELL_STAMPEDE); } - else - { - events.RescheduleEvent(EVENT_PUNCTURE, 10s); - events.RescheduleEvent(EVENT_ENRAGE, 15s); - events.RescheduleEvent(EVENT_IMPALING_CHARGE, 21s); - events.RescheduleEvent(EVENT_STOMP, 5s); - } - } + }, 15s); - void JustEngagedWith(Unit* who) override + ScheduleTimedEvent(10s, 16s, [&] { + DoCastVictim(SPELL_PUNCTURE); + }, 15s, 18s); + + ScheduleTimedEvent(11s, 19s, [&] { + DoCastAOE(SPELL_WHIRLING_SLASH); + }, 17s, 19s); + + me->m_Events.AddEventAtOffset([&] { + scheduler.CancelAll(); + DoCastSelf(SPELL_TRANSFORM_TO_RHINO); + }, 32s); + } + + void JustEngagedWith(Unit* who) override + { + Talk(SAY_AGGRO); + BossAI::JustEngagedWith(who); + + ScheduleEvents(); + me->RemoveAurasDueToSpell(SPELL_START_VISUAL); + me->InterruptNonMeleeSpells(true); + } + + void JustSummoned(Creature* summon) override + { + if (Unit* target = ObjectAccessor::GetUnit(*me, _stampedeVictim)) + summon->CastSpell(target, SPELL_STAMPEDE_DMG, true); + + summons.Summon(summon); + } + + uint32 GetData(uint32 /*type*/) const override + { + return impaledList.size(); + } + + void JustDied(Unit* killer) override + { + Talk(SAY_DEATH); + BossAI::JustDied(killer); + } + + void KilledUnit(Unit*) override + { + if (!events.HasTimeUntilEvent(EVENT_KILL_TALK)) { - Talk(SAY_AGGRO); - BossAI::JustEngagedWith(who); - - ScheduleEvents(true); - me->RemoveAurasDueToSpell(SPELL_START_VISUAL); - me->InterruptNonMeleeSpells(true); + Talk(SAY_SLAY); + events.ScheduleEvent(EVENT_KILL_TALK, 6s); } + } - void JustSummoned(Creature* summon) override - { - uint32 despawnTime = 0; - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true)) - { - summon->CastSpell(target, SPELL_STAMPEDE_DMG, true); - despawnTime = (summon->GetDistance(target) / 40.0f * 1000) + 500; - } - - summon->DespawnOrUnsummon(Milliseconds(despawnTime)); - } - - uint32 GetData(uint32 /*type*/) const override - { - return impaledList.size(); - } - - void JustDied(Unit* killer) override - { - Talk(SAY_DEATH); - BossAI::JustDied(killer); - } - - void KilledUnit(Unit*) override - { - if (!events.HasTimeUntilEvent(EVENT_KILL_TALK)) - { - Talk(SAY_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6s); - } - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_CHARGING)) - return; - - switch (events.ExecuteEvent()) - { - case EVENT_STAMPEDE: - Talk(SAY_SUMMON_RHINO); - me->CastSpell(me->GetVictim(), SPELL_STAMPEDE, false); - events.ScheduleEvent(EVENT_STAMPEDE, 15s); - break; - case EVENT_WHIRLING_SLASH: - if (++phaseCounter >= 3) - { - ScheduleEvents(false); - me->CastSpell(me, SPELL_TRANSFORM_TO_RHINO, false); - Talk(SAY_TRANSFORM_1); - phaseCounter = 0; - return; - } - events.ScheduleEvent(EVENT_WHIRLING_SLASH, 21s); - me->CastSpell(me, SPELL_WHIRLING_SLASH, false); - break; - case EVENT_PUNCTURE: - me->CastSpell(me->GetVictim(), SPELL_PUNCTURE, false); - events.ScheduleEvent(EVENT_PUNCTURE, 8s); - break; - case EVENT_ENRAGE: - me->CastSpell(me, SPELL_ENRAGE, false); - events.ScheduleEvent(EVENT_ENRAGE, 20s); - break; - case EVENT_STOMP: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true)) - me->CastSpell(target, SPELL_STOMP, false); - events.ScheduleEvent(EVENT_STOMP, 20s); - break; - case EVENT_IMPALING_CHARGE: - if (++phaseCounter >= 3) - { - ScheduleEvents(true); - me->CastSpell(me, SPELL_TRANSFORM_TO_TROLL, false); - Talk(SAY_TRANSFORM_2); - phaseCounter = 0; - return; - } - events.ScheduleEvent(EVENT_IMPALING_CHARGE, 21s); - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false)) - { - me->CastSpell(target, SPELL_IMPALING_CHARGE, false); - impaledList.insert(target->GetGUID()); - } - break; - } - - DoMeleeAttackIfReady(); - } - }; +private: + GuidSet impaledList; + ObjectGuid _stampedeVictim; }; class spell_galdarah_impaling_charge : public SpellScript @@ -265,9 +214,7 @@ class spell_galdarah_transform : public SpellScript class achievement_share_the_love : public AchievementCriteriaScript { public: - achievement_share_the_love() : AchievementCriteriaScript("achievement_share_the_love") - { - } + achievement_share_the_love() : AchievementCriteriaScript("achievement_share_the_love") { } bool OnCheck(Player* /*player*/, Unit* target, uint32 /*criteria_id*/) override { @@ -280,7 +227,7 @@ public: void AddSC_boss_gal_darah() { - new boss_gal_darah(); + RegisterGundrakCreatureAI(boss_gal_darah); RegisterSpellScript(spell_galdarah_impaling_charge); RegisterSpellScript(spell_galdarah_transform); new achievement_share_the_love(); diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h index ea340b4c0..7e0ffa41a 100644 --- a/src/server/scripts/Northrend/Gundrak/gundrak.h +++ b/src/server/scripts/Northrend/Gundrak/gundrak.h @@ -71,4 +71,6 @@ inline AI* GetGundrakAI(T* obj) return GetInstanceAI(obj, GundrakScriptName); } +#define RegisterGundrakCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetGundrakAI) + #endif From 9c6b2c3900a876181c90b4bae48dfc4ceba7ebe9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 06:53:45 +0000 Subject: [PATCH 07/21] chore(DB): import pending files Referenced commit(s): 6208acd5e558b74726b25726b6f6e803bdfff10a --- .../rev_1760732509449091300.sql => db_world/2025_10_24_01.sql} | 1 + .../rev_1760911748480693596.sql => db_world/2025_10_24_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1760732509449091300.sql => db_world/2025_10_24_01.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1760911748480693596.sql => db_world/2025_10_24_02.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1760732509449091300.sql b/data/sql/updates/db_world/2025_10_24_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1760732509449091300.sql rename to data/sql/updates/db_world/2025_10_24_01.sql index b19c22111..6ded6e9ca 100644 --- a/data/sql/updates/pending_db_world/rev_1760732509449091300.sql +++ b/data/sql/updates/db_world/2025_10_24_01.sql @@ -1,2 +1,3 @@ +-- DB update 2025_10_24_00 -> 2025_10_24_01 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|2147483648 WHERE `entry` IN (29306, 31368); diff --git a/data/sql/updates/pending_db_world/rev_1760911748480693596.sql b/data/sql/updates/db_world/2025_10_24_02.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1760911748480693596.sql rename to data/sql/updates/db_world/2025_10_24_02.sql index a482deba0..70d1bc695 100644 --- a/data/sql/updates/pending_db_world/rev_1760911748480693596.sql +++ b/data/sql/updates/db_world/2025_10_24_02.sql @@ -1,3 +1,4 @@ +-- DB update 2025_10_24_01 -> 2025_10_24_02 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = -114830) 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`, `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 911c0404696c38ccd8f81eadb964ee00dadcfa11 Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Fri, 24 Oct 2025 10:40:41 +0200 Subject: [PATCH 08/21] fix(DB/SmartAI): Solve Blight Geist issues. (#23324) --- .../updates/pending_db_world/blight_geist.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data/sql/updates/pending_db_world/blight_geist.sql diff --git a/data/sql/updates/pending_db_world/blight_geist.sql b/data/sql/updates/pending_db_world/blight_geist.sql new file mode 100644 index 000000000..3ba65735d --- /dev/null +++ b/data/sql/updates/pending_db_world/blight_geist.sql @@ -0,0 +1,29 @@ +-- Add Waypoint +DELETE FROM `waypoint_data` WHERE `id` = 2875000; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(2875000, 1, 6174.28, -2017.25, 245.116, NULL, 0, 1, 0, 100, 0); + +-- Set SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28750; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28750); +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 +(28750, 0, 0, 3, 8, 0, 100, 512, 52245, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 20, 190716, 25, 0, 0, 2, 0, 0, 0, 'Blight Geist - On Spellhit \'Harvest Blight Crystal\' - Store Targetlist'), +(28750, 0, 1, 3, 8, 0, 100, 512, 52245, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 20, 190939, 25, 0, 0, 2, 0, 0, 0, 'Blight Geist - On Spellhit \'Harvest Blight Crystal\' - Store Targetlist'), +(28750, 0, 2, 3, 8, 0, 100, 512, 52245, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 20, 190940, 25, 0, 0, 2, 0, 0, 0, 'Blight Geist - On Spellhit \'Harvest Blight Crystal\' - Store Targetlist'), +(28750, 0, 3, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 2, 0, 0, 0, 'Blight Geist - On Spellhit \'Harvest Blight Crystal\' - Move To Stored'), +(28750, 0, 4, 0, 34, 0, 100, 512, 8, 1, 0, 0, 0, 0, 80, 2875000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Reached Point 1 - Run Script'), +(28750, 0, 5, 0, 8, 0, 100, 512, 52244, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Spellhit \'Charm Geist\' - Say Line 0'), +(28750, 0, 6, 0, 8, 0, 100, 512, 52252, 0, 0, 0, 0, 0, 11, 52243, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Spellhit \'Charm Channel\' - Cast \'Orange Radiation, Small\''), +(28750, 0, 7, 8, 109, 0, 100, 512, 0, 2875000, 0, 0, 0, 0, 11, 61456, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Path 2875000 Finished - Cast \'Evil Teleport Visual Only\''), +(28750, 0, 8, 9, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 52248, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Path 2875000 Finished - Cast \'Kill Credit - Blighted Geist\''), +(28750, 0, 9, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - On Path 2875000 Finished - Despawn In 2000 ms'); + +-- Set Action List +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2875000); +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 +(2875000, 9, 0, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - Actionlist - Set Orientation Stored'), +(2875000, 9, 1, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 0, 5, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - Actionlist - Play Emote 25'), +(2875000, 9, 2, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 0, 5, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - Actionlist - Play Emote 35'), +(2875000, 9, 3, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - Actionlist - Set Lootstate Deactivated'), +(2875000, 9, 4, 0, 0, 0, 100, 512, 1000, 1000, 0, 0, 0, 0, 232, 2875000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Geist - Actionlist - Start Path 2875000'); From 957c1ae39cca4160301492ffaaae95c23a2c8937 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 08:41:53 +0000 Subject: [PATCH 09/21] chore(DB): import pending files Referenced commit(s): 911c0404696c38ccd8f81eadb964ee00dadcfa11 --- .../blight_geist.sql => db_world/2025_10_24_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/blight_geist.sql => db_world/2025_10_24_03.sql} (98%) diff --git a/data/sql/updates/pending_db_world/blight_geist.sql b/data/sql/updates/db_world/2025_10_24_03.sql similarity index 98% rename from data/sql/updates/pending_db_world/blight_geist.sql rename to data/sql/updates/db_world/2025_10_24_03.sql index 3ba65735d..f692bb6d6 100644 --- a/data/sql/updates/pending_db_world/blight_geist.sql +++ b/data/sql/updates/db_world/2025_10_24_03.sql @@ -1,3 +1,4 @@ +-- DB update 2025_10_24_02 -> 2025_10_24_03 -- Add Waypoint DELETE FROM `waypoint_data` WHERE `id` = 2875000; INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES From d2a9c6468b664512a65e5702cd0074a39c4ee14a Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 24 Oct 2025 11:58:12 +0200 Subject: [PATCH 10/21] fix(apps/installer): expired key issue, bump mysql-apt-config to 0.8.35-1 (#23356) Co-authored-by: Degen <61268368+aradep@users.noreply.github.com> --- apps/installer/includes/os_configs/debian.sh | 4 ++-- apps/installer/includes/os_configs/ubuntu.sh | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/installer/includes/os_configs/debian.sh b/apps/installer/includes/os_configs/debian.sh index 5bfc93f8f..1aecbe3d2 100644 --- a/apps/installer/includes/os_configs/debian.sh +++ b/apps/installer/includes/os_configs/debian.sh @@ -32,7 +32,7 @@ $SUDO apt-get install -y gdbserver gdb unzip curl \ VAR_PATH="$CURRENT_PATH/../../../../var" # run noninteractive install for MYSQL 8.4 LTS -wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb -P "$VAR_PATH" -DEBIAN_FRONTEND="noninteractive" $SUDO dpkg -i "$VAR_PATH/mysql-apt-config_0.8.32-1_all.deb" +wget https://dev.mysql.com/get/mysql-apt-config_0.8.35-1_all.deb -P "$VAR_PATH" +DEBIAN_FRONTEND="noninteractive" $SUDO dpkg -i "$VAR_PATH/mysql-apt-config_0.8.35-1_all.deb" $SUDO apt-get update DEBIAN_FRONTEND="noninteractive" $SUDO apt-get install -y mysql-server libmysqlclient-dev diff --git a/apps/installer/includes/os_configs/ubuntu.sh b/apps/installer/includes/os_configs/ubuntu.sh index cd3944fa6..c2c84fff3 100644 --- a/apps/installer/includes/os_configs/ubuntu.sh +++ b/apps/installer/includes/os_configs/ubuntu.sh @@ -40,8 +40,10 @@ apt-get -y install ccache clang cmake curl google-perftools libmysqlclient-dev m # Do not install MySQL if we are in docker (It will be used a docker container instead) or we are explicitly skipping it. if [[ $DOCKER != 1 && $SKIP_MYSQL_INSTALL != 1 ]]; then # run noninteractive install for MYSQL 8.4 LTS - wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb -P "$VAR_PATH" - DEBIAN_FRONTEND="noninteractive" $SUDO dpkg -i "$VAR_PATH/mysql-apt-config_0.8.32-1_all.deb" + wget https://dev.mysql.com/get/mysql-apt-config_0.8.35-1_all.deb -P "$VAR_PATH" + # resolve expired key issue + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C + DEBIAN_FRONTEND="noninteractive" $SUDO dpkg -i "$VAR_PATH/mysql-apt-config_0.8.35-1_all.deb" $SUDO apt-get update DEBIAN_FRONTEND="noninteractive" $SUDO apt-get install -y mysql-server fi From d48fe843cdf733676c609ff0847cb09b38626d31 Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 24 Oct 2025 14:49:14 +0200 Subject: [PATCH 11/21] fix(CI/modules-build): rename mod-eluna to mod-ale (#23379) --- apps/ci/ci-install-modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ci/ci-install-modules.sh b/apps/ci/ci-install-modules.sh index 5987eaf7a..7ff647075 100755 --- a/apps/ci/ci-install-modules.sh +++ b/apps/ci/ci-install-modules.sh @@ -35,7 +35,7 @@ git clone --depth=1 --branch=master https://github.com/azerothcore/mod-detailed- git clone --depth=1 --branch=main https://github.com/azerothcore/mod-dmf-switch modules/mod-dmf-switch git clone --depth=1 --branch=master https://github.com/azerothcore/mod-duel-reset modules/mod-duel-reset git clone --depth=1 --branch=master https://github.com/azerothcore/mod-dynamic-xp modules/mod-dynamic-xp -git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna modules/mod-eluna +git clone --depth=1 --branch=master https://github.com/azerothcore/mod-ale modules/mod-ale git clone --depth=1 --branch=master https://github.com/azerothcore/mod-emblem-transfer modules/mod-emblem-transfer git clone --depth=1 --branch=master https://github.com/azerothcore/mod-fireworks-on-level modules/mod-fireworks-on-level git clone --depth=1 --branch=main https://github.com/azerothcore/mod-global-chat modules/mod-global-chat From ce840795c52cd908bf0bf61b5c661b49e2ee3123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Fri, 24 Oct 2025 14:50:23 +0200 Subject: [PATCH 12/21] fix(CI): eluna->ale mod rename (#23382) --- .github/workflows/docker_build.yml | 8 ++++---- apps/installer/includes/modules-manager/README.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 1b8c87660..0ab085e98 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -36,16 +36,16 @@ jobs: - uses: actions/checkout@v4 # The containers created in this workflow are used by - # acore-docker, which has a dependency on mod-eluna. + # acore-docker, which has a dependency on mod-ale. # - # If you're wanting containers without mod-eluna, the best solution is to + # If you're wanting containers without mod-ale, 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 + repository: azerothcore/mod-ale + path: modules/mod-ale - name: Login to Docker Hub if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' diff --git a/apps/installer/includes/modules-manager/README.md b/apps/installer/includes/modules-manager/README.md index 93496a91a..d6a160b6c 100644 --- a/apps/installer/includes/modules-manager/README.md +++ b/apps/installer/includes/modules-manager/README.md @@ -63,7 +63,7 @@ repo[:dirname][@branch[:commit]] ./acore.sh module install https://github.com/azerothcore/mod-transmog.git@main # Install multiple modules -./acore.sh module install mod-transmog mod-eluna:custom-eluna +./acore.sh module install mod-transmog mod-ale:custom-eluna # Install all modules from list ./acore.sh module install --all @@ -92,7 +92,7 @@ repo[:dirname][@branch[:commit]] ./acore.sh module remove https://github.com/azerothcore/mod-transmog.git # Remove multiple modules -./acore.sh module remove mod-transmog mod-eluna +./acore.sh module remove mod-transmog mod-ale ``` ### Searching Modules @@ -232,7 +232,7 @@ repo_reference branch commit # Examples: azerothcore/mod-transmog master abc123def456 https://github.com/custom/mod-custom.git develop def456abc789 -mod-eluna:custom-eluna-dir main 789abc123def +mod-ale:custom-eluna-dir main 789abc123def ``` The list maintains: From 5861eab60ccd22dc0e0a3e69e7a101aac6c8e9ca Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 24 Oct 2025 14:51:01 +0200 Subject: [PATCH 13/21] docs(README): add logo for dashboard-ci build status (#23377) --- .github/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/README.md b/.github/README.md index d699c621b..8953b4ca0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -14,6 +14,7 @@ [![macos-build](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/macos_build.yml/badge.svg?branch=master)](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/macos_build.yml?query=branch%3Amaster) [![docker-build](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/docker_build.yml/badge.svg?branch=master)](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/docker_build.yml?query=branch%3Amaster) [![tools-build](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/tools_build.yml/badge.svg?branch=master)](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/tools_build.yml?query=branch%3Amaster) +[![dashboard-ci](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/dashboard-ci.yml/badge.svg?branch=master)](https://github.com/azerothcore/azerothcore-wotlk/actions/workflows/dashboard-ci.yml?query=branch%3Amaster) ## Introduction From 4069b94fbf3f8818c867a675a69bcee508f30674 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:27:55 +0200 Subject: [PATCH 14/21] fix(Scripts/Commands): arena lookup/info improvemenets (#23355) Co-authored-by: sudlud --- src/server/game/Battlegrounds/ArenaTeam.cpp | 4 ++-- src/server/scripts/Commands/cs_arena.cpp | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 753fc9d48..a319899c9 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -162,7 +162,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid) // Feed data to the struct ArenaTeamMember newMember; - //newMember.Name = playerName; + newMember.Name = playerName; newMember.Guid = playerGuid; newMember.Class = playerClass; newMember.SeasonGames = 0; @@ -249,7 +249,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result) newMember.WeekWins = fields[3].Get(); newMember.SeasonGames = fields[4].Get(); newMember.SeasonWins = fields[5].Get(); - //newMember.Name = fields[6].Get(); + newMember.Name = fields[6].Get(); newMember.Class = fields[7].Get(); newMember.PersonalRating = fields[8].Get(); newMember.MatchMakerRating = fields[9].Get() > 0 ? fields[9].Get() : sWorld->getIntConfig(CONFIG_ARENA_START_MATCHMAKER_RATING); diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index 69fa60e56..fe65d8398 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -51,7 +51,7 @@ public: { "rename", HandleArenaRenameCommand, SEC_ADMINISTRATOR, Console::Yes }, { "captain", HandleArenaCaptainCommand, SEC_ADMINISTRATOR, Console::No }, { "info", HandleArenaInfoCommand, SEC_GAMEMASTER, Console::Yes }, - { "lookup", HandleArenaLookupCommand, SEC_GAMEMASTER, Console::No }, + { "lookup", HandleArenaLookupCommand, SEC_GAMEMASTER, Console::Yes }, { "season", arenaSeasonCommandTable } }; @@ -209,7 +209,7 @@ public: handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType()); for (auto const& itr : arena->GetMembers()) - handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.ToString(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : "")); + handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.GetCounter(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "Captain" : "")); return true; } @@ -224,17 +224,17 @@ public: { if (StringContainsStringI(team->GetName(), needle)) { - if (handler->GetSession()) - { - handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType()); - found = true; - continue; - } + handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType()); + found = true; + continue; } } if (!found) - handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle)); + { + handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle)); + return false; + } return true; } From ba6058961848a6f3bff1a71a14e169a600a37597 Mon Sep 17 00:00:00 2001 From: Walter Pagani Date: Fri, 24 Oct 2025 10:30:11 -0300 Subject: [PATCH 15/21] fix(DB/SAI): Add missing texts for Doomclaw (#23316) --- .../pending_db_world/rev_1760910926559529300.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1760910926559529300.sql diff --git a/data/sql/updates/pending_db_world/rev_1760910926559529300.sql b/data/sql/updates/pending_db_world/rev_1760910926559529300.sql new file mode 100644 index 000000000..01533d268 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1760910926559529300.sql @@ -0,0 +1,13 @@ +DELETE FROM `creature_text` WHERE `CreatureID` = 19738; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(19738, 0, 0, 'Hahaha! We''re coming for you, little goblins!', 14, 0, 100, 0, 0, 0, 17408, 0, 'Doomclaw - On Death'), +(19738, 1, 0, 'Work harder, dogs!', 12, 0, 100, 0, 0, 0, 17953, 0, 'Doomclaw - Random Say 1'), +(19738, 1, 1, 'This is hard work. I feel like I need a vacation. You there, put your back into it!', 12, 0, 100, 0, 0, 0, 17960, 0, 'Doomclaw - Random Say 2'), +(19738, 1, 2, 'Faster, or you will taste The Claw!', 12, 0, 100, 0, 0, 0, 17954, 0, 'Doomclaw - Random Say 3'); + +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=19738; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=19738 AND `source_type`=0 AND `id` IN (4, 5); +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 +(19738, 0, 4, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomclaw - On Death - Say Line 0'), +(19738, 0, 5, 0, 1, 0, 100, 0, 10000, 15000, 12000, 25000, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomclaw - OOC - Say Random Text'); From 1b7b3b3a16b544704aa0c9846d45bed8d487a40b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 13:31:30 +0000 Subject: [PATCH 16/21] chore(DB): import pending files Referenced commit(s): ba6058961848a6f3bff1a71a14e169a600a37597 --- .../rev_1760910926559529300.sql => db_world/2025_10_24_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1760910926559529300.sql => db_world/2025_10_24_04.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1760910926559529300.sql b/data/sql/updates/db_world/2025_10_24_04.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1760910926559529300.sql rename to data/sql/updates/db_world/2025_10_24_04.sql index 01533d268..33ce8b921 100644 --- a/data/sql/updates/pending_db_world/rev_1760910926559529300.sql +++ b/data/sql/updates/db_world/2025_10_24_04.sql @@ -1,3 +1,4 @@ +-- DB update 2025_10_24_03 -> 2025_10_24_04 DELETE FROM `creature_text` WHERE `CreatureID` = 19738; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES (19738, 0, 0, 'Hahaha! We''re coming for you, little goblins!', 14, 0, 100, 0, 0, 0, 17408, 0, 'Doomclaw - On Death'), From 0a55aed5e46ee7922c58fc579bf8d289c4c6a8be Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:50:11 +0200 Subject: [PATCH 17/21] fix(Script/Commands): ticket response append crash (#23357) --- src/server/scripts/Commands/cs_ticket.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 84d5db8cb..951e09ad0 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -467,12 +467,18 @@ public: static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, uint32 ticketId, Tail res) { - return TicketResponseAppend(ticketId, false, handler, res.data()); + if (res.empty()) + return false; + else + return TicketResponseAppend(ticketId, false, handler, res.data()); } static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, uint32 ticketId, Tail res) { - return TicketResponseAppend(ticketId, true, handler, res.data()); + if (res.empty()) + return false; + else + return TicketResponseAppend(ticketId, true, handler, res.data()); } static bool HandleGMTicketResponseDeleteCommand(ChatHandler* handler, uint32 ticketId) From 2c8e3b53d31c47dc67aa9764d2d9d2e3941295de Mon Sep 17 00:00:00 2001 From: sogladev Date: Fri, 24 Oct 2025 16:52:54 +0200 Subject: [PATCH 18/21] fix(Core/Spells): Acid Splash can stack on Krik'thir the Gatewatcher (#23302) --- .../updates/pending_db_world/rev_1760816979895001416.sql | 2 ++ src/server/game/Spells/SpellInfoCorrections.cpp | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1760816979895001416.sql diff --git a/data/sql/updates/pending_db_world/rev_1760816979895001416.sql b/data/sql/updates/pending_db_world/rev_1760816979895001416.sql new file mode 100644 index 000000000..d712a3d86 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1760816979895001416.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 52446) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28684) AND (`ConditionValue3` = 0); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 6712f1109..77057e798 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -5157,6 +5157,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx5 |= SPELL_ATTR5_LIMIT_N; }); + // Acid Splash + ApplySpellFix({ 52446, 59363 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 8e1253c82fa8bb9ae1991d81ea8a0289e7ee67db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 14:54:04 +0000 Subject: [PATCH 19/21] chore(DB): import pending files Referenced commit(s): 2c8e3b53d31c47dc67aa9764d2d9d2e3941295de --- .../rev_1760816979895001416.sql => db_world/2025_10_24_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1760816979895001416.sql => db_world/2025_10_24_05.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1760816979895001416.sql b/data/sql/updates/db_world/2025_10_24_05.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1760816979895001416.sql rename to data/sql/updates/db_world/2025_10_24_05.sql index d712a3d86..135d657fd 100644 --- a/data/sql/updates/pending_db_world/rev_1760816979895001416.sql +++ b/data/sql/updates/db_world/2025_10_24_05.sql @@ -1,2 +1,3 @@ +-- DB update 2025_10_24_04 -> 2025_10_24_05 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 52446) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28684) AND (`ConditionValue3` = 0); From 77a1b45fc7de32b69c26e9f06e3e0a5138eae9c7 Mon Sep 17 00:00:00 2001 From: Ryan Turner <16946913+TheSCREWEDSoftware@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:13:09 +0100 Subject: [PATCH 20/21] fix(apps/bash) - Command substitution for backtick command / statement. (#23344) --- apps/installer/includes/modules-manager/modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/installer/includes/modules-manager/modules.sh b/apps/installer/includes/modules-manager/modules.sh index be050cff1..91ae3785b 100644 --- a/apps/installer/includes/modules-manager/modules.sh +++ b/apps/installer/includes/modules-manager/modules.sh @@ -683,7 +683,7 @@ function inst_getVersionBranch() { res="none" # since we've the pair version,branch alternated in not associative and one-dimensional # array, we've to simulate the association with length/2 trick - for idx in `seq 0 $((${#vers[*]}/2-1))`; do + for idx in $(seq 0 $((${#vers[*]}/2-1))); do semverParseInto "${vers[idx*2]}" MODULE_MAJOR MODULE_MINOR MODULE_PATCH MODULE_SPECIAL if [[ $MODULE_MAJOR -eq $ACV_MAJOR && $MODULE_MINOR -le $ACV_MINOR ]]; then res="${vers[idx*2+1]}" From d58046032bfca733873421f8addca75edf2ffd47 Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 24 Oct 2025 23:48:58 +0200 Subject: [PATCH 21/21] fix(Core/Movement): Add force speed ack to async movement and resolve stutter (#23371) --- .../game/Entities/Creature/Creature.cpp | 59 ++---- src/server/game/Entities/Creature/Creature.h | 3 +- src/server/game/Entities/Player/Player.cpp | 26 +-- src/server/game/Entities/Player/Player.h | 2 - src/server/game/Entities/Unit/Unit.cpp | 186 +++++++----------- src/server/game/Entities/Unit/Unit.h | 24 ++- src/server/game/Handlers/MiscHandler.cpp | 20 +- src/server/game/Handlers/MovementHandler.cpp | 85 ++++---- src/server/game/Server/Protocol/Opcodes.cpp | 8 +- src/server/scripts/Commands/cs_modify.cpp | 8 +- .../IcecrownCitadel/boss_the_lich_king.cpp | 4 +- .../Nexus/EyeOfEternity/boss_malygos.cpp | 9 +- .../Outland/TempestKeep/Eye/boss_kaelthas.cpp | 2 +- 13 files changed, 173 insertions(+), 263 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 4b18aa2e9..19db15590 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1999,7 +1999,7 @@ void Creature::setDeathState(DeathState state, bool despawn) bool needsFalling = !despawn && (IsFlying() || IsHovering()) && !IsUnderWater(); SetHover(false); - SetDisableGravity(false, false, false); + SetDisableGravity(false); if (needsFalling) GetMotionMaster()->MoveFall(0, true); @@ -3230,47 +3230,6 @@ bool Creature::SetWalk(bool enable) return true; } -/** - * @brief Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING. Infom also the client - */ -bool Creature::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/) -{ - //! It's possible only a packet is sent but moveflags are not updated - //! Need more research on this - if (!packetOnly && !Unit::SetDisableGravity(disable)) - return false; - - if (m_movedByPlayer) - { - WorldPacket data(disable ? SMSG_MOVE_GRAVITY_DISABLE : SMSG_MOVE_GRAVITY_ENABLE, 12); - data << GetPackGUID(); - data << m_movedByPlayer->ToPlayer()->GetSession()->GetOrderCounter(); // movement counter - m_movedByPlayer->ToPlayer()->SendDirectMessage(&data); - m_movedByPlayer->ToPlayer()->GetSession()->IncrementOrderCounter(); - - data.Initialize(MSG_MOVE_GRAVITY_CHNG, 64); - data << GetPackGUID(); - BuildMovementPacket(&data); - m_movedByPlayer->ToPlayer()->SendMessageToSet(&data, false); - return true; - } - - 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); - else if (IsHovering()) - SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER); - else - SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_GROUND); - } - - WorldPacket data(disable ? SMSG_SPLINE_MOVE_GRAVITY_DISABLE : SMSG_SPLINE_MOVE_GRAVITY_ENABLE, 9); - data << GetPackGUID(); - SendMessageToSet(&data, false); - return true; -} - bool Creature::SetSwim(bool enable) { if (!Unit::SetSwim(enable)) @@ -3385,19 +3344,23 @@ void Creature::UpdateMovementFlags() if (GetMovementTemplate().IsFlightAllowed() && isInAir && !IsFalling()) { - if (GetMovementTemplate().Flight == CreatureFlightMovementType::CanFly) + if (GetMovementTemplate().Flight == CreatureFlightMovementType::CanFly && !m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY)) SetCanFly(true); - else + else if (!IsLevitating()) SetDisableGravity(true); - if (!HasHoverAura()) + if (!HasHoverAura() && IsHovering()) SetHover(false); } else { - SetCanFly(false); - SetDisableGravity(false); - if (IsAlive() && (CanHover() || HasHoverAura())) + if (m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY)) + SetCanFly(false); + + if (IsLevitating()) + SetDisableGravity(false); + + if (IsAlive() && (GetMovementTemplate().Ground == CreatureGroundMovementType::Hover || HasHoverAura()) && !IsHovering()) SetHover(true); } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 1ea560045..b5d93cd3b 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -83,7 +83,7 @@ public: [[nodiscard]] bool CanWalk() const { return GetMovementTemplate().IsGroundAllowed(); } [[nodiscard]] bool CanSwim() const override; [[nodiscard]] bool CanEnterWater() const override; - [[nodiscard]] bool CanFly() const override { return GetMovementTemplate().IsFlightAllowed() || IsFlying(); } + [[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(); } @@ -145,7 +145,6 @@ public: [[nodiscard]] CreatureAI* AI() const { return (CreatureAI*)i_AI; } bool SetWalk(bool enable) override; - bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true) override; bool SetSwim(bool enable) override; bool HasSpellFocus(Spell const* focusSpell = nullptr) const; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7bca647f7..e4e703492 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -11704,7 +11704,7 @@ void Player::SendInitialPacketsAfterAddToMap() // manual send package (have code in HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); that must not be re-applied. if (IsImmobilizedState()) { - auto const counter = GetSession()->GetOrderCounter(); + uint32 const counter = GetSession()->GetOrderCounter(); setCompoundState << uint8(2 + GetPackGUID().size() + 4); setCompoundState << uint16(SMSG_FORCE_MOVE_ROOT); setCompoundState << GetPackGUID(); @@ -11714,7 +11714,7 @@ void Player::SendInitialPacketsAfterAddToMap() if (HasAuraType(SPELL_AURA_FEATHER_FALL)) { - auto const counter = GetSession()->GetOrderCounter(); + uint32 const counter = GetSession()->GetOrderCounter(); setCompoundState << uint8(2 + GetPackGUID().size() + 4); setCompoundState << uint16(SMSG_MOVE_FEATHER_FALL); setCompoundState << GetPackGUID(); @@ -11724,7 +11724,7 @@ void Player::SendInitialPacketsAfterAddToMap() if (HasAuraType(SPELL_AURA_WATER_WALK)) { - auto const counter = GetSession()->GetOrderCounter(); + uint32 const counter = GetSession()->GetOrderCounter(); setCompoundState << uint8(2 + GetPackGUID().size() + 4); setCompoundState << uint16(SMSG_MOVE_WATER_WALK); setCompoundState << GetPackGUID(); @@ -11734,7 +11734,7 @@ void Player::SendInitialPacketsAfterAddToMap() if (HasAuraType(SPELL_AURA_HOVER)) { - auto const counter = GetSession()->GetOrderCounter(); + uint32 const counter = GetSession()->GetOrderCounter(); setCompoundState << uint8(2 + GetPackGUID().size() + 4); setCompoundState << uint16(SMSG_MOVE_SET_HOVER); setCompoundState << GetPackGUID(); @@ -16034,24 +16034,6 @@ bool Player::IsInWhisperWhiteList(ObjectGuid guid) return false; } -bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool /*updateAnimationTier = true*/) -{ - if (!packetOnly && !Unit::SetDisableGravity(disable)) - return false; - - WorldPacket data(disable ? SMSG_MOVE_GRAVITY_DISABLE : SMSG_MOVE_GRAVITY_ENABLE, 12); - data << GetPackGUID(); - data << GetSession()->GetOrderCounter(); // movement counter - SendDirectMessage(&data); - GetSession()->IncrementOrderCounter(); - - data.Initialize(MSG_MOVE_GRAVITY_CHNG, 64); - data << GetPackGUID(); - BuildMovementPacket(&data); - SendMessageToSet(&data, false); - return true; -} - Guild* Player::GetGuild() const { uint32 guildId = GetGuildId(); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 7154eaa33..11bb75df4 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2566,8 +2566,6 @@ public: bool IsInWhisperWhiteList(ObjectGuid guid); void RemoveFromWhisperWhiteList(ObjectGuid guid) { WhisperList.remove(guid); } - bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true) override; - [[nodiscard]] bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); } [[nodiscard]] bool CanEnterWater() const override { return true; } bool IsFreeFlying() const { return HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || HasAuraType(SPELL_AURA_FLY); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4ec9c9567..4c9d6b60c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14523,116 +14523,55 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) propagateSpeedChange(); - WorldPacket data; - if (!forced) - { - switch (mtype) - { - case MOVE_WALK: - data.Initialize(MSG_MOVE_SET_WALK_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_RUN: - data.Initialize(MSG_MOVE_SET_RUN_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_RUN_BACK: - data.Initialize(MSG_MOVE_SET_RUN_BACK_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_SWIM: - data.Initialize(MSG_MOVE_SET_SWIM_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_SWIM_BACK: - data.Initialize(MSG_MOVE_SET_SWIM_BACK_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_TURN_RATE: - data.Initialize(MSG_MOVE_SET_TURN_RATE, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_FLIGHT: - data.Initialize(MSG_MOVE_SET_FLIGHT_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_FLIGHT_BACK: - data.Initialize(MSG_MOVE_SET_FLIGHT_BACK_SPEED, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - case MOVE_PITCH_RATE: - data.Initialize(MSG_MOVE_SET_PITCH_RATE, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4); - break; - default: - LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type ({}), data not sent to client.", mtype); - return; - } + SpeedOpcodePair const& speedOpcodes = SetSpeed2Opc_table[mtype]; + if (forced && IsClientControlled()) + { + Player* player = const_cast(GetClientControlling()); + uint32 const counter = player->GetSession()->GetOrderCounter(); + + // register forced speed changes for WorldSession::HandleForceSpeedChangeAck + // and do it only for real sent packets and use run for run/mounted as client expected + ++player->m_forced_speed_changes[mtype]; + + WorldPacket data(speedOpcodes[static_cast(SpeedOpcodeIndex::PC)], 18); + data << GetPackGUID(); + data << counter; + if (mtype == MOVE_RUN) + data << uint8(0); // new 2.1.0 + + data << GetSpeed(mtype); + player->GetSession()->SendPacket(&data); + player->GetSession()->IncrementOrderCounter(); + } + else if (forced) + { + WorldPacket data(speedOpcodes[static_cast(SpeedOpcodeIndex::NPC)], 12); data << GetPackGUID(); - BuildMovementPacket(&data); data << float(GetSpeed(mtype)); SendMessageToSet(&data, true); } - else + + if (IsPlayer()) { - if (IsPlayer()) + // Xinef: update speed of pet also + if (!IsInCombat()) { - // register forced speed changes for WorldSession::HandleForceSpeedChangeAck - // and do it only for real sent packets and use run for run/mounted as client expected - ++ToPlayer()->m_forced_speed_changes[mtype]; + Unit* pet = ToPlayer()->GetPet(); + if (!pet) + pet = GetCharm(); - // Xinef: update speed of pet also - if (!IsInCombat()) - { - Unit* pet = ToPlayer()->GetPet(); - if (!pet) - pet = GetCharm(); + // xinef: do not affect vehicles and possesed pets + if (pet && (pet->HasUnitFlag(UNIT_FLAG_POSSESSED) || pet->IsVehicle())) + pet = nullptr; - // xinef: do not affect vehicles and possesed pets - if (pet && (pet->HasUnitFlag(UNIT_FLAG_POSSESSED) || pet->IsVehicle())) - pet = nullptr; + if (pet && pet->IsCreature() && !pet->IsInCombat() && pet->GetMotionMaster()->GetCurrentMovementGeneratorType() == FOLLOW_MOTION_TYPE) + pet->UpdateSpeed(mtype, forced); - if (pet && pet->IsCreature() && !pet->IsInCombat() && pet->GetMotionMaster()->GetCurrentMovementGeneratorType() == FOLLOW_MOTION_TYPE) - pet->UpdateSpeed(mtype, forced); - if (Unit* critter = ObjectAccessor::GetUnit(*this, GetCritterGUID())) - critter->UpdateSpeed(mtype, forced); - } - ToPlayer()->SetCanTeleport(true); + if (Unit* critter = ObjectAccessor::GetUnit(*this, GetCritterGUID())) + critter->UpdateSpeed(mtype, forced); } - - switch (mtype) - { - case MOVE_WALK: - data.Initialize(SMSG_FORCE_WALK_SPEED_CHANGE, 16); - break; - case MOVE_RUN: - data.Initialize(SMSG_FORCE_RUN_SPEED_CHANGE, 17); - break; - case MOVE_RUN_BACK: - data.Initialize(SMSG_FORCE_RUN_BACK_SPEED_CHANGE, 16); - break; - case MOVE_SWIM: - data.Initialize(SMSG_FORCE_SWIM_SPEED_CHANGE, 16); - break; - case MOVE_SWIM_BACK: - data.Initialize(SMSG_FORCE_SWIM_BACK_SPEED_CHANGE, 16); - break; - case MOVE_TURN_RATE: - data.Initialize(SMSG_FORCE_TURN_RATE_CHANGE, 16); - break; - case MOVE_FLIGHT: - data.Initialize(SMSG_FORCE_FLIGHT_SPEED_CHANGE, 16); - break; - case MOVE_FLIGHT_BACK: - data.Initialize(SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE, 16); - break; - case MOVE_PITCH_RATE: - data.Initialize(SMSG_FORCE_PITCH_RATE_CHANGE, 16); - break; - default: - LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type ({}), data not sent to client.", mtype); - return; - } - data << GetPackGUID(); - data << (IsPlayer() ? ToPlayer()->GetSession()->GetOrderCounter() : uint32(0)); // movement counter - if (mtype == MOVE_RUN) - data << uint8(0); // new 2.1.0 - data << float(GetSpeed(mtype)); - SendMessageToSet(&data, true); - if (IsPlayer()) // TODO: Resolve this mess - ToPlayer()->GetSession()->IncrementOrderCounter(); + ToPlayer()->SetCanTeleport(true); } } @@ -18343,7 +18282,7 @@ void Unit::SendMoveRoot(bool apply) // Wrath+ force root: when unit is controlled by a player else { - auto const counter = client->GetSession()->GetOrderCounter(); + uint32 const counter = client->GetSession()->GetOrderCounter(); WorldPacket data(apply ? SMSG_FORCE_MOVE_ROOT : SMSG_FORCE_MOVE_UNROOT, guid.size() + 4); data << guid; @@ -20381,22 +20320,39 @@ bool Unit::SetWalk(bool enable) return true; } -bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/, bool /*updateAnimationTier = true*/) +void Unit::SetDisableGravity(bool enable) { - if (disable == IsLevitating()) - return false; + bool isClientControlled = IsClientControlled(); - if (disable) + if (!isClientControlled) { - AddUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); - RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING); - } - else - { - RemoveUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); + if (enable) + m_movementInfo.AddMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); + else + m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); } - return true; + if (!IsInWorld()) // is sent on add to map + return; + + if (isClientControlled) + { + if (Player const* player = GetClientControlling()) + { + uint32 const counter = player->GetSession()->GetOrderCounter(); + + WorldPacket data(enable ? SMSG_MOVE_GRAVITY_DISABLE : SMSG_MOVE_GRAVITY_ENABLE, GetPackGUID().size() + 4); + data << GetPackGUID(); + data << counter; + player->GetSession()->SendPacket(&data); + player->GetSession()->IncrementOrderCounter(); + return; + } + } + + WorldPacket data(enable ? SMSG_SPLINE_MOVE_GRAVITY_DISABLE : SMSG_SPLINE_MOVE_GRAVITY_ENABLE, 9); + data << GetPackGUID(); + SendMessageToSet(&data, true); } bool Unit::SetSwim(bool enable) @@ -20443,7 +20399,7 @@ void Unit::SetCanFly(bool enable) { if (Player const* player = GetClientControlling()) { - auto const counter = player->GetSession()->GetOrderCounter(); + uint32 const counter = player->GetSession()->GetOrderCounter(); WorldPacket data(enable ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, GetPackGUID().size() + 4); data << GetPackGUID(); @@ -20478,7 +20434,7 @@ void Unit::SetFeatherFall(bool enable) { if (Player const* player = GetClientControlling()) { - auto const counter = player->GetSession()->GetOrderCounter(); + uint32 const counter = player->GetSession()->GetOrderCounter(); WorldPacket data(enable ? SMSG_MOVE_FEATHER_FALL : SMSG_MOVE_NORMAL_FALL, GetPackGUID().size() + 4); @@ -20538,7 +20494,7 @@ void Unit::SetHover(bool enable) { WorldPacket data(enable ? SMSG_MOVE_SET_HOVER : SMSG_MOVE_UNSET_HOVER, GetPackGUID().size() + 4); - auto const counter = player->GetSession()->GetOrderCounter(); + uint32 const counter = player->GetSession()->GetOrderCounter(); data << GetPackGUID(); data << counter; @@ -20572,7 +20528,7 @@ void Unit::SetWaterWalking(bool enable) { if (Player const* player = GetClientControlling()) { - auto const counter = player->GetSession()->GetOrderCounter(); + uint32 const counter = player->GetSession()->GetOrderCounter(); WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4); data << GetPackGUID(); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 7b98132fe..a1d3f2e74 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -624,6 +624,28 @@ typedef std::unordered_map PacketCooldowns; struct SpellProcEventEntry; // used only privately +enum class SpeedOpcodeIndex : uint32 +{ + PC, + NPC, + ACK_RESPONSE, + MAX +}; + +typedef const Opcodes SpeedOpcodePair[static_cast(SpeedOpcodeIndex::MAX)]; +SpeedOpcodePair SetSpeed2Opc_table[MAX_MOVE_TYPE] = +{ + {SMSG_FORCE_WALK_SPEED_CHANGE, SMSG_SPLINE_SET_WALK_SPEED, MSG_MOVE_SET_WALK_SPEED}, + {SMSG_FORCE_RUN_SPEED_CHANGE, SMSG_SPLINE_SET_RUN_SPEED, MSG_MOVE_SET_RUN_SPEED}, + {SMSG_FORCE_RUN_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_RUN_BACK_SPEED, MSG_MOVE_SET_RUN_BACK_SPEED}, + {SMSG_FORCE_SWIM_SPEED_CHANGE, SMSG_SPLINE_SET_SWIM_SPEED, MSG_MOVE_SET_SWIM_SPEED}, + {SMSG_FORCE_SWIM_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_SWIM_BACK_SPEED, MSG_MOVE_SET_SWIM_BACK_SPEED}, + {SMSG_FORCE_TURN_RATE_CHANGE, SMSG_SPLINE_SET_TURN_RATE, MSG_MOVE_SET_TURN_RATE}, + {SMSG_FORCE_FLIGHT_SPEED_CHANGE, SMSG_SPLINE_SET_FLIGHT_SPEED, MSG_MOVE_SET_FLIGHT_SPEED}, + {SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_FLIGHT_BACK_SPEED, MSG_MOVE_SET_FLIGHT_BACK_SPEED}, + {SMSG_FORCE_PITCH_RATE_CHANGE, SMSG_SPLINE_SET_PITCH_RATE, MSG_MOVE_SET_PITCH_RATE}, +}; + class Unit : public WorldObject { public: @@ -1681,7 +1703,7 @@ public: void MonsterMoveWithSpeed(float x, float y, float z, float speed); // Not to be used outside of cinematics virtual bool SetWalk(bool enable); - virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true); + void SetDisableGravity(bool disable); virtual bool SetSwim(bool enable); void SetCanFly(bool enable); void SetWaterWalking(bool enable); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 03c91c298..13ef9ec66 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1490,6 +1490,8 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data) { LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging((Opcodes)recv_data.GetOpcode())); + Opcodes opcode = (Opcodes)recv_data.GetOpcode(); + ObjectGuid guid; uint32 counter; uint32 isApplied; @@ -1507,7 +1509,8 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data) movementInfo.guid = guid; ReadMovementInfo(recv_data, &movementInfo); - recv_data >> isApplied; + if (opcode != CMSG_MOVE_GRAVITY_DISABLE_ACK && opcode != CMSG_MOVE_GRAVITY_ENABLE_ACK) + recv_data >> isApplied; sScriptMgr->AnticheatSetCanFlybyServer(_player, movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY)); @@ -1516,6 +1519,12 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data) mover->m_movementInfo.flags = movementInfo.GetMovementFlags(); + if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data)) + { + recv_data.rfinish(); // prevent warnings spam + return; + } + Opcodes response; switch (recv_data.GetOpcode()) @@ -1524,17 +1533,12 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data) case CMSG_MOVE_FEATHER_FALL_ACK: response = MSG_MOVE_FEATHER_FALL; break; case CMSG_MOVE_WATER_WALK_ACK: response = MSG_MOVE_WATER_WALK; break; case CMSG_MOVE_SET_CAN_FLY_ACK: response = MSG_MOVE_UPDATE_CAN_FLY; break; + case CMSG_MOVE_GRAVITY_DISABLE_ACK: response = MSG_MOVE_GRAVITY_CHNG; break; + case CMSG_MOVE_GRAVITY_ENABLE_ACK: response = MSG_MOVE_GRAVITY_CHNG; break; default: return; } - if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data)) - { - recv_data.rfinish(); // prevent warnings spam - return; - } - WorldPacket data(response, 8); - data << guid.WriteAsPacked(); WriteMovementInfo(&data, &movementInfo); _player->m_mover->SendMessageToSet(&data, _player); } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 6bf1b899b..537756706 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -378,7 +378,6 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) /* process position-change */ WorldPacket data(opcode, recvData.size()); - movementInfo.guid = mover->GetGUID(); WriteMovementInfo(&data, &movementInfo); mover->SendMessageToSet(&data, _player); } @@ -655,26 +654,39 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData) /* extract packet */ ObjectGuid guid; - uint32 unk1; + uint32 counter; + MovementInfo movementInfo; float newspeed; recvData >> guid.ReadAsPacked(); + recvData >> counter; // counter or moveEvent + movementInfo.guid = guid; + ReadMovementInfo(recvData, &movementInfo); + recvData >> newspeed; + + Unit* mover = _player->m_mover; // pussywizard: special check, only player mover allowed here - if (guid != _player->m_mover->GetGUID() || guid != _player->GetGUID()) + if (guid != mover->GetGUID() || guid != _player->GetGUID()) { recvData.rfinish(); // prevent warnings spam return; } - // continue parse packet - recvData >> unk1; // counter or moveEvent + if (!ProcessMovementInfo(movementInfo, mover, _player, recvData)) + { + recvData.rfinish(); // prevent warnings spam + return; + } - MovementInfo movementInfo; - movementInfo.guid = guid; - ReadMovementInfo(recvData, &movementInfo); - - recvData >> newspeed; + if (opcode == CMSG_MOVE_SET_COLLISION_HGT_ACK) + { + WorldPacket data(MSG_MOVE_SET_COLLISION_HGT, 18); + WriteMovementInfo(&data, &movementInfo); + data << newspeed; // new collision height + mover->SendMessageToSet(&data, _player); + return; + } // client ACK send one packet for mounted/run case and need skip all except last from its // in other cases anti-cheat check can be fail in false case @@ -685,42 +697,15 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData) switch (opcode) { - case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: - move_type = MOVE_WALK; - force_move_type = MOVE_WALK; - break; - case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: - move_type = MOVE_RUN; - force_move_type = MOVE_RUN; - break; - case CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK: - move_type = MOVE_RUN_BACK; - force_move_type = MOVE_RUN_BACK; - break; - case CMSG_FORCE_SWIM_SPEED_CHANGE_ACK: - move_type = MOVE_SWIM; - force_move_type = MOVE_SWIM; - break; - case CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK: - move_type = MOVE_SWIM_BACK; - force_move_type = MOVE_SWIM_BACK; - break; - case CMSG_FORCE_TURN_RATE_CHANGE_ACK: - move_type = MOVE_TURN_RATE; - force_move_type = MOVE_TURN_RATE; - break; - case CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK: - move_type = MOVE_FLIGHT; - force_move_type = MOVE_FLIGHT; - break; - case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: - move_type = MOVE_FLIGHT_BACK; - force_move_type = MOVE_FLIGHT_BACK; - break; - case CMSG_FORCE_PITCH_RATE_CHANGE_ACK: - move_type = MOVE_PITCH_RATE; - force_move_type = MOVE_PITCH_RATE; - break; + case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: move_type = MOVE_WALK; force_move_type = MOVE_WALK; break; + case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: move_type = MOVE_RUN; force_move_type = MOVE_RUN; break; + case CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK: move_type = MOVE_RUN_BACK; force_move_type = MOVE_RUN_BACK; break; + case CMSG_FORCE_SWIM_SPEED_CHANGE_ACK: move_type = MOVE_SWIM; force_move_type = MOVE_SWIM; break; + case CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK: move_type = MOVE_SWIM_BACK; force_move_type = MOVE_SWIM_BACK; break; + case CMSG_FORCE_TURN_RATE_CHANGE_ACK: move_type = MOVE_TURN_RATE; force_move_type = MOVE_TURN_RATE; break; + case CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT; force_move_type = MOVE_FLIGHT; break; + case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break; + case CMSG_FORCE_PITCH_RATE_CHANGE_ACK: move_type = MOVE_PITCH_RATE; force_move_type = MOVE_PITCH_RATE; break; default: LOG_ERROR("network.opcode", "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: {}", opcode); return; @@ -728,6 +713,12 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData) sScriptMgr->AnticheatSetUnderACKmount(_player); + SpeedOpcodePair const& speedOpcodes = SetSpeed2Opc_table[move_type]; + WorldPacket data(speedOpcodes[static_cast(SpeedOpcodeIndex::ACK_RESPONSE)], 18); + WriteMovementInfo(&data, &movementInfo); + data << newspeed; + mover->SendMessageToSet(&data, _player); + // skip all forced speed changes except last and unexpected // in run/mounted case used one ACK and it must be skipped.m_forced_speed_changes[MOVE_RUN} store both. if (_player->m_forced_speed_changes[force_move_type] > 0) @@ -974,6 +965,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData) MovementInfo movementInfo; recvData >> guid.ReadAsPacked(); recvData >> counter; + movementInfo.guid = guid; ReadMovementInfo(recvData, &movementInfo); Unit* mover = _player->m_mover; @@ -996,7 +988,6 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData) return; WorldPacket data(recvData.GetOpcode() == CMSG_FORCE_MOVE_UNROOT_ACK ? MSG_MOVE_UNROOT : MSG_MOVE_ROOT); - data << guid.WriteAsPacked(); WriteMovementInfo(&data, &movementInfo); mover->SendMessageToSet(&data, _player); } diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index cbb576580..d14eee29c 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1245,7 +1245,7 @@ void OpcodeTable::Initialize() /*0x45A*/ DEFINE_HANDLER(MSG_MOVE_SET_PITCH_RATE_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x45B*/ DEFINE_HANDLER(MSG_MOVE_SET_PITCH_RATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x45C*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_FORCE_PITCH_RATE_CHANGE, STATUS_NEVER); - /*0x45D*/ DEFINE_HANDLER(CMSG_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); + /*0x45D*/ DEFINE_HANDLER(CMSG_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleForceSpeedChangeAck ); /*0x45E*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_SET_PITCH_RATE, STATUS_NEVER); /*0x45F*/ DEFINE_HANDLER(CMSG_CALENDAR_EVENT_INVITE_NOTES, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x460*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_CALENDAR_EVENT_INVITE_NOTES, STATUS_NEVER); @@ -1359,9 +1359,9 @@ void OpcodeTable::Initialize() /*0x4CC*/ DEFINE_HANDLER(CMSG_END_BATTLEFIELD_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x4CD*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MULTIPLE_PACKETS, STATUS_NEVER); /*0x4CE*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_GRAVITY_DISABLE, STATUS_NEVER); - /*0x4CF*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); + /*0x4CF*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleMoveFlagChangeOpcode ); /*0x4D0*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_GRAVITY_ENABLE, STATUS_NEVER); - /*0x4D1*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); + /*0x4D1*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleMoveFlagChangeOpcode ); /*0x4D2*/ DEFINE_SERVER_OPCODE_HANDLER(MSG_MOVE_GRAVITY_CHNG, STATUS_NEVER); /*0x4D3*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_MOVE_GRAVITY_DISABLE, STATUS_NEVER); /*0x4D4*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_MOVE_GRAVITY_ENABLE, STATUS_NEVER); @@ -1431,7 +1431,7 @@ void OpcodeTable::Initialize() /*0x514*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SEND_ALL_COMBAT_LOG, STATUS_NEVER); /*0x515*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_OPEN_LFG_DUNGEON_FINDER, STATUS_NEVER); /*0x516*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_SET_COLLISION_HGT, STATUS_NEVER); - /*0x517*/ DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HGT_ACK, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL ); + /*0x517*/ DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HGT_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleForceSpeedChangeAck ); /*0x518*/ DEFINE_HANDLER(MSG_MOVE_SET_COLLISION_HGT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x519*/ DEFINE_HANDLER(CMSG_CLEAR_RANDOM_BG_WIN_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); /*0x51A*/ DEFINE_HANDLER(CMSG_CLEAR_HOLIDAY_BG_WIN_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL ); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 733f88a7a..12dd15f11 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -417,10 +417,10 @@ public: if (CheckModifySpeed(handler, target, allSpeed, 0.1f, 50.0f)) { NotifyModification(handler, target, LANG_YOU_CHANGE_ASPEED, LANG_YOURS_ASPEED_CHANGED, allSpeed); - target->SetSpeed(MOVE_WALK, allSpeed); - target->SetSpeed(MOVE_RUN, allSpeed); - target->SetSpeed(MOVE_SWIM, allSpeed); - target->SetSpeed(MOVE_FLIGHT, allSpeed); + target->SetSpeed(MOVE_WALK, allSpeed, true); + target->SetSpeed(MOVE_RUN, allSpeed, true); + target->SetSpeed(MOVE_SWIM, allSpeed, true); + target->SetSpeed(MOVE_FLIGHT, allSpeed, true); return true; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 3aef1085b..a1f9d3e6d 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -2566,7 +2566,7 @@ public: me->SetCanFly(false); me->SetDisableGravity(false); me->GetMotionMaster()->MovePoint(POINT_DROP_PLAYER, _destPoint, FORCED_MOVEMENT_NONE, 0.f, false); - me->SetDisableGravity(true, true); + me->SetDisableGravity(true); me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); break; case EVENT_MOVE_TO_SIPHON_POS: @@ -2732,7 +2732,7 @@ class spell_the_lich_king_valkyr_target_search : public SpellScript if (Unit* target = GetHitUnit()) { GetCaster()->GetMotionMaster()->MoveCharge(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + 4.0f, 42.0f, EVENT_CHARGE); - GetCaster()->SetDisableGravity(true, true); + GetCaster()->SetDisableGravity(true); } } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 6ca80d64f..8b6c5f25d 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -528,9 +528,7 @@ public: init.Launch(); pPlayer->SetUnitMovementFlags(MOVEMENTFLAG_NONE); - pPlayer->SetDisableGravity(true, true); - - sScriptMgr->AnticheatSetCanFlybyServer(pPlayer, true); + pPlayer->SetDisableGravity(true); WorldPacket data(SMSG_SPLINE_MOVE_UNROOT, 8); data << pPlayer->GetPackGUID(); @@ -941,10 +939,7 @@ public: if (!bUpdatedFlying && timer) { bUpdatedFlying = true; - plr->SetDisableGravity(true, true); - - sScriptMgr->AnticheatSetCanFlybyServer(plr, true); - sScriptMgr->AnticheatSetUnderACKmount(plr); + plr->SetDisableGravity(true); } plr->SendMonsterMove(me->GetPositionX() + dist * cos(arcangle), me->GetPositionY() + dist * std::sin(arcangle), me->GetPositionZ(), VORTEX_DEFAULT_DIFF * 2, SPLINEFLAG_FLYING); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 871d014d9..028025023 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -347,7 +347,7 @@ struct boss_kaelthas : public BossAI } else if (point == POINT_AIR) { - me->SetDisableGravity(true, false, false); // updating AnimationTier will break drowning animation later + me->SetDisableGravity(true); // updating AnimationTier will break drowning animation later } else if (point == POINT_START_LAST_PHASE) {